Re: Weird crash in -[NSSearchField setRecentSearches:]
Re: Weird crash in -[NSSearchField setRecentSearches:]
- Subject: Re: Weird crash in -[NSSearchField setRecentSearches:]
- From: Jerry Krinock <email@hidden>
- Date: Sun, 09 Nov 2014 08:02:50 -0500
> On 2014 Nov 07, at 16:02, Greg Parker <email@hidden> wrote:
>
> You may have better luck tracing it from the other side. Run to that line in appendToRecentSearches:, set a breakpoint on -[NSNotificationCenter postNotificationName:object:userInfo:], and step over your line. At those breakpoints you should be able to see the notification parameters in the parameter registers, assuming the notification is sent every time that line runs.
Great idea, Greg. It worked.
It told me that that setting recent searches in this menu posts 122 notifications, 120 of which are due to building the search field’s popup menu.
• 40 NSMenuDidAddItemNotification, one for each item in the search field’s popup menu
• 20 NSMenuDidChangeItemNotification, which are mixed in with the above, for items that changed.
• 1 NSUserDefaultsDidChangeNotification.
• 1 NSAutosavedRecentsChangedNotification
• 40 NSMenuDidAddItemNotification, same as before.
• 20 NSMenuDidChangeItemNotification, same as before
However, nowhere in *my* code do I directly create an observer of any of those four notification names. So I’m still head-scratching.
If anyone has any idea what disappearing objects in AppKit might be observing these notifications, let us know.
_______________________________________________
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