Re: [NSMenu _enableItem} crash
Re: [NSMenu _enableItem} crash
- Subject: Re: [NSMenu _enableItem} crash
- From: Fritz Anderson <email@hidden>
- Date: Wed, 04 May 2011 16:06:33 -0500
On 4 May 2011, at 3:36 PM, Tony Cate wrote:
> Most of the time the stack ends with:
>
> 0 objc_msgSend
> 1 stub helpers
> 2 [NSMenu _enableItem]
>
> Occasionally it consists of
> 0 objc_msgSend
> 1 ??? (or a reasonable facsimile)
>
> After reading through some threads on this I thought my validation stuff may be an issue, so I commented it out. It made no difference. Because the crash occurs no matter where on the menu I click, I wondered if I was accidentally releasing the mainMenu. I'm not.
You're most likely dealing with an already-released object that was expected to be alive still. Setting NSZombieEnabled to YES in your executable's environment variables will tell you what the problem object is, if that's the case. Or, run your application with the Object Allocations instrument in the Instruments profiling application, with zombie detection enabled. You can get a history of the pointer, which will tell you much more.
For deeper knowledge, see the famous blog post "So you crashed in objc_msgSend()," <http://www.sealiesoftware.com/blog/archive/2008/09/22/objc_explain_So_you_crashed_in_objc_msgSend.html>
— F
_______________________________________________
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