AeroSpace icon indicating copy to clipboard operation
AeroSpace copied to clipboard

Runtime error after changing displays

Open nikitabobko opened this issue 8 months ago • 2 comments

For some time now, I've consistently gotten the error shown below when changing from using an external display to the built-in one or vice versa. To restart aerospace after crashing, I have to force-quit and the re-open it.

Steps to reproduce:

  1. Aerospace running normally when using on an external display (Macbook in clamshell mode)
  2. Lock computer/Turn off external display
  3. Open laptop and use the built-in display

Additional info

##### AeroSpace Runtime Error #####

Please report to:
    https://github.com/nikitabobko/AeroSpace/discussions/categories/potential-bugs
    Please describe what you did to trigger this error

Message: orDie: 
Version: 0.19.2-Beta
Git hash: d246f250468fc9d427a2eb901d56794af7ac6609
refreshSessionEvent: ax(AXResized)
Date: 2025-07-28 21:35:02 +0000
Thread name: 
Is main thread: true
axTaskLocalAppThreadToken: PID: 72607 ID: com.spotify.client
macOS version: Version 14.5 (Build 23F79)
Coordinate: AppBundle/Monitor.swift:93:89 mainMonitor
recursionDetectorDuringTermination: false
cli: false
Monitor count: 1
Displays have separate spaces: true

Stacktrace:
0   AeroSpace                           0x00000001049c57dc $s6Common4dieT_4file4line6column8functionxSS_SSS2iSStlF + 2256
1   AeroSpace                           0x000000010480cf20 $s9AppBundle11mainMonitorAA0D0_pvg + 648
2   AeroSpace                           0x000000010480c990 $s9AppBundle8monitorsSayAA7Monitor_pGvg + 560
3   AeroSpace                           0x0000000104866d94 $sSo7CGPointV9AppBundleE20monitorApproximationAC7Monitor_pvg + 60
4   AeroSpace                           0x000000010483b94c $s9AppBundle9WorkspaceC16workspaceMonitorAA0E0_pvg + 200
5   AeroSpace                           0x00000001047fdeec $s9AppBundle28checkOnFocusChangedCallbacksyyF + 288
6   AeroSpace                           0x0000000104804e80 $s9AppBundle25runRefreshSessionBlocking_16layoutWorkspaces023optimisticallyPreLayoutH0y6Common0dE5EventO_S2btYaKFyyYaKXEfU_yyYaKXEfU_TY1_ + 228
7   AeroSpace                           0x0000000104804b25 $s9AppBundle25runRefreshSessionBlocking_16layoutWorkspaces023optimisticallyPreLayoutH0y6Common0dE5EventO_S2btYaKFyyYaKXEfU_TQ3_ + 1
8   AeroSpace                           0x000000010480a571 $ss9TaskLocalC9withValue_9operation9isolation4file4lineqd__x_qd__yYaKXEScA_pSgYiSSSutYaKlFTwB6Common19RefreshSessionEventOSg_ytTg5017$s9AppBundle25runjk67Blocking_16layoutWorkspaces023optimisticallyPreLayoutH0y6Common0dE5l12O_S2btYaKFyyY6KXEfU_AKS2bTf1nncnnnn_nTQ2_ + 1
9   AeroSpace                           0x0000000104804045 $s9AppBundle25runRefreshSessionBlocking_16layoutWorkspaces023optimisticallyPreLayoutH0y6Common0dE5EventO_S2btYaKFTQ2_ + 1
10  AeroSpace                           0x0000000104804711 $s9AppBundle17runRefreshSession_33optimisticallyPreLayoutWorkspacesy6Common0dE5EventO_SbtFyyYaKcfU_TQ1_ + 1
11  AeroSpace                           0x00000001047a0b81 $s9AppBundle17runRefreshSession_33optimisticallyPreLayoutWorkspacesy6Common0dE5EventO_SbtFyyYaKcfU_TATQ0_ + 1
12  libswift_Concurrency.dylib          0x00000002559af0f9 _ZL23completeTaskWithClosurePN5swift12AsyncContextEPNS_10SwiftErrorE + 1

Originally posted by @JDuffe in https://github.com/nikitabobko/AeroSpace/discussions/1598

nikitabobko avatar Aug 07 '25 08:08 nikitabobko

This sounds like same error I've been seeing for a little while, certainly more prominently since updating aerospace last week. Runtime error collapsed.
Message: orDie: 
Version: 0.19.2-Beta
Git hash: d246f250468fc9d427a2eb901d56794af7ac6609
refreshSessionEvent: ax(AXMoved)
Date: 2025-08-19 08:14:09 +0000
Thread name: 
Is main thread: true
axTaskLocalAppThreadToken: PID: 1037 ID: com.mitchellh.ghostty
macOS version: Version 15.6 (Build 24G84)
Coordinate: AppBundle/Monitor.swift:93:89 mainMonitor
recursionDetectorDuringTermination: false
cli: false
Monitor count: 3
Displays have separate spaces: true

Stacktrace:
0   AeroSpace                           0x000000010478d7dc $s6Common4dieT_4file4line6column8functionxSS_SSS2iSStlF + 2256
1   AeroSpace                           0x00000001045d4f20 $s9AppBundle11mainMonitorAA0D0_pvg + 648
2   AeroSpace                           0x00000001045d4990 $s9AppBundle8monitorsSayAA7Monitor_pGvg + 560
3   AeroSpace                           0x000000010462ed94 $sSo7CGPointV9AppBundleE20monitorApproximationAC7Monitor_pvg + 60
4   AeroSpace                           0x000000010460394c $s9AppBundle9WorkspaceC16workspaceMonitorAA0E0_pvg + 200
5   AeroSpace                           0x00000001045c5eec $s9AppBundle28checkOnFocusChangedCallbacksyyF + 288
6   AeroSpace                           0x00000001045cce80 $s9AppBundle25runRefreshSessionBlocking_16layoutWorkspaces023optimisticallyPreLayoutH0y6Common0dE5EventO_S2btYaKFyyYaKXEfU_yyYaKXEfU_TY1_ + 228
7   AeroSpace                           0x0000000104568b81 $s9AppBundle17runRefreshSession_33optimisticallyPreLayoutWorkspacesy6Common0dE5EventO_SbtFyyYaKcfU_TATQ0_ + 1
8   libswift_Concurrency.dylib          0x0000000273dc2461 $ss9TaskLocalC13withValueImpl_9operation9isolation4file4lineqd__xn_qd__yYaKXEScA_pSgYiSSSutYaKlFTQ1_ + 1
9   libswift_Concurrency.dylib          0x0000000273dc2109 $ss9TaskLocalC9withValue_9operation9isolation4file4lineqd__x_qd__yYaKXEScA_pSgYiSSSutYaKlFTQ1_ + 1
10  AeroSpace                           0x00000001045cc9f1 $s9AppBundle25runRefreshSessionBlocking_16layoutWorkspaces023optimisticallyPreLayoutH0y6Common0dE5EventO_S2btYaKFyyYaKXEfU_TQ1_ + 1
11  AeroSpace                           0x0000000104568b81 $s9AppBundle17runRefreshSession_33optimisticallyPreLayoutWorkspacesy6Common0dE5EventO_SbtFyyYaKcfU_TATQ0_ + 1
12  libswift_Concurrency.dylib          0x0000000273dc2461 $ss9TaskLocalC13withValueImpl_9operation9isolation4file4lineqd__xn_qd__yYaKXEScA_pSgYiSSSutYaKlFTQ1_ + 1
13  libswift_Concurrency.dylib          0x0000000273dc2109 $ss9TaskLocalC9withValue_9operation9isolation4file4lineqd__x_qd__yYaKXEScA_pSgYiSSSutYaKlFTQ1_ + 1
14  AeroSpace                           0x00000001045cbf59 $s9AppBundle25runRefreshSessionBlocking_16layoutWorkspaces023optimisticallyPreLayoutH0y6Common0dE5EventO_S2btYaKFTQ1_ + 1
15  AeroSpace                           0x00000001045cc711 $s9AppBundle17runRefreshSession_33optimisticallyPreLayoutWorkspacesy6Common0dE5EventO_SbtFyyYaKcfU_TQ1_ + 1
16  AeroSpace                           0x0000000104568b81 $s9AppBundle17runRefreshSession_33optimisticallyPreLayoutWorkspacesy6Common0dE5EventO_SbtFyyYaKcfU_TATQ0_ + 1
17  libswift_Concurrency.dylib          0x0000000273df683d _ZL23completeTaskWithClosurePN5swift12AsyncContextEPNS_10SwiftErrorE + 1

michaeldyrynda avatar Aug 19 '25 23:08 michaeldyrynda

+1 same errors for the last week or so. Laptop falls asleep and when coming back, this console error message is highlighted and have to force quit the app and restart for it to work:

Message: orDie: 
Version: 0.19.2-Beta
Git hash: d246f250468fc9d427a2eb901d56794af7ac6609
refreshSessionEvent: ax(AXMoved)
Date: 2025-09-03 08:25:25 +0000
Thread name: 
Is main thread: true
axTaskLocalAppThreadToken: PID: 89597 ID: com.microsoft.VSCode
macOS version: Version 15.6 (Build 24G84)
Coordinate: AppBundle/Monitor.swift:93:89 mainMonitor
recursionDetectorDuringTermination: false
cli: false
Monitor count: 2
Displays have separate spaces: true

Stacktrace:
0   AeroSpace                           0x00000001005f97dc $s6Common4dieT_4file4line6column8functionxSS_SSS2iSStlF + 2256
1   AeroSpace                           0x0000000100440f20 $s9AppBundle11mainMonitorAA0D0_pvg + 648
2   AeroSpace                           0x0000000100440990 $s9AppBundle8monitorsSayAA7Monitor_pGvg + 560
3   AeroSpace                           0x000000010049ad94 $sSo7CGPointV9AppBundleE20monitorApproximationAC7Monitor_pvg + 60
4   AeroSpace                           0x000000010046f94c $s9AppBundle9WorkspaceC16workspaceMonitorAA0E0_pvg + 200
5   AeroSpace                           0x0000000100431eec $s9AppBundle28checkOnFocusChangedCallbacksyyF + 288
6   AeroSpace                           0x0000000100438e80 $s9AppBundle25runRefreshSessionBlocking_16layoutWorkspaces023optimisticallyPreLayoutH0y6Common0dE5EventO_S2btYaKFyyYaKXEfU_yyYaKXEfU_TY1_ + 228
7   AeroSpace                           0x00000001003d4b81 $s9AppBundle17runRefreshSession_33optimisticallyPreLayoutWorkspacesy6Common0dE5EventO_SbtFyyYaKcfU_TATQ0_ + 1
8   libswift_Concurrency.dylib          0x000000027de92461 $ss9TaskLocalC13withValueImpl_9operation9isolation4file4lineqd__xn_qd__yYaKXEScA_pSgYiSSSutYaKlFTQ1_ + 1
9   libswift_Concurrency.dylib          0x000000027de92109 $ss9TaskLocalC9withValue_9operation9isolation4file4lineqd__x_qd__yYaKXEScA_pSgYiSSSutYaKlFTQ1_ + 1
10  AeroSpace                           0x00000001004389f1 $s9AppBundle25runRefreshSessionBlocking_16layoutWorkspaces023optimisticallyPreLayoutH0y6Common0dE5EventO_S2btYaKFyyYaKXEfU_TQ1_ + 1
11  AeroSpace                           0x00000001003d4b81 $s9AppBundle17runRefreshSession_33optimisticallyPreLayoutWorkspacesy6Common0dE5EventO_SbtFyyYaKcfU_TATQ0_ + 1
12  libswift_Concurrency.dylib          0x000000027de92461 $ss9TaskLocalC13withValueImpl_9operation9isolation4file4lineqd__xn_qd__yYaKXEScA_pSgYiSSSutYaKlFTQ1_ + 1
13  libswift_Concurrency.dylib          0x000000027de92109 $ss9TaskLocalC9withValue_9operation9isolation4file4lineqd__x_qd__yYaKXEScA_pSgYiSSSutYaKlFTQ1_ + 1
14  AeroSpace                           0x0000000100437f59 $s9AppBundle25runRefreshSessionBlocking_16layoutWorkspaces023optimisticallyPreLayoutH0y6Common0dE5EventO_S2btYaKFTQ1_ + 1
15  AeroSpace                           0x0000000100438711 $s9AppBundle17runRefreshSession_33optimisticallyPreLayoutWorkspacesy6Common0dE5EventO_SbtFyyYaKcfU_TQ1_ + 1
16  AeroSpace                           0x00000001003d4b81 $s9AppBundle17runRefreshSession_33optimisticallyPreLayoutWorkspacesy6Common0dE5EventO_SbtFyyYaKcfU_TATQ0_ + 1
17  libswift_Concurrency.dylib          0x000000027dec683d _ZL23completeTaskWithClosurePN5swift12AsyncContextEPNS_10SwiftErrorE + 1

ollegreen avatar Sep 03 '25 09:09 ollegreen

Fixed in 0.20.0-Beta

nikitabobko avatar Nov 24 '25 22:11 nikitabobko