Q: How do I find EXC_BAD_ACCESS bugs in a Cocoa project?
A: This kind of problem is usually the result of over-releasing an object. It can be very confusing, since the failure tends to occur well after the mistake is made. The crash can also occur while the program is deep in framework code, often with none of your own code visible in the stack.
Summary
To avoid problems like this, you must follow the Cocoa memory management rules. Refer to ADC's document "Memory Management Programming Guide for Cocoa". The section “Object Ownership and Disposal” describes the primary policy.
http://developer.apple.com/qa/qa2004/qa1367.html
-
