Message box suppressed when calling assert in SDL app

Hi,

I’m new to this list. I work as a graphics programmer but am working
on a game in my free time in SDL/OpenGL.

For an odd reason, in debug mode (XP SP2/1 CPU/VC 2003
Professional/SDL 1.2.9) when an assertion (assert from assert.h) fires
it beeps and I do not get a “Debug/Retry/Cancel” type message box,
instead I just here a beep and it exits the program. This is annoying
since I may want it to break in the debugger.

I’ve traced it to __crtMessageBox which eventually seems to delegate
to a normal message box, but if I override assert myself and call
MessageBoxA and say, asm int 3, it will display the message box fine.

Anyone have this problem? I’ve even recompiled SDL in my same compiler
and linking against the debug version.

Thanks all for assistance,

Matthew

Actually, this seems to happen after I initialize OpenGL. Perhaps my
video drivers supress the message box on the thread. Even in windowed
mode? Odd.

Matthew> Hi,

I’m new to this list. I work as a graphics programmer but am working
on a game in my free time in SDL/OpenGL.

For an odd reason, in debug mode (XP SP2/1 CPU/VC 2003
Professional/SDL 1.2.9) when an assertion (assert from assert.h) fires
it beeps and I do not get a “Debug/Retry/Cancel” type message box,
instead I just here a beep and it exits the program. This is annoying
since I may want it to break in the debugger.

I’ve traced it to __crtMessageBox which eventually seems to delegate
to a normal message box, but if I override assert myself and call
MessageBoxA and say, asm int 3, it will display the message box fine.

Anyone have this problem? I’ve even recompiled SDL in my same compiler
and linking against the debug version.

Thanks all for assistance,

Matthew

Actually, this seems to happen after I initialize OpenGL. Perhaps my
video drivers supress the message box on the thread. Even in windowed
mode? Odd.

It’s probably something in SDL’s video startup. Does it happen in 2D
mode as well? You might poke around in SDL’s message handling to see
if it’s doing something naughty in there. :slight_smile:

-Sam Lantinga, Senior Software Engineer, Blizzard Entertainment