I get EXC_BAD_ACCES
S from starting my program, sometimes if I edi开发者_如何学Pythont the files. It never used to do this until recently when I removed a PNG/PLIST
file from the resource folder (by deleting it). But I did replace it with the same name.
After that whenever I changed my code I get the EXC_BAD_ACCESS
thrown as soon as it gets to the point where it loads those files. (App Delegate out of scope).
However after committing the files via local source control I'm able to run it again without getting the EXC_BAD_ACCESS
. As soon as I edit something else and not commit it, it throws it to me again. I think I mucked up my source control/versioning by deleting that resource file.
Got any ideas?
Solved the problem. I was going to post the code but it'll be hard to decipher since it spans a few classes.
I used Zombie to help me locate the culprit and turns out I was over-releasing one of my dictionary objects. It had nothing to do with those resources (which cleaning fixed), I must've added an extra release while editing the code (prior to cleaning).
A clean build fixed the problem where if I added (even just a comment) to one of my classes it would break the build unless I commit the changes. Thanks Deepak, hopefully this will help someone else out there :).
P.S. sorry for the slow update, I've been quite busy.
精彩评论