kingston
kingston

Reputation: 1553

How to trackDown EXC_BAD_ACESS

i m parsing a json in table view.clicking the tableview navigates to nextview.after few clicks the app gets crashed.I have set NSZombieEnabled in my environmental variable and i got this message in my console*** -[NSCFString isEqual:]: message sent to deallocated instance 0x1f31d0 how to trace back which variable exactly i m getting the leak would be great if you guys could help me out.

Upvotes: 0

Views: 76

Answers (1)

Vin
Vin

Reputation: 10548

Did you try enabling the exception breakpoint? You can try tracking that zombie on instruments, the long way:

  1. Run your app on Intruments.

  2. In instruments, select Object allocations tool(automatically selected if you select leaks tool).

  3. Click on the little "i" on top left, within the Allocations tool.

  4. Select "Enable NSZombie detection".

  5. Press the record button and let your app run.

  6. Go through the execution of the app untill it crashes. As soon as there is a crash, you'd see a pop up saying that there was a EXC_BAD_ACCESS. Click on the little -> on the pop up to see the object that has turned into a zombie and the line of code responsible.

Upvotes: 1

Related Questions