Hello everybody,
c::b just crash five times doing five times the same thing:
procedure: typing just "voi" in a header file in order to declare a function returning void.
effect: just having typed "voi" the editor freezes and the cpu usage goes up to 100% immediately (top). the editor only shows the input "vo" without the "i". code completion is configured as default to kick in after third charkter. codeblocks remains absolutely frozen and is terminated by the OS after about one minute one my machine.
code completion pop-up does not show.
using SuSE 11.1 x86_64 on a amd athlon x2 +4200 machine. c::b in version svn5844 self compiled as usual.
searching in the /tmp folder there appears to be no crash report generated for the above crashes. Only file that matches date and time is a file named CODEBLOCKS.socket .Typing "int" correctly pops upp the code completion pop-up with all correct suggestions.
regards and greetings from asturias
nausea
HI!
But I can't reproduce this on svn5840 in Windows XP. :(
The same to ollydbg.
I just tried it on debian (also 64-bit) and it works as expected.
Does this always happen, or do you "need" special headers to make it appear (like boost etc.).
If it does not always hang, it would be nice if you could create a simple test-project where this error occurs and attach it.
Hi,
I stripped the project of all unnecessary ballast and tested it. Doesn't use any special includes, the project is a working wxWidgets 2.8.8 wxGtk project with a minimal frame. The behavior is unchanged as I described.
The attached .zip contains hopefully everything to run the thing. Always could be simply that my local configuration, compilation, etc ... of c::b is goofed up ... wouldn't be the first time neither ...
Thanks for the interest
nausea
[attachment deleted by admin]
Did some more testing.
Tested the c++ keywords (not all):
do not crash: int, bool, long, class, struct, signed, unsigned, template, typedef, explicit, const
crash: void, double
crash always happens on typing third character (meaning, if typedef works, typename also works). Settings: kick in after three characters, maximum hits is 20.
setting up the limit of kick-in to four the behavior is the same, only crash now happening after typing forth character.
Regards
nausea
Did a check-out of the svn. There have been changes in code completion yesterday, I think, by Morten McFly.
the files that changed:
nativeparser.cpp 5840 to 5845
nativeparser.h 5826 5845
codecompletion.cpp 5834 5845
parserthread.cpp 5838 5845
parserthread.h 5833 5845
parser 5838 5845
codecompletion 5840 5846
I will try out the new svn and see what happens....
well, same result, void did work and I saw a pop up saying "parser is still working", but no pop-up with suggestions, at least it did not crash.
CORRECTION: typing "voi" did crash after second try, the first positive result I can not explain, now it crashes in this case too, always ...
"double" crashed after typing "dou" with symptoms as before. c::b is 5846 (svn build rev 5846 (2009-10-06T08:52:59.937028Z) gcc 4.3.2 Linux/unicode)
Regards
nausea
CORRECTION: the pop-up saying "parser is still working" always shows once, trying to type either "double" or "void" and the program does not crash after third character, but does not show pop-up with suggestion either. At second intent the program crashes as above. This happens either by typing a new line and there "dou" or "voi" or by erasing the previous typed letters, such as leaving only a "d" or "v" and trying to complete this word to "double" or "void" respectively. crash as above described.
PS: would be nice, please, if anyone could post any reaction whatsoever. I'm beginning to feel a bit strange, like that cartoon figure running over the edge and still moving it's legs ;)
I can confirm this issue with your test-project on debian 64-bit.
Will look into it.
It's an endless-loop in
FindAIMatches in
nativeparser.cpp.
If I comment out the if-block starting with
if (local_result.size() == 1) (lines 1720 - 1747) it works again, but most likely break other stuff.
The block was added in svn r5770 (merge with old cc-branch) and originally added in svn 5685 to cc-refactoring-branch.
To reproduce the crash (or better the endless-loop) on windows, you can do the following:
- find the definition of VOID (it is in winnt.h in my MinGW-install),
- comment it out
- add typedef void VOID; in a simple hello-world console-project
- save it
- and after typing vo it hangs (if cc kicks in after three characters)
.
This "works" at least for me.
Quote from: jens on October 06, 2009, 01:09:59 PM
I can confirm this issue with your test-project on debian 64-bit.
I can't reproduce, still (on Windows 32bit). :-(
C::B reliable bails out even on windows (if I use my fantastically step-by-step instruction).
It seems there must be exactly one typdef that starts with the same characters (case does not matter) than a (builtin ?) type and no other tokens, that make cc kick in at this time.
The same happens for double on linux if mathdef.h gets parsed (contains typedef double double_t;) and no other tokens start with dou.
Quote from: jens on October 06, 2009, 02:25:26 PM
It's an endless-loop in FindAIMatches in nativeparser.cpp.
If I comment out the if-block starting with if (local_result.size() == 1) (lines 1720 - 1747) it works again, but most likely break other stuff.
The block was added in svn r5770 (merge with old cc-branch) and originally added in svn 5685 to cc-refactoring-branch.
To reproduce the crash (or better the endless-loop) on windows, you can do the following:
- find the definition of VOID (it is in winnt.h in my MinGW-install),
- comment it out
- add typedef void VOID; in a simple hello-world console-project
- save it
- and after typing vo it hangs (if cc kicks in after three characters)
.
This "works" at least for me.
Another simple way to solve this
Token* tdef = DoAddToken(tkClass, components.front(), lineNr, 0, 0, args);In this thread,http://forums.next.codeblocks.org/index.php/topic,11187.msg76830.html#msg76830 (http://forums.next.codeblocks.org/index.php/topic,11187.msg76830.html#msg76830)
maybe this is the reason why the suggestion list flashed.
Quote from: jens on October 06, 2009, 02:25:26 PM
The block was added in svn r5770 (merge with old cc-branch) and originally added in svn 5685 to cc-refactoring-branch.
Quote from: jens on October 06, 2009, 02:25:26 PM
if (local_result.size() == 1) (lines 1720 - 1747)
Harhar! Now I know why it works for me: I have experimentally commented out that whole section as we were discussing about that. To be honest: I don't believe this section is necessary anymore. So far everything concerning typedefs (what this block was fort) works just fine here. I'll probably commit later. For now: Just remove that section in your local copy (all of you affected).
Confirmed, commenting out those lines solves the issue here...
Many thanks, greetings from Asturias
nausea :D
I'm sorry...
Just got the newest svn of c::b the 5847 compiled it and the plugin workspace and the problem returned ... :shock:
I looked into the nativeparser.cpp and the mentioned lines are not there, but the problem persists ...
nausea
EDIT: got version svn5848 and problem is gone ... thanks