Exception after program termination

I’m sorry if this has been covered before, but I can’t find info on it
anywhere. If I run an SDL app with opengl support (for example testgl from
the distro) it will throw an exception on exit:

First-chance exception at 0x7c81eb33 in testgl.exe: 0x00000006: The handle is
invalid.
First-chance exception at 0x7c90eb74 in testgl.exe: 0xC0000008: An invalid
HANDLE was specified.
Unhandled exception at 0x7c90eb74 in testgl.exe: 0xC0000008: An invalid HANDLE
was specified.

This happens after execution has left the code. The call stack shows that
it’s way down deep in ntdll.dll. Like I said, it fails on the included test,
but it will also fail on something as simple as:
SDL_Init
SDL_SetVideoMode( with the SDL_OPENGL bit specified )
SDL_Quit

Same behavior in both SDL-1.2.5 and SDL-1.2.7. I’m running Visual C++.net in
WindowsXP.

Thanks,
James

Are you using precompiled dll’s, or did you build them yourself? I
have the same environment, and testgl (and derived apps) work fine
with dll’s that I built. Try doing a full SDL build with the CVS
snapshot and use that dll with the program you’re using now.

-Justin

PS - Also check that your video drivers are completely up to date,
you’re using the correct mode (release or debug), etc.On Fri, 29 Oct 2004 02:23:03 +0000 (UTC), James Wells wrote:

example testgl from
the distro) it will throw an exception on exit:

First-chance exception at 0x7c81eb33 in testgl.exe: 0x00000006: The handle is
invalid.
First-chance exception at 0x7c90eb74 in testgl.exe: 0xC0000008: An invalid
HANDLE was specified.
Unhandled exception at 0x7c90eb74 in testgl.exe: 0xC0000008: An invalid HANDLE
was specified.

Same behavior in both SDL-1.2.5 and SDL-1.2.7. I’m running Visual C++.net in
WindowsXP.

Are you using precompiled dll’s, or did you build them yourself? I
have the same environment, and testgl (and derived apps) work fine
with dll’s that I built. Try doing a full SDL build with the CVS
snapshot and use that dll with the program you’re using now.

-Justin

PS - Also check that your video drivers are completely up to date,
you’re using the correct mode (release or debug), etc.

Thanks for the help. Unfortunately I’ve repeated the behavior with binaries
downloaded from the site, binaries built by me, release debug etc. SDL used
to work for me on this same computer so I’m gonna guess it’s my video drivers
(which have been updated).

Thanks,
James

If you can, try just rolling back to an older video driver, and try
the same app, same SDL dll, etc. I believe you have an NVidia card,
right? I could email you an older driver if you don’t have one
available, just reply off-list if you need it.

Good luck!

-JustinOn Fri, 29 Oct 2004 17:49:38 +0000 (UTC), James Wells wrote:

Thanks for the help. Unfortunately I’ve repeated the behavior with binaries
downloaded from the site, binaries built by me, release debug etc. SDL used
to work for me on this same computer so I’m gonna guess it’s my video drivers
(which have been updated).

I used to have all sorts of problems with drivers for my nVidia cards in
Windows (before moving completely to linux except for the occasional
game and never for the net) - found that it’s usually best to stick to
their certified drivers rather than their most recent drivers. The main
problem seemed to be that directx games just wouldn’t work (openGl
seemed fine). Not sure how this would effect SDL (if at all) but it
might be something to look into.On Sat, 2004-10-30 at 10:03, Justin Coleman wrote:

On Fri, 29 Oct 2004 17:49:38 +0000 (UTC), James Wells wrote:

Thanks for the help. Unfortunately I’ve repeated the behavior with binaries
downloaded from the site, binaries built by me, release debug etc. SDL used
to work for me on this same computer so I’m gonna guess it’s my video drivers
(which have been updated).

If you can, try just rolling back to an older video driver, and try
the same app, same SDL dll, etc. I believe you have an NVidia card,
right? I could email you an older driver if you don’t have one
available, just reply off-list if you need it.

Good luck!

-Justin

Does this help at all?

http://twomix.devolution.com/pipermail/sdl/2004-August/063734.html

– James