Re: NSFontPanel swamping the responder chain (and crashing)
Re: NSFontPanel swamping the responder chain (and crashing)
- Subject: Re: NSFontPanel swamping the responder chain (and crashing)
- From: Quincey Morris <email@hidden>
- Date: Thu, 21 May 2015 04:41:36 +0000
On May 20, 2015, at 19:42 , Graham Cox <email@hidden> wrote:
>
> or even just offer some general advice how to proceed
It looks to me like the problem is that the NSWindowController’s “document” property is still set to the NSDocument object that was just deallocated. I'm surprised to see that the “document” property is ‘assign’ rather than ‘strong’ (guess I never had a reason to look before).
I don’t know if something in the NSDocument or NSWindowController machinery is supposed to set “document” back to nil when the document closes, or when, but apparently the fonts panel is causing traversal of the action event queue in a timing window before that’s occurred. It then crashes because the window controller is trying to make the (non-existent) document look like it’s in the responder chain. This is a stale pointer problem, not an overrelease problem, AFAICT.
You might be able to work around it by forcibly setting “document” to nil in the window controller (say) when the window is closing, though I don’t know what else that might interfere with. Or you could investigate when/if the property is nil’ed under normal circumstances.
_______________________________________________
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