[Date Prev][Date Next][Thread Prev][Thread Next]
- 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 <email@example.com> 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: