Re: NSXMLParser, streams, multiple threads, and crashing
Re: NSXMLParser, streams, multiple threads, and crashing
- Subject: Re: NSXMLParser, streams, multiple threads, and crashing
- From: Thomas Davie <email@hidden>
- Date: Sun, 22 Jan 2012 19:01:30 +0000
On 22 Jan 2012, at 18:45, Jens Alfke wrote:
>
> On Jan 22, 2012, at 5:15 AM, Thomas Davie wrote:
>
>> As you can see, none of that is in my code (beyond main), so I have a real problem debugging what's going on here.
>
> Cocoa debugging tip: A crash in objc_msgsend almost always implies a dangling reference to a deallocated object. Usually the dead object is being messaged directly, or sometimes a still-active instance method has accessed one of its instance variables that got overwritten with garbage.
>
> The best response is to go into the scheme editor and turn on zombies and scribbling. Zombies will give you much more detailed information if a dead object is messaged, and scribbling will immediately overwrite freed memory with a 0x55 pattern that’s easily detectable in crashes (if the crash is trying to read memory from address 0x55555555, you can be pretty sure why.)
Thanks Jens,
I received the same advice from #iphonedev on freenode earlier today, and eventually tracked it down to an object being deallocated that was still pointed at as a delegate.
Cheers for your help :)
if (*ra4 != 0xffc78948) { return false; }
_______________________________________________
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