Re: How EXC_BAD_ACCESS in objc_msgSend if receiver, parms OK?
Re: How EXC_BAD_ACCESS in objc_msgSend if receiver, parms OK?
- Subject: Re: How EXC_BAD_ACCESS in objc_msgSend if receiver, parms OK?
- From: Jerry Krinock <email@hidden>
- Date: Fri, 17 Feb 2012 14:02:57 -0800
On 2012 Feb 17, at 09:54, Kyle Sluder wrote:
> All that means is that the storage for the object hasn't been overwritten yet.
Thank you, Kyle, and I see what you mean. But also my tests show that the object is still able to respond to messages, which means that it shouldn't have crashed objc_msgSend. No?
> What does NSZombieEnabled say?
Well, as usual, this crash happened when NSZombieEnabled was not active. I've scripted Xcode and the crash conditions, and my script is now testing repeatedly with NSZombieEnabled and friends active.
As to my implied question: Can anything other than a deallocced receiver or deallocced parameter cause a crash in objc_msgSend? I re-read Greg Parker's article on this topic…
http://www.sealiesoftware.com/blog/archive/2008/09/22/objc_explain_So_you_crashed_in_objc_msgSend.html
I would paraphrase Greg's answer as "Usually it's due to a deallocced object, but not always, and in the latter case you're in deep doodoo." I'm hoping to get another crash with zombies on, while I think about the code.
_______________________________________________
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