Can any one guide me with invalid objects created in Objective-C. I am working on iPhone SDK. I see invalid objects created in the application which crashes the application.
Here is a screen shot of how it looks
where as in the log I get Program received signal: “EXC_BAD_ACCESS”.
I require help with the following.
- How are they created.
- How to prevent them.
- How to detect them.

That error means you sent a message to an object that had already been released (in other words, the retain count of some object reached zero, so you’re over-releasing that object somewhere). In Xcode, you can set NSZombieEnabled to YES in your Debug environment; that will make objects that should be released stick around, and then when a zero-count object is messaged, the debugger should break, you’ll get a log entry showing what object was over-released as well as your usual call stack and such.
Make sure to only use NSZombie when you’re trying to find an over-released object.