Question

I am using a obj-c port of an open-source library and there seems to be a bug in it. It is very large, and stepping through it is not really an option.

I have been able to figure out that the crash is caused by the following.

-[CALayer release]: message sent to deallocated instance 0x1d847aa0

Is there a way for me to find out where the message originates from or better yet what object hides behind: 0x1d847aa0?

Thanks

Was it helpful?

Solution

You can "Enable Zombie Objects" in the "Diagnostics" tab of the "Edit Scheme ..." setting.

Xcode will then break if a message is sent to an deallocated instance.

You can also profile with Instruments, using the "Zombies" tool, this will display the entire alloc/retain/release history for the zombie object:

enter image description here

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