On Tue, Apr 8, 2008 at 12:49 PM, andre arpin <[EMAIL PROTECTED]> wrote: > John Labenski <[EMAIL PROTECTED]> writes: > > > Can you reproduce it my running from the command line and pressing > > Ctrl+C or killing the process? I haven't been able to, but I will try > > doing the logoff thing tomorrow. > > Only happen on log off or shut down (where I found the problem initially).
I don't have the foggiest idea why it only happens when you log out since killing it should do the same thing. Cygwin lets you send various kill signals, but none of them does what logging off does. However the fix is fairly easy and it does make sense. When Lua garbage collects or you call :delete() on a userdata object, wxLua nulls the metatable so that an error is generated rather than crashing. This should be completely invisible to people for garbage collection since it won't be garbage collected if you have a variable pointing to it, but it is useful for :delete(). wxLua tries to explicitly delete the wxWindows (the wxFrame) before anything else when shutting down to try to ensure that it exits gracefully. I wonder if logging out of MSW causes the event loop to be suspended and that is why the config is somehow garbage collected before the wxFrame is deleted? Here's a fix. function CloseWindow(event) ... if config and getmetatable(config) then ConfigSaveFramePosition(frame, "MainFrame") config:delete() -- always delete the config end Regards, John ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ wxlua-users mailing list wxlua-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wxlua-users