[SDL] Program crashes in release build
fuzzytew at gmail.com
Wed Apr 15 06:04:03 PDT 2009
> Mybowlcut wrote:
>> It works fine in the debug build...
What compiler, and what exact version of the compiler, are you using
to build this? What runtime library is being used? What are all the
compiler settings? Try changing settings and runtime libraries
between the debug and release build configurations to identify which
setting or runtime, or combination of the two, is triggering the
crash. Check to see if there are any updates available for your build
system and install them, see if the problem still occurs. Try with an
earlier release of your build system, see if the problem still occurs.
Run the code in the debugger, and examine the local variables right
before the exception is thrown. Is *onexitend the pointer that
contains 0x10 rather than a valid value? If so, set a memory
breakpoint on the address in onexitend (which could require examining
and understanding the source of the _decode_pointer function to do
properly) and identify when and why it is set to 0x10.
If it is not, then step through the assembly
instruction-by-instruction (rather than the code line-by-line),
watching the values of the registers, to identify when 0x10 is
actually dereferenced. Once you know where exactly the 0x10 is
happening, you can trace back in the assembly where in the code or in
memory the 0x10 came from, and set an appropriate breakpoint. Perhaps
*onexitend is a valid pointer but does not point to valid code -- then
you would still want to set a memory breakpoint to see where onexitend
is set or reset, and if it is never properly set. There may be
something going screwy with a call to atexit() in SDL code.
It would be easier to deal with your issue if the relevant information
had been distilled and compiled into your post on the mailing list --
diving through the linked forum posts makes working out a hard problem
even harder, hence my late response. I am not the best person to
resolve this anyway, though, as I do not work with the microsoft sdk
and am rather new to SDL!
More information about the SDL