-[CALayer retain]: message sent to deallocated instance

Romain Piel picture Romain Piel · Jul 13, 2010 · Viewed 8.8k times · Source

I'm developing an iphone app and when I turn on my NSZombieEnabled I have regularly a crash on error :

*** -[CALayer retain]: message sent to deallocated instance 0xe6012e0

It always come when I push or pop a view in my view controller. Sometimes there's this error before :

-[UIApplication endIgnoringInteractionEvents] called without matching -beginIgnoringInteractionEvents. Ignoring.

What does it mean? Anyone has a clue or has encountered this problem?

Thank you very much for help!

Romain

Answer

Tony picture Tony · Jul 26, 2011

This likely means you are trying to retain an object a UI object, such as a UIButton, that was released. There are a number of ways to track down this issue but if you can narrow down where this is occurring in your app, I generally start commenting out releases until I see where the problematic release is. My guess is you released something that was autoreleased.