Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
debuging C::B
roshi:
Hi people,
I'm trying the SVN version of C::B build 4564, with wxGTK 2.6.8 GCC 4.1.1-r3
Previously I was using codeblocks-1.0_pre20070511 (this is on gentoo linux).
Anyway, I've noticed that an old bug has apparently returned.
When I open certain cpp files they show up empty.
If I open them on another app, save, and them and open them again on C::B then it works...
Is there a way to know what was the error that C::B encountered while opening the file?
Also, apparently the scrolling still has that problem of high CPU usage.
No hint of why as of now?
Thanks
Biplab:
--- Quote from: roshi on October 27, 2007, 12:07:27 pm ---Anyway, I've noticed that an old bug has apparently returned.
When I open certain cpp files they show up empty.
If I open them on another app, save, and them and open them again on C::B then it works...
Is there a way to know what was the error that C::B encountered while opening the file?
--- End quote ---
It's due to wrong encoding conversion. Currently C::B supports UTF-8/16/32 and system default encoding.
This problem can happen if a file has mixed encoding and C::B can detect wrongly in some cases. Just check which encoding is detected in your case. :)
roshi:
Thank
I just noticed that doing a diff between the old and the edited version of the file I got:
< << "Can´t resize screen to "
---
> << "Can�t resize screen to "
The thing is that the previous version that I was using did not have this problem.
Don't you think that it should open the file even the encoding is wrong?
Some fallback....
This might be philosophical discussion but it's interesting to see the contents even if partially wrong.
Moreover it might be interesting to turn on this kind of debugging output to the C::B debug tab.
Thanks
Biplab:
--- Quote from: roshi on October 27, 2007, 12:41:32 pm ---Thank
I just noticed that doing a diff between the old and the edited version of the file I got:
< << "Can´t resize screen to "
---
> << "Can�t resize screen to "
The thing is that the previous version that I was using did not have this problem.
Don't you think that it should open the file even the encoding is wrong?
Some fallback....
This might be philosophical discussion but it's interesting to see the contents even if partially wrong.
Moreover it might be interesting to turn on this kind of debugging output to the C::B debug tab.
--- End quote ---
Which revision are you using? If possible please upgrade to 4564.
Yes even if the conversion fails, we should be able to see the raw data. But once conversion fails, one will get an empty string (this is how we detect failure). We can feed the raw data as a fallback to wxScintilla only if there is no embedded null chars inside a string. Otherwise you'll see only one or two chars and the remaining portion will get rejected. :)
roshi:
Yes that is the revision that I'm using.
I also noticed that the cut and paste is acting strange.
The copy/cut fails allot.
For example, I do ctrl+x, the selected text actually disappears but, when I try to paste, C::B pastes the old cut/copied block and not the new one.
cheers
Navigation
[0] Message Index
[#] Next page
Go to full version