• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Weird crash in -[NSSearchField setRecentSearches:]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Weird crash in -[NSSearchField setRecentSearches:]
      • From: Lee Ann Rucker <email@hidden>
References: 
 >Weird crash in -[NSSearchField setRecentSearches:] (From: Jerry Krinock <email@hidden>)
 >Re: Weird crash in -[NSSearchField setRecentSearches:] (From: Quincey Morris <email@hidden>)
 >Re: Weird crash in -[NSSearchField setRecentSearches:] (From: Jerry Krinock <email@hidden>)
 >Re: Weird crash in -[NSSearchField setRecentSearches:] (From: Greg Parker <email@hidden>)
 >Re: Weird crash in -[NSSearchField setRecentSearches:] (From: Jerry Krinock <email@hidden>)
 >Re: Weird crash in -[NSSearchField setRecentSearches:] (From: Greg Parker <email@hidden>)

  • Prev by Date: NSSplitView parallel motion
  • Next by Date: Re: NSSplitView parallel motion
  • Previous by thread: Re: Weird crash in -[NSSearchField setRecentSearches:]
  • Next by thread: Re: Weird crash in -[NSSearchField setRecentSearches:]
  • Index(es):
    • Date
    • Thread