When, on Windows 7, I launch a console program that should crash, I have the following cases:
- If I double-click on it, it crashes and a "your program crashed" dialog popup opens up
- If I launch it through a DOS console, it crashes and a "your program crashed" dialog popup opens up
- If I launch it through a Cygwin console, it crashes silently. No dialog popup
Note that on Windows XP, everything works as expected (a dialog popup opens...), and I can debug the crashed program.
Is that a cygwin bug on Windows 7? A configuration problem?
Miscellaneous data
- My Cygwin is 1.7.5, but it was reproduced with a Cygwin 1.7.7.
- It works on WinXP, but fails on Cygwin on Windows 7 (32, or 64-bit)
- The dialog is interesting for dev/debug purposes
I wrote the following C++ program on Visual Studio 2008, in debug (32 bits or 64 bits have the same result):
#include <cstdio>
#include <windows.h>
int main()
{
printf("It should crash now...") ;
::DebugBreak() ;
return 0 ;
}
The ::DebugBreak()
has been replaced by int * p = NULL ; *p = 42 ;
(which is supposed to crash with an access violation exception), with exactly the bugged results on Cygwin.
Thanks !