Am making a game in C++ with OpenGL (and OpenAL for sound & DevIL for image handling) for a Uni. assignment.
Everything had been fine so far, until I just tried to run my game in 'Release' mode as opposed to the usual 'Debug'. And *bham!*...the program crashed with an error before I even get to the main menu.
The error I receive is :
"Unhandled exception at 0x0377a110 in lesson1.exe: 0xC0000005: Access violation writing location 0x00000120."
If I choose to 'Continue', I keep getting the same error message.
By choosing 'Break', the program points me to the following line in a file called "msize.c" :
When you reach the access violation point in your code,
try examining the call stack and observe the pointer values at different functions. Probably some passed pointer was uninitialized or released and you tried to dereference it, or you tried accessing an out of bounds index in an array.
There are many things that will work just fine in Debug and won't work at all in Release mode. It usually has to do with initializing variables, reseting allocated memory, and such - this is usually done automatically in Debug and not done at all in Release.
The call stack usually reveals who is to blame.