On May 21, 2015, at 00:18 , Graham Cox <graham....@bigpond.com> 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 (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