On May 20, 2015, at 19:42 , Graham Cox <graham....@bigpond.com> 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 (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to