Code::Blocks Forums
User forums => Using Code::Blocks => Topic started by: MoonKid on March 29, 2007, 09:21:53 pm
-
I got a program that runs (F9) normal without any errors.
But If I start it with a a debug (F8) it recieves a SIGSEGV.
<err>
Program received signal SIGSEGV, Segmentation fault.
In RpcRaiseException () (C:\WINDOWS\system32\rpcrt4.dll)
</err>
I do not know what it is. Any idea?
I am using the nightlys with gcc under WinXPSP2.
-
This is a "feature".
Windows sends signals, exceptions, and whatever during normal operation, for example during drag-and-drop, file selection dialogs, RPC, and some other actions. The debugger catches them, and shows them (not knowing that they are "normal").
-
Ok, but a Segmentation fault is something wrong, isn't it?
-
Possibly, but not necessarily. Try dragging a file over Code::Blocks when it runs in the debugger, it will segfault, too.
Most of the time (99%), if it crashes in "normal" mode but runs fine in the debugger, you forgot to zero-initialise a variable. The debugger initialises all variables, thus the bug is hidden.
Most of the time (99%), if it runs fine in "normal" mode but crashes only in the debugger, it's plain normal.
-
Possibly, but not necessarily. Try dragging a file over Code::Blocks when it runs in the debugger, it will segfault, too.
My application just crashes on startup before I see any window/dialog!
I checked some older versions in my svn. There is the same behavior.
I checke some older versions of code::blocks (from 1.february). There is the same behavior.
I am driving crazy! ;)
Most of the time (99%), if it runs fine in "normal" mode but crashes only in the debugger, it's plain normal.
It is normal, ok! But I need to debug my application?
How can I do this?
-
Hm... I just restarted my WinXP. That's all.
I do not shutdown my system. I did a supend-to-disk for two weeks.
-
If debugger gets some possible SEGFAULT which is normal due to situations Thomas described, after recieving such signal you should simply select continue and it will work. If it's really a bug, it will rethrow SEGFAULT.
BYO
-
same problem with 5th May 2007 build on windows XP ; gdb 6.5 with cygwin environ
there is infinite number of sigsevs after clicking continue
all refer to ntdll.dll