[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [LuaJIT FFI] Crashing when exiting after loading SOIL DLL
- From: Alex <initrd.gz@...>
- Date: Fri, 30 Dec 2011 12:10:03 -0600
Thanks for the response.
Mike Pall <mikelu-1112@mike.de> wrote:
> Some C libraries do not react well if their DLL is explicitly
> unloaded (which is caused by closing the Lua state). What happens
> if you use os.exit(0) at the end of your script?
The problem still occurs if I use os.exit(0). The library doesn't have
any special unloading code; it's just a bunch of image loading
functions compiled with MinGW gcc+Code Blocks.
> Another possibility is that you've made some mistake in using the
> library that corrupted some memory, which causes a crash later on.
> Try to reduce your program until it no longer crashes.
I don't think this is the case; just loading the DLL causes the issue,
even if I do nothing with it.
> You can install WinDbg and turn on 'just-in-time debugging'
> (google for it, doesn't have anything to do with a JIT compiler).
> Then whenever you get a crash, WinDbg automatically starts up and
> you can look at a backtrace. However, I doubt the info is very
> helpful for a crash inside libgcc ...
Here's the call stack:
ntdll!NtTerminateProcess+0xa
wow64!Wow64EmulateAtlThunk+0x86ba
wow64!Wow64SystemServiceEx+0xd7
wow64cpu!TurboDispatchJumpAddressEnd+0x2d
wow64!Wow64SystemServiceEx+0x1ce
wow64!Wow64LdrpInitialize+0x429
ntdll!RtlUniform+0x6e6
ntdll!RtlCreateTagHeap+0xa7
ntdll!LdrInitializeThunk+0xe