if(currentCat != nil) {
if ([currentCat hasValidTag]) {...}}
I’m getting an exc_bad_access on second line. retainCount of currentCat is 2 at the moment and there is no autorelease in the stack trace.
The code is triggered by an event and executed eleven times without any problems every twelves run fails (I really don`t know why twelve).
My stack trace:
1. obj_msgSend
2.
3. “the calling method” -> ok
…
So as I understand the object exists is not nil. I can`t see any reason for an bad_access.
Any idea what happens here .
It’s likely that something else in your code is triggering the error – or it may be one of the properties referenced by
hasValidTag. Try doing invoking the static analyser through Product > Analyse. If that doesn’t work then try theZombiesinstrument (Product > Profile).