• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
crash on quit
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

crash on quit


  • Subject: crash on quit
  • From: Robert Clair <email@hidden>
  • Date: Wed, 14 Jan 2004 10:11:13 -0500

My application crashes on Quit in some circumstances. (I'm still on 10.2.6 - I don't want
to update until I finish this rev.) In trying to track this down I have Zombies enabled and
I have subclassed the window that the document uses, overriding retain, release,
autorelease and dealloc. The overridden methods just log the call, provide a place to set a
debugger break and then call super.

The symptoms:

Open a document, Quit the program. - Nothing bad happens, the program exits normally.
dealloc is never called, it seems that everything just cleanly goes away.

but...

Open a document, Close the document, Quit the Program. - The window's dealloc is called when you close the document, but the program crashes when it pops an autorelease pool in the process of quitting. It is trying to send a message to the now-departed window. This happens even if you open and close several other documents - it crashes trying to send a message to the first document's window. (Probably wants to message the others, too, but never gets there.)


The actual message (stack trace is at the bottom of the post):


2004-01-14 09:38:38.447 Zeus[4201] *** *** Selector '_removeFromGroups:' sent to dealloced instance 0x2636280 of class ZGDebugWindow.
Break at '-[_NSZombie methodSignatureForSelector:]' to debug.

I put a break in the window's autorelease routine and checked the stack each time. As far as I can tell I'm not calling autorelease on the window in my own code - all of the calls are under the document's
showWindows routine or on the heartbeat thread.

Clearly I have disturbed the universe somehow, but I haven't a clue where.

Anyone have any thoughts ?

Thanks,

Bob



#0 0x97edfaa8 in -[_NSZombie methodSignatureForSelector:] ()
#1 0x9068c130 in _objc_msgForward ()
#2 0x930cbcd0 in -[NSWindow _setWindowNumber:] ()
#3 0x93133888 in -[NSWindow _termWindowIfOwner] ()
#4 0x930d22f0 in -[NSWindow dealloc] ()
#5 0x90131f64 in CFRelease ()
#6 0x90135688 in CFArrayReplaceValues ()
#7 0x901357cc in CFArrayReplaceValues ()
#8 0x90132084 in CFRelease ()
#9 0x97df221c in NSPopAutoreleasePool ()
#10 0x97e31848 in +[NSAutoreleasePool releaseAllPools] ()
#11 0x931703e8 in -[NSApplication _deallocHardCore:] ()
#12 0x93155a74 in -[NSApplication terminate:] ()
#13 0x930f9cac in -[NSApplication sendAction:to:from:] ()
#14 0x9316ec5c in -[NSMenu performActionForItemAtIndex:] ()
#15 0x931af2fc in -[NSCarbonMenuImpl performActionWithHighlightingForItemAtIndex:] ()
#16 0x930ec730 in _NSHandleCarbonMenuEvent ()
#17 0x9308e22c in _DPSNextEvent ()
#18 0x930a0158 in -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] ()
#19 0x930b1d88 in -[NSApplication run] ()
#20 0x9315fc58 in NSApplicationMain ()
#21 0x00030e1c in main (argc=1, argv=0xbffffab8) at system/main.m:28/Users/rclair/Zeus/
#22 0x00003b20 in _start (argc=1, argv=0xbffffab8, envp=0xbffffac0) at /SourceCache/Csu/Csu-45/crt.c:267/SourceCache/Csu/Csu-45/
#23 0x000039a0 in start ()
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
  • Prev by Date: Re: index of line wrap
  • Next by Date: Re: NSAutoreleasePool
  • Previous by thread: [ANN : my new application is out]
  • Next by thread: Re: NSAutoreleasePool
  • Index(es):
    • Date
    • Thread