Sign in to follow this  
Jookia

Program Crashes When Not Debugging

Recommended Posts

I'm on Windows 7 using MinGW and CodeBlocks. My program compiles fine and all, but crashes when doing something which I'm not sure of yet. The problem is, it crashes when I'm not debugging it, but when I am debugging it it doesn't crash. I mean what the crap, how am I suppose to fix something that only crashes when I'm not looking for the problem?!

Share this post


Link to post
Share on other sites
You can still run the program in a debugger even if it's not a debug build. In the worst case you haven't got all debugging symbols, but it should help you surround where the bug occurs. And then you could still add debugging settings to the compiler/linker options in a release build (especially Mingw with gcc as the compiler is very well documented).

Share this post


Link to post
Share on other sites
Well, there's always also the possibility to trace the program flow with printed messages, e.g. by using OutputDebugString and a tool like Dbgview under Windows or perror/fprintf and working from a terminal under Linux and OSX.

Share this post


Link to post
Share on other sites
You may also want to use Application Verifier to help you track down possible memory corruption bugs and fun stuff like that.

http://msdn.microsoft.com/en-us/library/ms220948.aspx

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this