I'm always getting EXC_BAD_ACCESS, so I look to see which variable is pointing to NULL
and all I see is that one of my variables (sometimes several) has
< parent is NULL >
next to it. The problem is I don't really know what this means and I can't seem to find anything from a google search or anything about it. I'm thinking this means that that is the NULL
variable I'm trying to access, but then the message doesn't make much sense. Anybody know a little more on this?
It simply means the variable is a pointer to an object and the pointer is NULL
.
From the LLDB source:
if (addr == LLDB_INVALID_ADDRESS)
{
m_error.SetErrorString ("parent address is invalid.");
}
else if (addr == 0)
{
m_error.SetErrorString ("parent is NULL");
}
else
...
I too had "parent is NULL" when i printed description of my array object
Thanks to trojanfoe's answer, I was able to see that I was returning my array incorrectly. I simply changed:
- (NSMutableArray *)allItems {
return self.allItems;
}
to:
- (NSMutableArray *)allItems {
return _allItems;
}
Hope this helps!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With