Skip to content

Crash: SIGABRT during SwiftUI window layout (NSHostingView / Auto Layout) β€” v0.12.0 on macOS 26.5.2Β #381

Description

@aliafshany

Summary

Kaset 0.12.0 (21) crashes with SIGABRT / abort() while laying out the main window. The exception path is entirely in AppKit + SwiftUI (NSHostingView / constraint updates during the display cycle) β€” no app frames appear in the last exception backtrace beyond Kaset_main.

Looks like a layout / constraint update cycle during animated window sizing (NSHostingView.updateAnimatedWindowSize β†’ windowDidLayout β†’ setNeedsUpdateConstraints).

Environment

App Kaset 0.12.0 (21)
Bundle ID com.sertacozercan.Kaset
Path /Applications/Kaset.app
macOS 26.5.2 (25F84)
Hardware Mac14,7 (ARM-64)
Architecture ARM-64 (Native)
SIP Enabled
Crash time 2026-07-15 10:23:15 +0300
Launch time 2026-07-15 10:20:50 +0300 (~2.5 min uptime)
Incident ID 677433A5-F955-4832-B169-A83A5CCB2BFA

Crash details

  • Exception Type: EXC_CRASH (SIGABRT)
  • Termination Reason: Namespace SIGNAL, Code 6, Abort trap: 6
  • Application Specific Information: abort() called
  • Triggered by: Thread 0, main thread (com.apple.main-thread)

Last Exception Backtrace (key frames)

0   CoreFoundation  __exceptionPreprocess
1   libobjc.A.dylib  objc_exception_throw
2   CoreFoundation  +[NSException exceptionWithName:reason:userInfo:]
3   AppKit          -[NSWindow(NSDisplayCycle) _postWindowNeedsUpdateConstraints]
4   AppKit          -[NSView _informContainerThatSubviewsNeedUpdateConstraints]
5   AppKit          -[NSView setNeedsUpdateConstraints:]
6   SwiftUI         NSHostingView.setNeedsUpdate()
7   SwiftUI         NSHostingView.requestUpdate(after:)
...
10  SwiftUI         NSHostingView.invalidateSafeAreaInsets()
11  SwiftUI         NSHostingView.didChangeValue(forKey:)
...
20  AppKit          -[NSView setFrameSize:]
21  AppKit          -[NSThemeFrame setFrameSize:]
22  AppKit          -[NSWindow _oldPlaceWindow:fromServer:]
23  AppKit          -[NSWindow _setFrameCommon:display:fromServer:]
24  SwiftUI         NSHostingView.updateAnimatedWindowSize(_:)
25  SwiftUI         NSHostingView.windowDidLayout()
...
32  AppKit          -[NSWindow(NSConstraintBasedLayoutInternal) layoutIfNeeded]
33  AppKit          __NSWindowGetDisplayCycleObserverForLayout_block_invoke
34  AppKit          NSDisplayCycleObserverInvoke
35  AppKit          NSDisplayCycleFlush
...
56  Kaset           Kaset_main

Thread 0 (crashed) β€” abbreviated

0   libsystem_kernel.dylib  __pthread_kill
1   libsystem_pthread.dylib  pthread_kill
2   libsystem_c.dylib        abort
3   libc++abi.dylib          __abort_message
...
8   libobjc.A.dylib          objc_exception_rethrow
9   AppKit                   __NSWindowGetDisplayCycleObserverForLayout_block_invoke
10  AppKit                   NSDisplayCycleObserverInvoke
11  AppKit                   NSDisplayCycleFlush
...
32  Kaset                    Kaset_main

Other threads present at crash (not crashed): JavaScriptCore scavenger, WebKit/WebCore scrolling, NSURLConnectionLoader, NSEventThread β€” suggests WebKit content may have been active, but the abort is on the AppKit layout path.

Notes / possible cause

This pattern often indicates:

  1. Recursive layout / constraint invalidation during the display cycle (SwiftUI window size animation invalidating safe area / constraints while AppKit is already laying out).
  2. Possibly triggered by window resize, safe-area / toolbar / titlebar changes, or content size that drives updateAnimatedWindowSize.
  3. macOS 26 may surface layout issues that were softer on earlier OS versions.

Steps to reproduce

Not fully known from the crash log alone. Happened ~2.5 minutes after launch while the app was in the foreground. Happy to try specific repro steps if maintainers have ideas (window resize, opening certain views, WebView content, etc.).

Full crash report

Translated crash report (key sections)
-------------------------------------
Translated Report (Full Report Below)
-------------------------------------
Process:             Kaset [37574]
Path:                /Applications/Kaset.app/Contents/MacOS/Kaset
Identifier:          com.sertacozercan.Kaset
Version:             0.12.0 (21)
Code Type:           ARM-64 (Native)
Role:                Foreground
Parent Process:      launchd [1]
Coalition:           com.sertacozercan.Kaset [25042]
User ID:             501

Date/Time:           2026-07-15 10:23:15.8057 +0300
Launch Time:         2026-07-15 10:20:50.7922 +0300
Hardware Model:      Mac14,7
OS Version:          macOS 26.5.2 (25F84)
Release Type:        User

Crash Reporter Key:  EAD8D529-1116-2F75-01C1-24B973AE4BCB
Incident Identifier: 677433A5-F955-4832-B169-A83A5CCB2BFA

Sleep/Wake UUID:       BA52293D-0668-4B04-B5A6-F7CA4E0809E2

Time Awake Since Boot: 230000 seconds
Time Since Wake:       2359 seconds

System Integrity Protection: enabled

Triggered by Thread: 0, Dispatch Queue: com.apple.main-thread

Exception Type:    EXC_CRASH (SIGABRT)
Exception Codes:   0x0000000000000000, 0x0000000000000000

Termination Reason:  Namespace SIGNAL, Code 6, Abort trap: 6
Terminating Process: Kaset [37574]

Application Specific Information:
abort() called

Last Exception Backtrace:
0   CoreFoundation                           0x1874551b4 __exceptionPreprocess + 164
1   libobjc.A.dylib                          0x186ede91c objc_exception_throw + 88
2   CoreFoundation                           0x1874550b0 +[NSException exceptionWithName:reason:userInfo:] + 0
3   AppKit                                   0x18c4703d0 -[NSWindow(NSDisplayCycle) _postWindowNeedsUpdateConstraints] + 1716
4   AppKit                                   0x18b82ef3c -[NSView _informContainerThatSubviewsNeedUpdateConstraints] + 64
5   AppKit                                   0x18b82eec0 -[NSView setNeedsUpdateConstraints:] + 468
6   SwiftUI                                  0x1bc8ea580 NSHostingView.setNeedsUpdate() + 176
7   SwiftUI                                  0x1bc8fdd5c NSHostingView.requestUpdate(after:) + 676
8   SwiftUICore                              0x234cde9e8 closure #1 in ViewGraphRootValueUpdater.invalidateProperties(_:mayDeferUpdate:) + 228
9   SwiftUICore                              0x234cddb54 ViewGraphRootValueUpdater.invalidateProperties(_:mayDeferUpdate:) + 192
10  SwiftUI                                  0x1bc8eb580 NSHostingView.invalidateSafeAreaInsets() + 288
11  SwiftUI                                  0x1bc8fecbc NSHostingView.didChangeValue(forKey:) + 228
12  SwiftUI                                  0x1bc8fee20 @objc NSHostingView.didChangeValue(forKey:) + 68
13  CoreFoundation                           0x1873adab4 __CFSetApplyFunction_block_invoke + 28
14  CoreFoundation                           0x1873ad8e4 CFBasicHashApply + 144
15  CoreFoundation                           0x1873ad824 CFSetApplyFunction + 228
16  AppKit                                   0x18c7a5110 __reusableDependencyContextForKey_block_invoke + 140
17  CoreFoundation                           0x1873adab4 __CFSetApplyFunction_block_invoke + 28
18  CoreFoundation                           0x1873ad8e4 CFBasicHashApply + 144
19  CoreFoundation                           0x1873ad824 CFSetApplyFunction + 228
20  AppKit                                   0x18b83e898 -[NSView setFrameSize:] + 644
21  AppKit                                   0x18b857a60 -[NSThemeFrame setFrameSize:] + 264
22  AppKit                                   0x18b8573a0 -[NSWindow _oldPlaceWindow:fromServer:] + 612
23  AppKit                                   0x18b856868 -[NSWindow _setFrameCommon:display:fromServer:] + 1876
24  SwiftUI                                  0x1bc8f72a4 NSHostingView.updateAnimatedWindowSize(_:) + 152
25  SwiftUI                                  0x1bc8e56d8 NSHostingView.windowDidLayout() + 300
26  SwiftUI                                  0x1bc8f74dc @objc NSHostingView.windowDidLayout() + 28
27  CoreFoundation                           0x1873db9bc __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 148
28  CoreFoundation                           0x18746808c ___CFXRegistrationPost_block_invoke + 92
29  CoreFoundation                           0x187467fd0 _CFXRegistrationPost + 440
30  CoreFoundation                           0x1873aa3d0 _CFXNotificationPost + 740
31  Foundation                               0x188bdf4a4 -[NSNotificationCenter postNotificationName:object:userInfo:] + 88
32  AppKit                                   0x18c81c798 -[NSWindow(NSConstraintBasedLayoutInternal) layoutIfNeeded] + 272
33  AppKit                                   0x18b8b7e60 __NSWindowGetDisplayCycleObserverForLayout_block_invoke + 364
34  AppKit                                   0x18b8b7364 NSDisplayCycleObserverInvoke + 168
35  AppKit                                   0x18b8b6fe0 NSDisplayCycleFlush + 656
36  QuartzCore                               0x191417da8 CA::Transaction::run_commit_handlers(CATransactionPhase) + 120
37  QuartzCore                               0x1914163d0 CA::Transaction::commit() + 316
38  QuartzCore                               0x191614598 CA::Transaction::flush_as_runloop_observer(bool) + 140
39  AppKit                                   0x18c14e054 stepTransactionFlush + 220
40  UpdateCycle                              0x27e6a22f4 UC::DriverCore::continueProcessing() + 84
41  CoreFoundation                           0x1873e6314 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 36
42  CoreFoundation                           0x1873e6210 __CFRunLoopDoObservers + 648
43  CoreFoundation                           0x1874b8194 _CFRunLoopRunSpecificWithOptions + 484
44  HIToolbox                                0x1941cb560 RunCurrentEventLoopInMode + 320
45  HIToolbox                                0x1941ce8bc ReceiveNextEventCommon + 488
46  HIToolbox                                0x19435814c _BlockUntilNextEventMatchingListInMode + 48
47  AppKit                                   0x18bec035c _DPSBlockUntilNextEventMatchingListInMode + 228
48  AppKit                                   0x18b814084 _DPSNextEvent + 576
49  AppKit                                   0x18c3a98b0 -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 688
50  AppKit                                   0x18c3a95bc -[NSApplication(NSEventRouting) nextEventMatchingMask:untilDate:inMode:dequeue:] + 72
51  AppKit                                   0x18b80713c -[NSApplication run] + 368
52  AppKit                                   0x18b7df7b0 NSApplicationMain + 880
53  SwiftUI                                  0x1bc19147c specialized runApp(_:) + 140
54  SwiftUI                                  0x1bc5474a4 runApp<A>(_:) + 104
55  SwiftUI                                  0x1bc813344 static App.main() + 224
56  Kaset                                    0x10221b780 Kaset_main + 64
57  dyld                                     0x186f6be00 start + 6992

Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib                   0x1872ee5e8 __pthread_kill + 8
1   libsystem_pthread.dylib                  0x1873298d8 pthread_kill + 296
2   libsystem_c.dylib                        0x187230644 abort + 148
3   libc++abi.dylib                          0x1872e072c __abort_message + 132
4   libc++abi.dylib                          0x1872cd588 demangling_terminate_handler() + 296
5   libobjc.A.dylib                          0x186ee8894 _objc_terminate() + 156
6   libc++abi.dylib                          0x1872dd75c std::__terminate(void (*)()) + 16
7   libc++abi.dylib                          0x1872cce80 __cxa_rethrow + 188
8   libobjc.A.dylib                          0x186f04940 objc_exception_rethrow + 44
9   AppKit                                   0x18b8b7ec4 __NSWindowGetDisplayCycleObserverForLayout_block_invoke + 464
10  AppKit                                   0x18b8b7364 NSDisplayCycleObserverInvoke + 168
11  AppKit                                   0x18b8b6fe0 NSDisplayCycleFlush + 656
12  QuartzCore                               0x191417da8 CA::Transaction::run_commit_handlers(CATransactionPhase) + 120
13  QuartzCore                               0x1914163d0 CA::Transaction::commit() + 316
14  QuartzCore                               0x191614598 CA::Transaction::flush_as_runloop_observer(bool) + 140
15  AppKit                                   0x18c14e054 stepTransactionFlush + 220
16  UpdateCycle                              0x27e6a22f4 UC::DriverCore::continueProcessing() + 84
17  CoreFoundation                           0x1873e6314 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 36
18  CoreFoundation                           0x1873e6210 __CFRunLoopDoObservers + 648
19  CoreFoundation                           0x1874b8194 _CFRunLoopRunSpecificWithOptions + 484
20  HIToolbox                                0x1941cb560 RunCurrentEventLoopInMode + 320
21  HIToolbox                                0x1941ce8bc ReceiveNextEventCommon + 488
22  HIToolbox                                0x19435814c _BlockUntilNextEventMatchingListInMode + 48
23  AppKit                                   0x18bec035c _DPSBlockUntilNextEventMatchingListInMode + 228
24  AppKit                                   0x18b814084 _DPSNextEvent + 576
25  AppKit                                   0x18c3a98b0 -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 688
26  AppKit                                   0x18c3a95bc -[NSApplication(NSEventRouting) nextEventMatchingMask:untilDate:inMode:dequeue:] + 72
27  AppKit                                   0x18b80713c -[NSApplication run] + 368
28  AppKit                                   0x18b7df7b0 NSApplicationMain + 880
29  SwiftUI                                  0x1bc19147c specialized runApp(_:) + 140
30  SwiftUI                                  0x1bc5474a4 runApp<A>(_:) + 104
31  SwiftUI                                  0x1bc813344 static App.main() + 224
32  Kaset                                    0x10221b780 Kaset_main + 64
33  dyld                                     0x186f6be00 start + 6992

I can attach the full .ips / complete binary images dump if that would help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions