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

release mode

Started by qx452 Dec 17, 2001 at 4:05 PM 2 replies 450+ views
Original Post
qx452
qx452
I was using the LoadBitmapFile() function from OpenGL Game Programming and it was working fine in debug mode. I just tried release mode and it crashes. I put a lot of writing to the log in different places of the program and I found that it was crashing in the LoadBitmapFile() function. So I put a write to the log before almost every line in LoadBitmapFile() and it stopped crashing. Iv heard stories of peoples log code causing crashes but this is new my log code is stopping a crash! Any ideas why? Edited by - qx452 on December 17, 2001 5:10:17 PM
nicGamer
nicGamer
Are you running the release build from the Release folder. It must be run from the main folder not the release folder otherwise the file names wont work and you will get an unhanded exception when you try to run it.
qx452
qx452
Thats not the problem. I tried copying the image files from the parent folder as well as copying the exe to the parent folder.
nitzan
nitzan
Sounds to me like a buffer overrun. In debug mode MSVC protects all your variables and doesnt let your over-write the buffer. In release mode it doesnt do that and that can causes buffer overrun errors that dont appear in debug mode.

Make sure you arent writing to parts of an array that you didnt initialize!

For example.


Int array[5];

array[5] = 0;
array[6] = 0; etc...

Nitzan

-------------------------
www.geocities.com/nitzanw
www.scorchedearth3d.net
-------------------------

Topic Locked

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

Sign in to reply to this topic.