Re: “EXC_BAD_ACCESS” object is not nil but not accessible
Re: “EXC_BAD_ACCESS” object is not nil but not accessible
- Subject: Re: “EXC_BAD_ACCESS” object is not nil but not accessible
- From: Ken Thomases <email@hidden>
- Date: Sun, 16 Jan 2011 22:49:17 -0600
On Jan 16, 2011, at 10:37 PM, Marco Frisan wrote:
> I verified with Instruments - Leaks the version available on the provided link (since I modified my local copy) and the result is that I have no memory leak.
A leak is when something is under-released. The most likely culprit in your case is something that is over-relaesed. In other words, you have used the wrong tool to investigate. You should have used the Zombies instrument as was previously suggested.
> And, surprise! _attributes points to a NSEvent instance!!!
Again, this is precisely a symptom of over-releasing (or, equivalently, failure to retain) an object. That object has been deallocated and some other object now occupies that memory location.
> Using the debugger I discovered that attributesOfItemAtPath:error: does not return a simple NSDictionary, but an instance of NSFileAttributes, a private class that is probably a subclass of NSDictionary. I am inclined to think that the cause of this unpredictable behavior could be the way NSFileAttributes is implemented.
To this I say: http://boredzo.org/blog/archives/2010-11-13/four-rules-of-debugging
Regards,
Ken
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden