SimplyKiwi
SimplyKiwi

Reputation: 12444

message sent to deallocated instance

I know there are MANY threads that discuss this issue and trust me, I have looked at each and every one of them but none of them solved my issue.

Anyway, in my app I am receiving a message sent to deallocated instance crash. The object address follows that message and I have tried to use instruments without any success.

What I would like to do is how do I properly debug and fix this issue with the latest Xcode (4.4.1). What I would like to know is which line the app crashed on. That way, I can just focus on that one object so I can make sure it is allocated.

Does anyone know how I can do this with the latest Xcode?

Thanks!

Upvotes: 1

Views: 773

Answers (2)

TimD
TimD

Reputation: 8522

Setting an exception breakpoint can sometimes help to zero in on the specific line of your code that is causing a problem. This Apple doc shows you how.

Upvotes: 1

msk
msk

Reputation: 8905

Enable zombie. It should tell you when your code try to send message to deallocated object instance. Problem is you are using a object after it has been released. It could be autoreleased object or object you explicitly released and using after etc. Below image is the screenshot from XCode when you do "Edit Scheme"

enter image description here

Upvotes: 3

Related Questions