Skip to main content
gamedev.net
🔒 Locked

Critical Error

Started by starfleetrp 4 replies 900+ views
Original Post
starfleetrp
starfleetrp
Hi, I am experiencing something that I have never seen before. When I try to run my application (either release or debug) it works perfectly in the debugger/IDC. However if I try to run the .exe by double clicking it I get a Critical Error (since its XP its asking if I want to send error report). I am not sure why this is happening. If you have experienced this what could be causing it (or could it be anything???)
dave
dave
Are you loading anything from a file?

If you are then you need to have a look at the working directory that is set up for the project. Any relative paths that you use might be wrong and cause an object that is incorrectly loaded to throw an exception when it is dereference or the like.

Hope that helps,

Dave
PhilMorton
PhilMorton
could be something to do with pointers...

eg.
char* text;while( something ){   if( something else )       text = "you smell";   ......   if( text )   {      printf( text );   }}


in debug this will work, because the debug compiler actually changes line 1 to be:
char* text = (char*)0;

Whereas the release compiler wont set it to zero for you... It will contain whatever garbage was in memory previously.

Make sure you are initializing all of your variables before you use them.
Allways question authority......unless you're on GameDev.net, then it will hurt your rating very badly so just shut the fuck up.
kuphryn
kuphryn
possible problems include invalid pointers and handles

initialize all member variables

Kuphryn
dave
dave
He said that it works perfectly in both debug and release.
starfleetrp
starfleetrp
Well I found the problem and it was that for some reason even though I programmed a fall-out incase a file did not load it was not working in release version. So it is now fixed. It worked in debug/release mode when I tested it but not when run by the exe (for some reason) even though the file never even existed on my computer.

It was very odd, but now the problem is fixed. Thanks

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.