If your app is having mysterious errors and mysterious crashing, try enabling NSZombie. It will basically keep a “zombie” pointer to any object you release. Thus, if your problem is releasing an object that has already been release, enabling NSZombie will help you to debug where in the code this happened.
To enable NSZombie:
- In the menu bar, go to Project>Edit Active Executable
- Click Arguments at the top
- Add a Variable to be set named “NSZombieInfo” with value “YES”
- Make sure the check box is checked
The log will, hopefully, now give a more useful error. Good Luck!
Oh, and don’t forget to uncheck that box. It would be bad news to release an app with a bunch of extra NSZombie pointers.