How do I diagnose this crash in my macOS Cocoa app? It happened when clicking on my app window after doing something in another application.
0x7fff6a1edef4 - /usr/lib/system/libsystem_platform.dylib : os_unfair_lock_lock
0x7fff32635d24 - /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation : -[NSConcreteAttributedString dealloc]
0x7fff2d40741d - /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit : -[NSStringMeasurementCacheKey dealloc]
0x7fff69ddc5d1 - /usr/lib/system/libcache.dylib : _entry_remove
0x7fff69ddba31 - /usr/lib/system/libcache.dylib : _cache_enforce_limits
0x7fff69ddb507 - /usr/lib/system/libcache.dylib : cache_set_and_retain
0x7fff2ff5c0cf - /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation : -[NSCache setObject:forKey:cost:]
0x7fff2d247093 - /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit : rectForString
[...]
0x7fff2ff8c335 - /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation : CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION
0x7fff2ff8c267 - /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation : __CFRunLoopDoObservers
0x7fff2ff8b805 - /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation : __CFRunLoopRun
0x7fff2ff8ae3e - /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation : CFRunLoopRunSpecific
0x7fff2ebb7abd - /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox : RunCurrentEventLoopInMode
0x7fff2ebb77d5 - /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox : ReceiveNextEventCommon
0x7fff2ebb7579 - /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox : _BlockUntilNextEventMatchingListInModeWithFilter
0x7fff2d1fd039 - /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit : _DPSNextEvent
0x7fff2d1fb880 - /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit : -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:]
0x7fff2d1ed58e - /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit : -[NSApplication run]
0x7fff2d1bf396 - /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit : NSApplicationMain
Native stacktrace - https://developer.apple.com/forums/content/attachment/5dc268ce-e1a2-4457-9c44-a40ba511e790