On Jan 25, 2013, at 7:52 AM, Martin Hewitson <martin.hewit...@aei.mpg.de> wrote:
> 2117  0x10a395410     MHControlsTabBarController      Zombie  -1      
> 03:31.405.789   0       AppKit  -[NSWindow sendEvent:]
> 
> Should I interpret this as a window trying to message the object?  Am I 
> somehow over-reasling? Under ARC, I can't, right? If it's not coming from a 
> window, how can I figure out which object is trying to message this 
> deallocated MHControlsTabBarController? 

First, you should get the full stack trace for the zombie message. That might 
help identify who's doing what. 

One common failure that ARC does not fix is traditional delegates in AppKit and 
other system frameworks. For various reasons those delegates are 
__unsafe_unretained instead of ARC __weak. That means if you forget to clean up 
some delegate somewhere then AppKit's will be left with a dangling pointer. 
Then AppKit tries to use the delegate later and crashes.

Controller objects are often used as delegates so I bet something like this is 
going on. If so, the stack trace of the zombie message will probably show 
AppKit calling -respondsToSelector: or one of the delegate methods on your 
zombified controller object.


-- 
Greg Parker     gpar...@apple.com     Runtime Wrangler



_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to