[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: alien attacks SDL
- From: Hans van der Meer <H.vanderMeer@...>
- Date: Thu, 4 Sep 2008 15:35:38 +0200
Martin <wtxnh-lua@...> wrote:
One thing that bother me is that I can not find why game always end
with segmentation fault when I am closing it! What is strange it
segfault after last command in the game is executed. I strongly
suspect it has to do something with memory management but can not
figure out a cure. Any suggestion?
I have to cope with a similar problem: a segmentation fault occurring
in the aftermath of a program (see subject "module loading in C"). Did
you load C-libraries of your own, possibly within C-code? In my case I
now believe the origin of such a crash might be in the premature
unloading of a C library. These are held in the LUA_REGISTRY as
userdata under a key "LOADLIB: <path-of-library>" and apparently
nowhere else. The __gc function in the accompanying metatable unloads
the library. Your problem might be similar.
Hans van der Meer