Skip to main content
GameDev.net gamedev.net
🔒 Locked

Release build of my program crashes on exit.

Started by CodaKiller Nov 28, 2009 at 9:46 PM 4 replies 2.1k views
Original Post
CodaKiller
CodaKiller
When I run my application in either release or debug from visual c++ it closes out fine but when I run the EXEs them selfs the release build crashes. I tried to change every single property in the release build to the same exact settings as the debug build but it still crashes, I've traced it down to the X3DAudioCalculate function from X3DAudio. Once this function is called in the release build of my application it will crash on exit. Does anyone have any idea as to what may be causing it or at lease an idea for something else I could try to fix it?
Remember Codeka is my alternate account, just remember that!
Adam_42
Adam_42
When started through the debugger the debug heap will be used. To debug the issue start the program without debugging, and attach the debugger to it at that point (select attach from the debug menu).

The crash is most likely caused by uninitialized data being used, probably somewhere in your audio code. It could also be other bad heap usage, like using memory after it's been deleted. For example are you deleting audio stuff while it's still playing?
CodaKiller
CodaKiller
Quote:
Original post by Adam_42
When started through the debugger the debug heap will be used. To debug the issue start the program without debugging, and attach the debugger to it at that point (select attach from the debug menu).

The crash is most likely caused by uninitialized data being used, probably somewhere in your audio code. It could also be other bad heap usage, like using memory after it's been deleted. For example are you deleting audio stuff while it's still playing?


That was somewhat helpful, I now know that it happens when I call the return command to close out the main loop and I know that it's an access violation.

Thats all I know, I'm still not sure why it happens though since I closed out every last thing... [depressed]
Remember Codeka is my alternate account, just remember that!
MadMax1992
MadMax1992
I also had this once. It was because I didn't initialize a certain variable. The debugger did this for me automatically in debug-mode. In release-mode however, it didn't, and the program crashed.

Maybe you could look for uninitialized variables/pointers
CDProp
CDProp
It sounds to me like you might be deleting/releasing something that has already been deleted/released. Or, it could be a buffer overflow. There's a security feature that causes a crash if a function returns and there has been a buffer overflow.
CodaKiller
CodaKiller
Figured it out! The tutorial I was using for X3DAudio had an error when it was defining the array for pMatrixCoefficients, the array was not large enough. I fixed it and everything works now thanks for all of the help though!
Remember Codeka is my alternate account, just remember that!

Topic Locked

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

Sign in to reply to this topic.