From: Schuster, Joel (N-Compaq) <joel.schuster@lm...> - 2004-04-27 16:02:34
The reason may be that the function that is being specified to capture the atexit is not in the dll memory space. Using atexit is not the problem, using sdl_quit is since the dll doesn't probably have access to the sdl stuff.
[mailto:mingw-users-admin@...]On Behalf Of Luke
Sent: Tuesday, April 27, 2004 7:05 AM
Subject: Re: [Mingw-users] atexit() in a DLL causes page fault?
Could you provide an example that demonstrates this problem?
----- Original Message -----
From: "Stefan Viljoen" <rylan@...>
Sent: Monday, April 26, 2004 2:11 PM
Subject: [Mingw-users] atexit() in a DLL causes page fault?
> Hi all
> I have a situation, using SDL 1.2.6. on Windows, where I have compiled
> into a DLL using MingW. The DLL has an atexit(sdl_quit()) line in the SDL
> startup code (also inside the DLL). Whenever an .EXE calling the DLL has
> DLL execute exit(), there is an invalid page fault.
> The same code, if compiled and ran inside and .EXE, works fine and exits
> no page fault, and the code runs fine on Linux without a SIGSEGV. Anybody
> any idea why this is happening? Is it a known issue that you cannot place
> atexit() func inside a DLL? Is it safe to call exit(); inside a MingW
> compiled DLL? Or must the main program that calls the DLL be the only one
> allowed to execute exit(), or must the atexit() func ONLY be placed in an
> .EXE and never in a DLL?
> Any help appreciated!
This SF.net email is sponsored by: The Robotic Monkeys at ThinkGeek
For a limited time only, get FREE Ground shipping on all orders of $35
or more. Hurry up and shop folks, this offer expires April 30th!
MinGW-users mailing list
You may change your MinGW Account Options or unsubscribe at: