Hi,
I have noticed a major uptick in crash reports, ever since I updated my app for macOS Sequoia. All of them have to do with NSOutlineView, and they all have a similar internal API in the crash log, which shows that the issue is something to do with the framework. They all have references to NSConcreteMapTable
and _TtCs12_SwiftObject isEqual
.
The issue isn't reproducible, but it's reported by many different users, all on macOS15+, and it was never an issue with macOS14 or below, so I'm not sure what to do about it.
Here's a couple of examples of the new crash reports:
Date/Time: 2024-10-29T06:55:19.999Z
Launch Time: 2024-10-29T06:50:08Z
OS Version: Mac OS X 15.0.1 (24A348)
Report Version: 104
Exception Type: SIGTRAP
Exception Codes: TRAP_BRKPT at 0x1a98c9c90
Crashed Thread: 0
Thread 0 Crashed:
0 libswiftCore.dylib 0x00000001a98c9c90 -[_TtCs12_SwiftObject isEqual:] + 240
1 Foundation 0x0000000199ad4e0c probeGC + 408
2 Foundation 0x0000000199b01e6c -[NSConcreteMapTable removeObjectForKey:] + 76
3 AppKit 0x000000019c5966a8 _NSOVFreeRowEntry + 44
4 AppKit 0x000000019c5965c4 _NSOVRecursiveFreeChildrenAndItem + 100
5 AppKit 0x000000019c59649c _NSOVFastRemoveChildRowEntries + 260
6 AppKit 0x000000019c595d40 -[NSOutlineView reloadItem:reloadChildren:] + 1016
7 MyApp 0x0000000104b454fc CJ_CRM.MacCJSidebarViewController.compareContactsDictionariesForPublicGroups() -> () (MacCJSidebarViewController.swift:1611)
8 MyApp 0x0000000104b44518 $s20MyApp26MacCJSidebarViewControllerC27contactsChangedNotificationyySo14NSNotificationCFySo7NSTimerCYbcfU_ (MacCJSidebarViewController.swift:461)
9 MyApp 0x0000000104ba5310 $sSo7NSTimerCIeghg_ABIeyBhy_TR (<compiler-generated>:0)
10 Foundation 0x0000000199b64cfc __NSFireTimer + 100
11 CoreFoundation 0x0000000198988184 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 28
12 CoreFoundation 0x0000000198987e28 __CFRunLoopDoTimer + 1008
13 CoreFoundation 0x0000000198987938 __CFRunLoopDoTimers + 352
14 CoreFoundation 0x000000019896d0f0 __CFRunLoopRun + 1852
15 CoreFoundation 0x000000019896c334 CFRunLoopRunSpecific + 568
16 HIToolbox 0x00000001a3da50cc RunCurrentEventLoopInMode + 288
17 HIToolbox 0x00000001a3daaebc ReceiveNextEventCommon + 632
18 HIToolbox 0x00000001a3dab020 _BlockUntilNextEventMatchingListInModeWithFilter + 72
19 AppKit 0x000000019c4b0a70 _DPSNextEvent + 656
20 AppKit 0x000000019cdd67b8 -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 684
21 AppKit 0x000000019c4a3b7c -[NSApplication run] + 476
22 AppKit 0x000000019c47a44c NSApplicationMain + 884
23 MyApp 0x0000000104a1e26c main (main.m:24)
24 ??? 0x0000000198504274 0x0 + 0
Another one with a different trigger but same internal API:
Date/Time: 2024-10-29T16:49:12.999Z
Launch Time: 2024-10-29T15:51:27Z
OS Version: Mac OS X 15.1 (24B83)
Report Version: 104
Exception Type: SIGSEGV
Exception Codes: SEGV_MAPERR at 0x4cde11282080
Crashed Thread: 0
Thread 0 Crashed:
0 libswiftCore.dylib 0x00000001a04efa1c isSubclass(swift::TargetMetadata<swift::InProcess> const*, swift::TargetMetadata<swift::InProcess> const*) + 28
1 libswiftCore.dylib 0x00000001a04ef9f8 _swift_class_isSubclass + 12
2 libswiftCore.dylib 0x00000001a04ffa9c -[_TtCs12_SwiftObject isEqual:] + 252
3 Foundation 0x00000001906b4cec probeGC + 408
4 Foundation 0x00000001906b4adc -[NSConcreteMapTable objectForKey:] + 64
5 AppKit 0x00000001930f8eec -[NSOutlineView _rowEntryForItem:requiredRowEntryLoadMask:] + 48
6 AppKit 0x00000001930f8e80 -[NSOutlineView parentForItem:] + 24
7 MyApp 0x0000000100e2faec MyApp.MacCJSidebarViewController.outlineView(_: __C.NSOutlineView, selectionIndexesForProposedSelection: Foundation.IndexSet) -> Foundation.IndexSet (MacCJSidebarViewController.swift:759)
8 MyApp 0x0000000100e30dbc @objc MyApp.MacCJSidebarViewController.outlineView(_: __C.NSOutlineView, selectionIndexesForProposedSelection: Foundation.IndexSet) -> Foundation.IndexSet (<compiler-generated>:0)
9 AppKit 0x000000019324c4e4 -[NSTableView _userSelectableRowIndexesForProposedSelection:userCanAlreadyChangeSelection:] + 288
10 AppKit 0x00000001933176c4 -[NSTableView _userSelectRowIndexes:withNewSelectedRow:] + 140
11 AppKit 0x00000001933175a0 -[NSTableView _userSelectSingleRow:] + 76
12 AppKit 0x0000000193315c8c -[NSTableView mouseDown:] + 2536
13 AppKit 0x0000000193315120 -[NSOutlineView mouseDown:] + 72
14 MyApp 0x0000000100dabb38 -[CustomNSOutlineView mouseDown:] (CustomNSOutlineView.m:180)
15 AppKit 0x000000019320d98c forwardMethod + 248
16 AppKit 0x000000019320d98c forwardMethod + 248
17 AppKit 0x0000000193213518 -[NSWindow(NSEventRouting) _handleMouseDownEvent:isDelayedEvent:] + 3668
18 AppKit 0x000000019319f00c -[NSWindow(NSEventRouting) _reallySendEvent:isDelayedEvent:] + 380
19 AppKit 0x000000019319ecbc -[NSWindow(NSEventRouting) sendEvent:] + 280
20 AppKit 0x00000001939b6bf0 -[NSApplication(NSEventRouting) sendEvent:] + 1652
21 AppKit 0x00000001935c489c -[NSApplication _handleEvent:] + 56
22 AppKit 0x000000019306ab08 -[NSApplication run] + 516
23 AppKit 0x0000000193041364 NSApplicationMain + 884
24 MyApp 0x0000000100d0626c main (main.m:24)
25 ??? 0x000000018f0e4274 0x0 + 0
I just created a Feedback FB15625970. Please let me know if this is a known issue, and/or if there's any ideas out there on how I can do to avoid this. It's causing a lot of instability in my app, that wasn't there before macOS15, so something changed in the internal APIs, and hopefully there's a way to work around it.