lilzz
lilzz

Reputation: 5413

Debugging the EXEC_BAD_ACCESS on Iphone using Performance Tool, Allocations

An error is caught, using Zombie CFString Foundation Library
caller {NSPlaceholderMutableString int] Malloc

CFString Foundation Library
caller {NSPlaceholderString initWithFormat:locale} Zombie

well it didn't drop to where I declared. I have no idea where that NSMutablestring is called and which variable it is

Upvotes: 1

Views: 114

Answers (1)

justin
justin

Reputation: 104698

  • Instruments provides an option to record reference counts -- ensure it's enabled.
  • Run your app and reproduce the issue.
  • When Instruments halts the program due to messaging a zombie, it will tell you the address of the zombie.
  • You then locate the address in the list of allocations and view the location it was created, as well as all its ref count ops.

It takes about 2 minutes to spot an issue once you get the hang of it, and can reproduce the problem. Good luck.

Also, 0x8badf00d has recommended "session 311 Advanced Memory analysis with Instruments." below. I've not watched it personally, but it sounds like it would be a great session on the subject.

Upvotes: 1

Related Questions