Environment
- cmux 0.64.17 (97) — crash also reproduces identically on 0.64.17-nightly.2914190390601 (downloaded today)
- macOS 27.0 beta (26A5378j), Mac16,7 (arm64)
- Multi-display setup (built-in 2056×1289 + external 5120×1409)
Summary
cmux crashes ~1 s after launch with EXC_BREAKPOINT via +[NSApplication _crashOnException:]. The underlying uncaught ObjC exception is thrown by CoreUI in -[CUINamedVectorGlyph _rasterizeImageUsingScaleFactor:forTargetSize:renderingMode:colorResolver:] while SwiftUI renders SF Symbols during the first layout pass of the session-restore main window:
AppDelegate.createMainWindow(…sessionWindowSnapshot:…) → makeKeyAndOrderFront → -[NSWindow _setUpFirstResponderBeforeBecomingVisible] → NSHostingView.layout → renderVectorGlyph → CoreUI throw.
The interesting part: it is deterministic, gated on launch activation
15 launches on the same machine, same morning:
| Launch method |
Result |
| Finder/Dock icon (double-click) |
crash 6/6 |
AppleScript applet wrapping open -g -a cmux (with and without a 3 s detached delay) |
crash 4/4 |
open -g -a cmux typed in a terminal that stays frontmost |
survives 5/5 |
Independent of time since wake (one crash cluster at wakeTime: 4211 s, another at 4998 s, successful launches in between and after).
Observed behavior in the applet case: the applet exits, and focus then lands "by itself" on the half-started cmux — i.e. cmux self-activates during bootstrap (consistent with #3215 and #3347). Whenever macOS grants that self-activation (any GUI-initiated launch), the restore window's first symbol-heavy layout runs in the key/visible configuration and CoreUI throws. When macOS denies it (an actively used terminal stays frontmost), the same code path completes fine. This looks directly related to the activation-vs-window-ordering handling in Sources/App/MainWindowVisibilityController.swift (ActivationTiming, respectActivationSuppression).
Not state-related
Prior art
Crash backtrace (excerpt)
Application Specific Backtrace (0.64.17 (97), 26A5378j)
0 CoreFoundation __exceptionPreprocess + 176
1 libobjc.A.dylib objc_exception_throw + 88
2 Foundation -[NSCalendarDate initWithCoder:] + 0 (symbolication artifact)
3 CoreUI -[CUINamedVectorGlyph _rasterizeImageUsingScaleFactor:forTargetSize:renderingMode:colorResolver:] + 184
4 CoreUI __64-[CUINamedVectorGlyph _imageForRenderingMode:withColorResolver:]_block_invoke + 1316
7 CoreUI -[CUINamedVectorGlyph image] + 124
8 RenderBox RB::Symbol::Presentation::template_image() + 540
10 SwiftUICore _ShapeStyle_RenderedContext.renderVectorGlyph(...) + 436
22 SwiftUICore GraphHost.flushTransactions() + 864
25 SwiftUI NSHostingView.layout + 484
48 AppKit -[NSView layoutSubtreeIfNeeded] + 96
51 AppKit -[NSWindow _setUpFirstResponderBeforeBecomingVisible] + 68
52 AppKit -[NSWindow _doWindowWillBeVisibleAsSheet:] + 112
56 AppKit -[NSWindow makeKeyAndOrderFront:] + 40
57 cmux AppDelegate.createMainWindow(initialWorkspaceTitle:...sessionWindowSnapshot:...shouldActivate:...) + 14304
58 cmux AppDelegate.ensureInitialMainWindowIfNeeded(shouldActivate:suppressWelcome:) + 1076
59 cmux AppDelegate.bootstrapInitialMainWindowIfNeeded(debugSource:shouldActivate:suppressWelcome:) + 132
60 cmux closure #1 in AppDelegate.scheduleInitialMainWindowBootstrap(debugSource:) + 196
Full .ips reports (10 crashes, release + nightly) available on request.
Happy to test a fix build or a nightly — this machine reproduces the crash 100% reliably via icon launch.
Environment
Summary
cmux crashes ~1 s after launch with
EXC_BREAKPOINTvia+[NSApplication _crashOnException:]. The underlying uncaught ObjC exception is thrown by CoreUI in-[CUINamedVectorGlyph _rasterizeImageUsingScaleFactor:forTargetSize:renderingMode:colorResolver:]while SwiftUI renders SF Symbols during the first layout pass of the session-restore main window:AppDelegate.createMainWindow(…sessionWindowSnapshot:…)→makeKeyAndOrderFront→-[NSWindow _setUpFirstResponderBeforeBecomingVisible]→NSHostingView.layout→renderVectorGlyph→ CoreUI throw.The interesting part: it is deterministic, gated on launch activation
15 launches on the same machine, same morning:
open -g -a cmux(with and without a 3 s detached delay)open -g -a cmuxtyped in a terminal that stays frontmostIndependent of time since wake (one crash cluster at
wakeTime: 4211 s, another at4998 s, successful launches in between and after).Observed behavior in the applet case: the applet exits, and focus then lands "by itself" on the half-started cmux — i.e. cmux self-activates during bootstrap (consistent with #3215 and #3347). Whenever macOS grants that self-activation (any GUI-initiated launch), the restore window's first symbol-heavy layout runs in the key/visible configuration and CoreUI throws. When macOS denies it (an actively used terminal stays frontmost), the same code path completes fine. This looks directly related to the activation-vs-window-ordering handling in
Sources/App/MainWindowVisibilityController.swift(ActivationTiming,respectActivationSuppression).Not state-related
defaults read com.cmuxterm.appPrior art
frontmostApplication, breaks focus-follows-mouse #3347 — cmux's self-activation behaviorCrash backtrace (excerpt)
Application Specific Backtrace (0.64.17 (97), 26A5378j)
Full
.ipsreports (10 crashes, release + nightly) available on request.Happy to test a fix build or a nightly — this machine reproduces the crash 100% reliably via icon launch.