Jump to content
  • Advertisement
Sign in to follow this  
vs322

Crashes from .exe file (VSC++ 2005)

This topic is 3617 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

So my program runs from the ide fine when I click the "start debugging" button in both debug and release modes (I know its silly to debut the release version). However, when I build the project in release mode, then copy the .exe from the release folder to the project folder (so it gets all the relevant resource files) and run it, I get a crash soon after startup. The crash actually doesn't even finish its startup routine and enter the main game loop. I have tried to debug it, but I cant even look at the assembly. The only info I have gotten about the crash is it exits with the code: 0xc000000d at address 0x00000000004510e0 (I bet that address is useless to help diagnose the problem). My guess is that this is happening from some uninitialized variable or something similar, but my question is: how do I track it down? or is this some other problem?

Share this post


Link to post
Share on other sites
Advertisement
If you turn your Warning Level up, the compiler should be smart enough to catch many of your potential uninitialized variables. Also, you could look at the stack to see which function you crashed in.

Share this post


Link to post
Share on other sites
You can turn on debug info in the release build so that you get some info when it crashes. It may step weirdly as things get rearranged by the optimizer.

Share this post


Link to post
Share on other sites
You should be able to attach a debugger to the executable after it's crashed. You'll probably just have to tell it where the symbols (.pdb's) and source code are located, and then it will show you in the code where it's crashing.

Share this post


Link to post
Share on other sites
Thanks for the Quick and useful answers.

it was this chunk here from some code almost a year old... wonder why it wasn't crashing things before.

strncpy_s(stFileName,sizeof(char)*(strlen(stFileName)-1),
stFile,_TRUNCATE);//



so I changed stFileName to a std::string, like it should have always been, and every thing is just peachy now, thanks again.

-vs

Share this post


Link to post
Share on other sites
Quote:
Original post by Red Ant
You can also have your program generate a crash dump file when it crashes. Afterwards, you can take this file and load it into the debugger.


Ah that looks real useful actually. I thanks.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!