Question

I am hoping someone can assist in how to trace a message to a de-allocated instance of [CALayer] when the stack trace does not link back to the source code.

I have enabled Zombie Objects in the Diagnostics of XCode and run it through the Zombie profiling.

The response in XCode is "2013-01-27 22:37:31.506 AdventureA[9695:11303] *** -[CALayer release]: message sent to deallocated instance 0x757b530"

The response from the instruments is: Instruments - Zombie

I am totally at a loss as to how to find out what is causing the issue; I have been looking through the source code for hours...

Was it helpful?

Solution

Ok - found it. There was a UIButton (which, of course, inherits from UIView) that was being instantiated as a buttonWithType and for I was releasing it. D'oh.

The reasons something so obvious became such a pain (for those who may have to deal with the same thing); the problem is that is all sounds so easy in hindsight:

  • I still have no idea why there is no stack trace that allowed me to be able to track where the issue was happening.
  • With no source code being available from the Zombie output I was directed to thinking this was something happening "under the covers"
  • I was looking at the View in place at the time the error was happening when I should have been looking at the previous view which was being affected by the de-allocation.
  • I had been coding since this morning...

OTHER TIPS

Note the two calls to [UIView dealloc] in the caller list. Look at the allocations for UIView objects. You seem to have one with a strange lifecycle.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top