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: Kyle Sluder <email@hidden>
- Date: Sun, 16 Jan 2011 19:04:02 -0800
On Sun, Jan 16, 2011 at 4:48 PM, Marco Frisan <email@hidden> wrote:
> Yes I know that. The problem is that I am was not able to find which pointer. And the reason I am not able to find it is that the line that cause the application block is:
>
> NSDictionary * attributes = _record.attributes;
>
> inside the numberOfRowsInTableView: method of my custom class VLVolumeDetailsViewController.
>
> I checked with debugger and _record, that points to a VLDiskItemRecord object, is not nil.
> attributes should be not nil too and are retained by the object pointed by _record when they are initialized.
Just because they're not nil doesn't mean they point to valid objects.
The objects might have been freed.
First, make sure you're using Build & Analyze. This will catch many
common memory management errors. If that doesn't find the problem, run
with the Zombies instrument, which will track object allocations and
frees and pinpoint where your object is going away.
It is better to do this rather than assume you have "fixed" the
problem by using -initWithDictionary:copyItems:.
--Kyle Sluder
_______________________________________________
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