• 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
Re: Zombie object being messaged - why?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Zombie object being messaged - why?


  • Subject: Re: Zombie object being messaged - why?
  • From: Greg Parker <email@hidden>
  • Date: Fri, 25 Jan 2013 10:33:31 -0800

On Jan 25, 2013, at 7:52 AM, Martin Hewitson <email@hidden> 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     email@hidden     Runtime Wrangler



_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden

References: 
 >Zombie object being messaged - why? (From: Martin Hewitson <email@hidden>)

  • Prev by Date: Re: Zombie object being messaged - why?
  • Next by Date: Re: Zombie object being messaged - why?
  • Previous by thread: Re: Zombie object being messaged - why?
  • Next by thread: Re: Zombie object being messaged - why?
  • Index(es):
    • Date
    • Thread