Platform
macOS
Environment
Production
Installed
Swift Package Manager
Version
8.53.1
Xcode Version
26.0
Did it work on previous versions?
No response
Steps to Reproduce
My current guess is that this specific crash is an old AppKit/SwiftUI crash that happens when dragging a window with AppKit/SwiftUI content between 1x and 2x (retina) displays. Drag back and forth quickly to try to reproduce it.
The actual problem reported in this issue is not that specific Apple crash but that it is missing the full stacktrace in Sentry. As I don't see the real stack in Sentry, I am not 100% that's a good way to reproduce it. And we do get the actual stack for that case sometimes.
Expected Result
If my guess is correct, this is what I would expect:
Application Specific Information:
*** Collection <__NSArrayM: 0x600003a96cd0> was mutated while being enumerated.
Thread 0 Crashed:
0 CoreFoundation 0x31f153c94 __exceptionPreprocess
1 libobjc.A.dylib 0x31e7aeb8c objc_exception_throw
2 CoreFoundation 0x31f202988 __NSFastEnumerationMutationHandler
3 AppKit 0x327d716d8 -[NSView(NSConstraintBasedLayoutInternal) _adjustLayoutForResolutionChangeToRetina:]
4 AppKit 0x327d716e8 [inlined] -[NSView(NSConstraintBasedLayoutInternal) _adjustLayoutForResolutionChangeToRetina:]
5 AppKit 0x327d716e8 [inlined] -[NSView(NSConstraintBasedLayoutInternal) _adjustLayoutForResolutionChangeToRetina:]
6 AppKit 0x327d716e8 [inlined] -[NSView(NSConstraintBasedLayoutInternal) _adjustLayoutForResolutionChangeToRetina:]
7 AppKit 0x327d716e8 [inlined] -[NSView(NSConstraintBasedLayoutInternal) _adjustLayoutForResolutionChangeToRetina:]
8 AppKit 0x327d716e8 [inlined] -[NSView(NSConstraintBasedLayoutInternal) _adjustLayoutForResolutionChangeToRetina:]
9 AppKit 0x327d716e8 [inlined] -[NSView(NSConstraintBasedLayoutInternal) _adjustLayoutForResolutionChangeToRetina:]
10 AppKit 0x327d716e8 [inlined] -[NSView(NSConstraintBasedLayoutInternal) _adjustLayoutForResolutionChangeToRetina:]
11 AppKit 0x327d716e8 -[NSView(NSConstraintBasedLayoutInternal) _adjustLayoutForResolutionChangeToRetina:]
12 AppKit 0x327aaa890 -[NSWindow _updateInheritedBackingScaleFactorIfNeeded]
13 AppKit 0x32712fd48 __67-[NSWindow _updateSettingsSendingScreenChangeNotificationToScreen:]_block_invoke
14 AppKit 0x326fb206c NSPerformVisuallyAtomicChange
15 AppKit 0x32712fbac -[NSWindow _updateSettingsSendingScreenChangeNotificationToScreen:]
16 AppKit 0x326fb35b8 -[NSWindow _setFrameCommon:display:fromServer:]
17 AppKit 0x327aa133c -[NSWindow(NSScreenLayout) _setFrame:fromAdjustmentToScreen:anchorIfNeeded:animate:]
18 AppKit 0x32724c488 -[NSWindow _adjustWindowToScreen]
19 AppKit 0x32726bee4 -[NSWindow _displayChangedSoAdjustWindows:]
20 AppKit 0x327df3874 ___NSApplicationPerformScreenInvalidationReactions_block_invoke
21 AppKit 0x326f6b804 -[NSApplication enumerateWindowsWithOptions:usingBlock:]
22 AppKit 0x327df3174 ___NSApplicationReactToScreenInvalidation_block_invoke
23 AppKit 0x327df29b4 _NSApplicationReactToScreenInvalidation
24 AppKit 0x327df2c00 -[NSApplication(ScreenHandling) _reactToDisplayChanges:]
25 AppKit 0x3278a0818 _NSCGSDisplayConfigurationUpdateAndInvokeObservers
26 AppKit 0x3278a0cfc _NSCGSDisplayConfigurationDidReconfigureNotificationHandler
27 SkyLight 0x32b01502c (anonymous namespace)::notify_datagram_handler
28 SkyLight 0x32b422d98 CGSDatagramReadStream::dispatchMainQueueDatagrams
29 SkyLight 0x32b422c5c CGSDatagramReadStream::mainQueueWakeup
30 libdispatch.dylib 0x31ec17b28 _dispatch_call_block_and_release
31 libdispatch.dylib 0x31ec31858 _dispatch_client_callout
32 libdispatch.dylib 0x31ec4eb54 _dispatch_main_queue_drain.cold.5
33 libdispatch.dylib 0x31ec26dac _dispatch_main_queue_drain
34 libdispatch.dylib 0x31ec26ce8 _dispatch_main_queue_callback_4CF
35 CoreFoundation 0x31f120da0 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__
36 CoreFoundation 0x31f0e1a98 __CFRunLoopRun
37 CoreFoundation 0x31f0e0c54 CFRunLoopRunSpecific
38 HIToolbox 0x3365c1278 RunCurrentEventLoopInMode
39 HIToolbox 0x3365c44e4 ReceiveNextEventCommon
Actual Result
This is the stack I see:
Application Specific Information:
Signal 6, Code 0
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x3031c7388 __pthread_kill
1 libsystem_pthread.dylib 0x30323c848 pthread_kill
2 libsystem_c.dylib 0x302fdc9e4 abort
3 MyApp 0x200cfb22c +[SentryCrashExceptionApplicationHelper _crashOnException:]
4 AppKit 0x30b347128 __62+[CATransaction NS_setFlushesWithDisplayLink]_block_invoke
5 AppKit 0x30bd90888 ___NSRunLoopObserverCreateWithHandler_block_invoke
6 CoreFoundation 0x30339bed8 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__
7 CoreFoundation 0x30339bdc0 __CFRunLoopDoObservers
8 CoreFoundation 0x30339b430 __CFRunLoopRun
9 CoreFoundation 0x30339aa98 CFRunLoopRunSpecific
10 HIToolbox 0x31a89727c RunCurrentEventLoopInMode
11 HIToolbox 0x31a89a4e8 ReceiveNextEventCommon
12 HIToolbox 0x31aa25484 _BlockUntilNextEventMatchingListInModeWithFilter
13 AppKit 0x30b224a34 _DPSNextEvent
14 AppKit 0x30bbc3940 -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:]
15 AppKit 0x30b217be4 -[NSApplication run]
16 AppKit 0x30b1ee2dc NSApplicationMain
17 MyApp 0x2001af644 main (main.swift:18)
18 dyld 0x302afab98 <redacted>
Are you willing to submit a PR?
No response
Platform
macOS
Environment
Production
Installed
Swift Package Manager
Version
8.53.1
Xcode Version
26.0
Did it work on previous versions?
No response
Steps to Reproduce
My current guess is that this specific crash is an old AppKit/SwiftUI crash that happens when dragging a window with AppKit/SwiftUI content between 1x and 2x (retina) displays. Drag back and forth quickly to try to reproduce it.
The actual problem reported in this issue is not that specific Apple crash but that it is missing the full stacktrace in Sentry. As I don't see the real stack in Sentry, I am not 100% that's a good way to reproduce it. And we do get the actual stack for that case sometimes.
Expected Result
If my guess is correct, this is what I would expect:
Actual Result
This is the stack I see:
Are you willing to submit a PR?
No response