Recently I worked on a project that had a NIB and XIB in it and for some strange reason I was getting a EXC_BAD_ACCESS error message in GDB with NSPopAutoReleasepool being the culprit. The best part about the problem was that the only indicator I had for the call stack was was four question marks ‘????’. That didn’t make too much sense.

Luckily, I came across this posting on cocoadev: click here

The point to the article was how to intelligently look at the error and get a call stack from code that is normally hidden from you in Cocoa. This article shows you how to turn on those extra debugging options so that you can figure out where you are causing the problem.

In my case, I was double-free-ing an object that was already being handled by NSAutoreleasePool.

One Comment

Leave a Reply

Your email address will not be published. Required fields are marked *