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 07:45:29 +0000
On May 21, 2015, at 00:18 , Graham Cox <email@hidden> wrote:
>
> How did you determine that it’s this property that is stale?
Er, I think it was a deduction. The crash occurs during traversal of the responder chain (apparently), and it’s got as far as the window controller without crashing, and the document is next, but the document isn't “really” in the responder chain, so this private ‘supplementalTargetForAction:sender:’ looks like it must be what fakes this up, and the only reference the window controller has to the document is “document”, and the “document” property is unsafe_unretained, which would be an incredible coincidence otherwise. I guess it’s more of a guess than a deduction, but I can’t think of any better explanation of why it would crash exactly here.
If the responder chain traversal knew about the document from somewhere else, I’d expect the ‘supplementalTargetForAction:sender:’ to be unnecessary. Or if the ‘supplementalTargetForAction:sender:’ was for another purpose, I would expect no crash there.
> Well, trouble is because the Font Panel is calling through this on every single event, it’s breaking all the time.
Oh, yeah, I didn’t think of that. Perhaps you can leave the breakpoint disabled until you hit another breakpoint at a close method, or something like that. Or live dangerously and override ‘supplementalTargetForAction:sender:’?
> I thought I’d add an action to ‘po self’ but that doesn’t work - self isn’t recognised at this level.
I guess you’d need to po one of the registers, but I don’t know which one.
_______________________________________________
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