• 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: NSZombieEnabled giving rise to new bug
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSZombieEnabled giving rise to new bug


  • Subject: Re: NSZombieEnabled giving rise to new bug
  • From: Bill Bumgarner <email@hidden>
  • Date: Mon, 12 Oct 2009 09:01:53 -0700


On Oct 12, 2009, at 8:50 AM, Nick Rogers wrote:

2009-10-12 20:28:53.651 My Program[33987:6263] *** -[CFArray count]: message sent to deallocated instance 0x1149a9310
[Switching to process 33987]
[Switching to process 33987]
sharedlibrary apply-load-rules all
2009-10-12 20:29:03.917 My Program[33987:6263] *** NSInvocation: warning: object 0x1149a9310 of class '_NSZombie_CFArray' does not implement methodSignatureForSelector: -- trouble ahead
2009-10-12 20:29:03.918 My Program[33987:6263] *** NSInvocation: warning: object 0x1149a9310 of class '_NSZombie_CFArray' does not implement doesNotRecognizeSelector: -- abort
kill
quit


The code is so complex and its also hard to reach the point where I'm doing the wrong -[CFArray count].
Is it possible to some how to get it automatically stop at [CFArray count] OR is it possible to set a breakpoint at all [CFArray count] in Xcode or in .gdbinit.

That won't necessarily help you. By the time the -count message is sent the damage was done long ago. Zombies help by giving you the address of the object that went bad earlier. What you need to examine are all of the retain/release events that occurred at that address prior.


To do this, you can use the ObjectAlloc Instrument in Instruments. Turn on Zombie tracking and then have a look at the zombie object's address in the instrument.

There are cases, though, where Instruments won't work for this. In that case, set the MallocStackLoggingNoCompact environment variable to 1 and then run your application. When you find the 'message sent to deallocated instance' address, use 'malloc_history PID ADDR' at the command line to see a history of all events at that address. Or, in gdb, 'info malloc ADDR'.

b.bum

_______________________________________________

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


  • Follow-Ups:
    • Re: NSZombieEnabled giving rise to new bug
      • From: Wyatt Webb <email@hidden>
References: 
 >NSZombieEnabled giving rise to new bug (From: Nick Rogers <email@hidden>)

  • Prev by Date: Re: NSZombieEnabled giving rise to new bug
  • Next by Date: Bindings Driving Me CRAZY. :'(
  • Previous by thread: Re: NSZombieEnabled giving rise to new bug
  • Next by thread: Re: NSZombieEnabled giving rise to new bug
  • Index(es):
    • Date
    • Thread