开发者

EXC_BAD_ACCESS thrown if files are edited, must be committed before running

开发者 https://www.devze.com 2023-03-09 23:20 出处:网络
I get EXC_BAD_ACCESS 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 de

I get EXC_BAD_ACCESS 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消