Re: [Gtk-osx-users] Crash when quitting via Dock Icon



On Aug 27, 2010, at 11:58 AM, Phillip Heller wrote:

> 
> On Aug 25, 2010, at 9:05 PM, John Ralls wrote:
> 
>> 
>> I don't see any instances of libigemacintegration.dylib in that stack trace...
>> 
>> "Bus Error" on OSX is the same as "SegFault" in Linux. You're dereferencing a pointer that has a bogus value (0x20). You'll have to fire up GDB to find out what pointer and how it's gotten the bad value.
> 
> John,
> 
>  Thanks for the suggestion.  Alas, I'm not terribly skilled with gdb, and really am not even sure where to start.
> 
> However, I figured I'd try a different approach to debugging.  Instead, I've written a very simple demo to identify a couple issues:
> 
> Please find the demo code here:
> 
> 1) When in the NSApplicationBlockTermination handler, I notice that "another" Command-Q will cause the application to immediately end.  So, I have tried attaching a new handler to the signal within the original handler (this new handler is just a True value, such that the application doesn't end).  However this still doesn't solve the problem.  Any suggestions?
> 
> 2) As to the crash, this demo does reveal something.  When I quit by destroying the window with the red pill, cmd-q and ok, or appmenu -> quit, there is no problem.  When I quit by clicking the dock icon-> quit, it does exit, but not without returning the following console message:
> 
> 2010-08-27 14:57:48.454 python[2502:903] *** attempt to pop an unknown autorelease pool (0x200ea00)
> 
> I appreciate all of your help and hard work on gtk-osx!
> 

I've just pushed a fix for the first problem. You can read the diagnosis in the commit comments.

I spent a while debugging the second one; it appears to be a pointer corruption issue, but while I can see _what_ is happening, I'm at a loss to understand _why_, not even enough to write an intelligible bug report. I can only guess that it has to do with python being inserted between gtkosxapplication and gtk, because it doesn't reproduce in plain C. In any case, so long as it is only a message that doesn't interfere with orderly shutdown (as seems to be the case), I think that it's OK to ignore. Once you bundle the app, it will show up on the Console log where very few users will see it.

Regards,
John Ralls





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]