Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>For any EXC_BAD_ACCESS errors, you are usually trying to send a message to a released object. The <strong>BEST</strong> way to track these down is use <a href="http://www.cocoadev.com/index.pl?NSZombieEnabled" rel="noreferrer">NSZombieEnabled</a>.</p> <p>This works by never actually releasing an object, but by wrapping it up as a "zombie" and setting a flag inside it that says it normally would have been released. This way, if you try to access it again, it still know what it was before you made the error, and with this little bit of information, you can usually backtrack to see what the issue was.</p> <p>It especially helps in background threads when the Debugger sometimes craps out on any useful information.</p> <p><strong>VERY IMPORTANT TO NOTE</strong> however, is that you need to 100% make sure this is only in your debug code and not your distribution code. Because nothing is ever released, your app will leak and leak and leak. To remind me to do this, I put this log in my appdelegate:</p> <pre><code>if(getenv("NSZombieEnabled") || getenv("NSAutoreleaseFreedObjectCheckEnabled")) NSLog(@"NSZombieEnabled/NSAutoreleaseFreedObjectCheckEnabled enabled!"); </code></pre> <p>If you need help finding the exact line, Do a Build-and-Debug (<strong>CMD-Y</strong>) instead of a Build-and-Run (<strong>CMD-R</strong>). When the app crashes, the debugger will show you exactly which line and in combination with NSZombieEnabled, you should be able to find out exactly why.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload