3

I am currently debugging a "message sent to deallocated object" error using Instruments. I am able to access the history of the object at fault through a "Zombie Messaged" dialog box.

I want to find a similar object during runtime which is allocated/deallocated correctly and does not fail, and inspect the history of that object to compare what the call tree looks like.

Is there any way to do so? I can print the pointer location of the object that I would like to inspect, but is there any way for me to access the history of that object in Instruments with the pointer location info?

Objects that are loaded using NSKeyedUnarchiver seem to be failing due to an over-release issue while decoding, while objects that are not created that way are okay.

jscs
  • 63,694
  • 13
  • 151
  • 195
randomph
  • 31
  • 1

1 Answers1

0

You can use the Allocations tool in instrument. Search that object's class name on the top right corner and run the Allocations tool at the same time. I used it very often to track when objects are allocated and deallocated.

But be careful about turning on Zombie template tool at the same time. You will notice in Allocations tool that some deallocated objects still show as living objects, because those objects are turned into "zombie" objects. Hope that helps!

Jingjie Zhan
  • 985
  • 8
  • 12