nikitabobko / AeroSpace

AeroSpace is an i3-like tiling window manager for macOS
https://nikitabobko.github.io/AeroSpace/guide
MIT License
7.56k stars 124 forks source link

"Hiding" windows with resize will crash aerospace if you focus on the hidden window #665

Open XavierLaRochelle opened 2 weeks ago

XavierLaRochelle commented 2 weeks ago

I recently switched to aerospace from Yabai and I was looking for a way to re-implement the "zoom-parent" feature, which makes a node resized to occupy its entire parent node. There's no built-in command for this specific action in Aerospace but there is the "resize" command which I tried to use as a workaround by assigning z = 'resize smart +10000' in my config.

This seemed to be working until I moved focus to the "hidden" window, which results in Aerospace crashing. That is, if I use resize smart +10000 on window 2 in the following layout and later try to focus on window 3, Aerospace stops.

h_tiles
├── window 1
└── v_tiles
    ├── window 2 (resized)
    └── window 3 (implicitly hidden)

I believe this is because aerospace is trying to focus a window that's actually off-screen. I don't know if it qualifies as a bug since it is mentionned in the guide that MacOS doesn't support having windows off-screen but still, if anyone knows a way around this problem, let me know!

nikitabobko commented 2 weeks ago

Can't reproduce. Please provide the crash log from Console.app

XavierLaRochelle commented 2 weeks ago

Here's the full log :

-------------------------------------
Translated Report (Full Report Below)
-------------------------------------

Process:               AeroSpace [27183]
Path:                  /Applications/AeroSpace.app/Contents/MacOS/AeroSpace
Identifier:            bobko.aerospace
Version:               0.15.2-Beta (???)
Code Type:             ARM-64 (Native)
Parent Process:        launchd [1]
User ID:               501

Date/Time:             2024-11-05 17:29:19.6914 -0500
OS Version:            macOS 14.5 (23F79)
Report Version:        12
Anonymous UUID:        C6707B0B-5D46-CDC9-7C85-C863DE9DFCA4

Sleep/Wake UUID:       D3A666E4-865C-49CA-A17D-B5A301E34F38

Time Awake Since Boot: 210000 seconds
Time Since Wake:       33643 seconds

System Integrity Protection: enabled

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_BREAKPOINT (SIGTRAP)
Exception Codes:       0x0000000000000001, 0x00000001048503a8

Termination Reason:    Namespace SIGNAL, Code 5 Trace/BPT trap: 5
Terminating Process:   exc handler [27183]

Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
0   AeroSpace                              0x1048503a8 specialized MoveMouseCommand.run(_:_:) + 1960
1   AeroSpace                              0x10484ff88 specialized MoveMouseCommand.run(_:_:) + 904
2   AeroSpace                              0x10484f848 protocol witness for Command.run(_:_:) in conformance MoveMouseCommand + 68
3   AeroSpace                              0x104825318 Array<A>.runCmdSeq(_:_:) + 884
4   AeroSpace                              0x104879860 onFocusChanged(_:) + 264
5   AeroSpace                              0x1048791c8 checkOnFocusChangedCallbacks() + 648
6   AeroSpace                              0x1048254bc Array<A>.runCmdSeq(_:_:) + 1304
7   AeroSpace                              0x1048625c8 closure #1 in closure #2 in activateMode(_:) + 500
8   AeroSpace                              0x10487f16c specialized refreshSession<A>(startup:forceFocus:body:) + 1264
9   AeroSpace                              0x104a83428 specialized static HotKeysController.handleCarbonEvent(_:) + 336
10  HIToolbox                              0x1a0974444 DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*) + 1232
11  HIToolbox                              0x1a0973844 SendEventToEventTargetInternal(OpaqueEventRef*, OpaqueEventTargetRef*, HandlerCallRec*) + 356
12  HIToolbox                              0x1a0989cd8 SendEventToEventTarget + 40
13  AppKit                                 0x19a24c6c8 -[NSApplication(NSEventRouting) sendEvent:] + 1252
14  AppKit                                 0x199e9a89c -[NSApplication _handleEvent:] + 60
15  AppKit                                 0x199a4b0c0 -[NSApplication run] + 512
16  AppKit                                 0x199a222e0 NSApplicationMain + 880
17  SwiftUI                                0x1c1b96474 0x1c1a8c000 + 1090676
18  SwiftUI                                0x1c22ffe88 0x1c1a8c000 + 8863368
19  SwiftUI                                0x1c26faeb8 0x1c1a8c000 + 13037240
20  AeroSpace                              0x10481ec50 main + 36
21  dyld                                   0x195d920e0 start + 2360

Thread 1::  Dispatch queue: com.apple.root.default-qos
0   libsystem_kernel.dylib                 0x1960e2b44 __accept + 8
1   AeroSpace                              0x104a75d54 Socket.acceptClientConnection(invokeDelegate:) + 452
2   AeroSpace                              0x104888fd8 closure #3 in startUnixSocketServer() + 148
3   AeroSpace                              0x10488b7a8 thunk for @escaping @callee_guaranteed @Sendable () -> () + 28
4   libdispatch.dylib                      0x195f68750 _dispatch_call_block_and_release + 32
5   libdispatch.dylib                      0x195f6a3e8 _dispatch_client_callout + 20
6   libdispatch.dylib                      0x195f6d580 _dispatch_queue_override_invoke + 928
7   libdispatch.dylib                      0x195f7bea8 _dispatch_root_queue_drain + 392
8   libdispatch.dylib                      0x195f7c6b8 _dispatch_worker_thread2 + 156
9   libsystem_pthread.dylib                0x196116fd0 _pthread_wqthread + 228
10  libsystem_pthread.dylib                0x196115d28 start_wqthread + 8

Thread 2:: com.apple.NSEventThread
0   libsystem_kernel.dylib                 0x1960da1f4 mach_msg2_trap + 8
1   libsystem_kernel.dylib                 0x1960ecb24 mach_msg2_internal + 80
2   libsystem_kernel.dylib                 0x1960e2e34 mach_msg_overwrite + 476
3   libsystem_kernel.dylib                 0x1960da578 mach_msg + 24
4   CoreFoundation                         0x1961fa680 __CFRunLoopServiceMachPort + 160
5   CoreFoundation                         0x1961f8f44 __CFRunLoopRun + 1208
6   CoreFoundation                         0x1961f8434 CFRunLoopRunSpecific + 608
7   AppKit                                 0x199b82188 _NSEventThread + 144
8   libsystem_pthread.dylib                0x19611af94 _pthread_start + 136
9   libsystem_pthread.dylib                0x196115d34 thread_start + 8

Thread 3:
0   libsystem_pthread.dylib                0x196115d20 start_wqthread + 0

Thread 4:
0   libsystem_pthread.dylib                0x196115d20 start_wqthread + 0

Thread 5:
0   libsystem_pthread.dylib                0x196115d20 start_wqthread + 0

Thread 6:
0   libsystem_pthread.dylib                0x196115d20 start_wqthread + 0

Thread 7:
0   libsystem_pthread.dylib                0x196115d20 start_wqthread + 0

Thread 8:
0   libsystem_pthread.dylib                0x196115d20 start_wqthread + 0

Thread 9:
0   libsystem_pthread.dylib                0x196115d20 start_wqthread + 0

Thread 0 crashed with ARM Thread State (64-bit):
    x0: 0x000000016b5e2700   x1: 0x000000016b5e2759   x2: 0x0000000000000000   x3: 0x000000016b5e2721
    x4: 0x0000000400000003   x5: 0x0000000000000003   x6: 0x0000000000000000   x7: 0x0000000000000002
    x8: 0x0000000000000000   x9: 0x000000010485043c  x10: 0x000000010484ff64  x11: 0x0000000000000168
   x12: 0x00000001fe009990  x13: 0x1a727e7a46af9eca  x14: 0x7465646279746573  x15: 0x000000000000003e
   x16: 0x000000019614b1a0  x17: 0x00000001ffef5350  x18: 0x0000000000000000  x19: 0x00006000024ab0c0
   x20: 0x000000016b5e2700  x21: 0x0000600002eb8cc0  x22: 0x000060000159bb10  x23: 0x0000000000003708
   x24: 0x0000000000000000  x25: 0x0000000000000000  x26: 0x0000000000000001  x27: 0xd000000000000014
   x28: 0x000000016b5e2760   fp: 0x000000016b5e2820   lr: 0x000000010484ff88
    sp: 0x000000016b5e26e0   pc: 0x00000001048503a8 cpsr: 0x20001000
   far: 0x0000000000000000  esr: 0xf2000001 (Breakpoint) brk 1

Binary Images:
       0x1053d0000 -        0x1053dbfff libobjc-trampolines.dylib (*) <9381bd6d-84a5-3c72-b3b8-88428afa4782> /usr/lib/libobjc-trampolines.dylib
       0x10481c000 -        0x104b2bfff bobko.aerospace (0.15.2-Beta) <3e7318c0-bba4-3f51-9a73-3abcc5d91165> /Applications/AeroSpace.app/Contents/MacOS/AeroSpace
       0x1a0969000 -        0x1a0c2cfff com.apple.HIToolbox (2.1.1) <7db6c397-563f-3756-908c-e25b019a1848> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox
       0x199a1e000 -        0x19ad5afff com.apple.AppKit (6.9) <61f710be-9132-3cc2-883d-066365fba1ad> /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
       0x1c1a8c000 -        0x1c376ffff com.apple.SwiftUI (5.5.8) <71c9cc70-1a85-396b-a92a-c893fe8bd541> /System/Library/Frameworks/SwiftUI.framework/Versions/A/SwiftUI
       0x195d8c000 -        0x195e14a17 dyld (*) <37bbc384-0755-31c7-a808-0ed49e44dd8e> /usr/lib/dyld
               0x0 - 0xffffffffffffffff ??? (*) <00000000-0000-0000-0000-000000000000> ???
       0x196147000 -        0x19614efe7 libsystem_platform.dylib (*) <d5bbfc31-d52a-37d6-a41b-48638113ad4c> /usr/lib/system/libsystem_platform.dylib
       0x1960d9000 -        0x196113ffb libsystem_kernel.dylib (*) <9b8b53f9-e2b6-36df-98e9-28d8fca732f2> /usr/lib/system/libsystem_kernel.dylib
       0x195f66000 -        0x195fadfff libdispatch.dylib (*) <502762ee-7aa7-306c-9dbd-88981a86bb78> /usr/lib/system/libdispatch.dylib
       0x196114000 -        0x196120fff libsystem_pthread.dylib (*) <386b0fc1-7873-3328-8e71-43269fd1b2c7> /usr/lib/system/libsystem_pthread.dylib
       0x19617c000 -        0x196654fff com.apple.CoreFoundation (6.9) <84b539d5-22c9-3f8c-84c8-903e9c7b8d29> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation

External Modification Summary:
  Calls made by other processes targeting this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by all processes on this machine:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0

VM Region Summary:
ReadOnly portion of Libraries: Total=1.1G resident=0K(0%) swapped_out_or_unallocated=1.1G(100%)
Writable regions: Total=1.6G written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=1.6G(100%)

                                VIRTUAL   REGION 
REGION TYPE                        SIZE    COUNT (non-coalesced) 
===========                     =======  ======= 
Accelerate framework               256K        2 
Activity Tracing                   256K        1 
AttributeGraph Data               1024K        1 
CG image                            80K        2 
ColorSync                          592K       29 
CoreAnimation                      256K        5 
CoreGraphics                        48K        3 
Foundation                          16K        1 
Kernel Alloc Once                   32K        1 
MALLOC                             1.6G       90 
MALLOC guard page                  288K       18 
STACK GUARD                       56.2M       10 
Stack                             12.8M       10 
VM_ALLOCATE                        128K        7 
__AUTH                            1429K      260 
__AUTH_CONST                      23.5M      444 
__CTF                               824        1 
__DATA                            10.0M      431 
__DATA_CONST                      22.0M      449 
__DATA_DIRTY                      1297K      140 
__FONT_DATA                          4K        1 
__LINKEDIT                       537.3M        3 
__OBJC_RO                         71.9M        1 
__OBJC_RW                         2199K        1 
__TEXT                           546.5M      466 
dyld private memory                272K        2 
mapped file                      188.8M       26 
shared memory                      864K       13 
===========                     =======  ======= 
TOTAL                              3.0G     2418 

-----------
Full Report
-----------

{"app_name":"AeroSpace","timestamp":"2024-11-05 17:29:21.00 -0500","app_version":"0.15.2-Beta","slice_uuid":"3e7318c0-bba4-3f51-9a73-3abcc5d91165","build_version":"","platform":1,"bundleID":"bobko.aerospace","share_with_app_devs":0,"is_first_party":0,"bug_type":"309","os_version":"macOS 14.5 (23F79)","roots_installed":0,"name":"AeroSpace","incident_id":"807374F7-E183-4788-B6F1-F235B21EFC8D"}
{
  "uptime" : 210000,
  "procRole" : "Default",
  "version" : 2,
  "userID" : 501,
  "deployVersion" : 210,
  "modelCode" : "Mac15,3",
  "coalitionID" : 22205,
  "osVersion" : {
    "train" : "macOS 14.5",
    "build" : "23F79",
    "releaseType" : "User"
  },
  "captureTime" : "2024-11-05 17:29:19.6914 -0500",
  "codeSigningMonitor" : 1,
  "incident" : "807374F7-E183-4788-B6F1-F235B21EFC8D",
  "pid" : 27183,
  "translated" : false,
  "cpuType" : "ARM-64",
  "roots_installed" : 0,
  "bug_type" : "309",
  "procLaunch" : "2024-11-05 11:14:19.9100 -0500",
  "procStartAbsTime" : 4712443853169,
  "procExitAbsTime" : 5252440137757,
  "procName" : "AeroSpace",
  "procPath" : "\/Applications\/AeroSpace.app\/Contents\/MacOS\/AeroSpace",
  "bundleInfo" : {"CFBundleShortVersionString":"0.15.2-Beta","CFBundleIdentifier":"bobko.aerospace"},
  "storeInfo" : {"deviceIdentifierForVendor":"2CB8B2A7-8EB9-5F67-95A3-D7564682884A","thirdParty":true},
  "parentProc" : "launchd",
  "parentPid" : 1,
  "coalitionName" : "bobko.aerospace",
  "crashReporterKey" : "C6707B0B-5D46-CDC9-7C85-C863DE9DFCA4",
  "codeSigningID" : "bobko.aerospace",
  "codeSigningTeamID" : "",
  "codeSigningFlags" : 570425861,
  "codeSigningValidationCategory" : 10,
  "codeSigningTrustLevel" : 4294967295,
  "instructionByteStream" : {"beforePC":"tv\/\/Fx8FAPHgl58a4QMWqiIAgFLjAxiq3WcBlPgDAKrgAgD5sf\/\/Fw==","atPC":"IAAg1OgKQPkBBQCRAACAUiIAgFLjAxeq02cBlPcDAKqAAgD5u\/7\/Fw=="},
  "wakeTime" : 33643,
  "sleepWakeUUID" : "D3A666E4-865C-49CA-A17D-B5A301E34F38",
  "sip" : "enabled",
  "exception" : {"codes":"0x0000000000000001, 0x00000001048503a8","rawCodes":[1,4370793384],"type":"EXC_BREAKPOINT","signal":"SIGTRAP"},
  "termination" : {"flags":0,"code":5,"namespace":"SIGNAL","indicator":"Trace\/BPT trap: 5","byProc":"exc handler","byPid":27183},
  "os_fault" : {"process":"AeroSpace"},
  "extMods" : {"caller":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"system":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"targeted":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"warnings":0},
  "faultingThread" : 0,
  "threads" : [{"triggered":true,"id":2888287,"threadState":{"x":[{"value":6096299776},{"value":6096299865},{"value":0},{"value":6096299809},{"value":17179869187},{"value":3},{"value":0},{"value":2},{"value":0},{"value":4370793532},{"value":4370792292,"symbolLocation":868,"symbol":"specialized MoveMouseCommand.run(_:_:)"},{"value":360},{"value":8556419472,"symbolLocation":55648,"symbol":"InitialAllocationPool"},{"value":1905724655968165578},{"value":8387220255154660723},{"value":62},{"value":6812905888,"symbolLocation":0,"symbol":"_platform_memmove"},{"value":8588841808},{"value":0},{"value":105553154715840},{"value":6096299776},{"value":105553165257920},{"value":105553138924304},{"value":14088},{"value":0},{"value":0},{"value":1},{"value":14987979559889010708},{"value":6096299872}],"flavor":"ARM_THREAD_STATE64","lr":{"value":4370792328},"cpsr":{"value":536875008},"fp":{"value":6096300064},"sp":{"value":6096299744},"esr":{"value":4060086273,"description":"(Breakpoint) brk 1"},"pc":{"value":4370793384,"matchesCrashFrame":1},"far":{"value":0}},"queue":"com.apple.main-thread","frames":[{"imageOffset":213928,"symbol":"specialized MoveMouseCommand.run(_:_:)","symbolLocation":1960,"imageIndex":1},{"imageOffset":212872,"symbol":"specialized MoveMouseCommand.run(_:_:)","symbolLocation":904,"imageIndex":1},{"imageOffset":211016,"symbol":"protocol witness for Command.run(_:_:) in conformance MoveMouseCommand","symbolLocation":68,"imageIndex":1},{"imageOffset":37656,"symbol":"Array<A>.runCmdSeq(_:_:)","symbolLocation":884,"imageIndex":1},{"imageOffset":383072,"symbol":"onFocusChanged(_:)","symbolLocation":264,"imageIndex":1},{"imageOffset":381384,"symbol":"checkOnFocusChangedCallbacks()","symbolLocation":648,"imageIndex":1},{"imageOffset":38076,"symbol":"Array<A>.runCmdSeq(_:_:)","symbolLocation":1304,"imageIndex":1},{"imageOffset":288200,"symbol":"closure #1 in closure #2 in activateMode(_:)","symbolLocation":500,"imageIndex":1},{"imageOffset":405868,"symbol":"specialized refreshSession<A>(startup:forceFocus:body:)","symbolLocation":1264,"imageIndex":1},{"imageOffset":2520104,"symbol":"specialized static HotKeysController.handleCarbonEvent(_:)","symbolLocation":336,"imageIndex":1},{"imageOffset":46148,"symbol":"DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*)","symbolLocation":1232,"imageIndex":2},{"imageOffset":43076,"symbol":"SendEventToEventTargetInternal(OpaqueEventRef*, OpaqueEventTargetRef*, HandlerCallRec*)","symbolLocation":356,"imageIndex":2},{"imageOffset":134360,"symbol":"SendEventToEventTarget","symbolLocation":40,"imageIndex":2},{"imageOffset":8578760,"symbol":"-[NSApplication(NSEventRouting) sendEvent:]","symbolLocation":1252,"imageIndex":3},{"imageOffset":4704412,"symbol":"-[NSApplication _handleEvent:]","symbolLocation":60,"imageIndex":3},{"imageOffset":184512,"symbol":"-[NSApplication run]","symbolLocation":512,"imageIndex":3},{"imageOffset":17120,"symbol":"NSApplicationMain","symbolLocation":880,"imageIndex":3},{"imageOffset":1090676,"imageIndex":4},{"imageOffset":8863368,"imageIndex":4},{"imageOffset":13037240,"imageIndex":4},{"imageOffset":11344,"symbol":"main","symbolLocation":36,"imageIndex":1},{"imageOffset":24800,"symbol":"start","symbolLocation":2360,"imageIndex":5}]},{"id":2888289,"threadState":{"x":[{"value":4},{"value":0},{"value":6096857436},{"value":5685402674},{"value":0},{"value":0},{"value":1},{"value":0},{"value":128},{"value":0},{"value":3},{"value":8555696112,"symbolLocation":1904,"symbol":"_dispatch_root_queues"},{"value":21297},{"value":4294934529},{"value":40},{"value":4294934015},{"value":30},{"value":8727337464},{"value":0},{"value":5685402400},{"value":5685402674},{"value":0},{"value":6096857760},{"value":0},{"value":5685402452},{"value":0},{"value":9223372041228447168},{"value":14987979559889010718},{"value":4373670896}],"flavor":"ARM_THREAD_STATE64","lr":{"value":4373044564},"cpsr":{"value":1610616832},"fp":{"value":6096858528},"sp":{"value":6096857328},"esr":{"value":1442840704,"description":" Address size fault"},"pc":{"value":6812478276},"far":{"value":0}},"queue":"com.apple.root.default-qos","frames":[{"imageOffset":39748,"symbol":"__accept","symbolLocation":8,"imageIndex":8},{"imageOffset":2465108,"symbol":"Socket.acceptClientConnection(invokeDelegate:)","symbolLocation":452,"imageIndex":1},{"imageOffset":446424,"symbol":"closure #3 in startUnixSocketServer()","symbolLocation":148,"imageIndex":1},{"imageOffset":456616,"symbol":"thunk for @escaping @callee_guaranteed @Sendable () -> ()","symbolLocation":28,"imageIndex":1},{"imageOffset":10064,"symbol":"_dispatch_call_block_and_release","symbolLocation":32,"imageIndex":9},{"imageOffset":17384,"symbol":"_dispatch_client_callout","symbolLocation":20,"imageIndex":9},{"imageOffset":30080,"symbol":"_dispatch_queue_override_invoke","symbolLocation":928,"imageIndex":9},{"imageOffset":89768,"symbol":"_dispatch_root_queue_drain","symbolLocation":392,"imageIndex":9},{"imageOffset":91832,"symbol":"_dispatch_worker_thread2","symbolLocation":156,"imageIndex":9},{"imageOffset":12240,"symbol":"_pthread_wqthread","symbolLocation":228,"imageIndex":10},{"imageOffset":7464,"symbol":"start_wqthread","symbolLocation":8,"imageIndex":10}]},{"id":2888321,"name":"com.apple.NSEventThread","threadState":{"x":[{"value":268451845},{"value":21592279046},{"value":8589934592},{"value":262796163940352},{"value":0},{"value":262796163940352},{"value":2},{"value":4294967295},{"value":18446744073709550527},{"value":61187},{"value":0},{"value":1},{"value":61187},{"value":60050},{"value":0},{"value":2199023255552},{"value":18446744073709551569},{"value":8727321344},{"value":0},{"value":4294967295},{"value":2},{"value":262796163940352},{"value":0},{"value":262796163940352},{"value":6099148904},{"value":8589934592},{"value":21592279046},{"value":21592279046},{"value":4412409862}],"flavor":"ARM_THREAD_STATE64","lr":{"value":6812519204},"cpsr":{"value":4096},"fp":{"value":6099148752},"sp":{"value":6099148672},"esr":{"value":1442840704,"description":" Address size fault"},"pc":{"value":6812443124},"far":{"value":0}},"frames":[{"imageOffset":4596,"symbol":"mach_msg2_trap","symbolLocation":8,"imageIndex":8},{"imageOffset":80676,"symbol":"mach_msg2_internal","symbolLocation":80,"imageIndex":8},{"imageOffset":40500,"symbol":"mach_msg_overwrite","symbolLocation":476,"imageIndex":8},{"imageOffset":5496,"symbol":"mach_msg","symbolLocation":24,"imageIndex":8},{"imageOffset":517760,"symbol":"__CFRunLoopServiceMachPort","symbolLocation":160,"imageIndex":11},{"imageOffset":511812,"symbol":"__CFRunLoopRun","symbolLocation":1208,"imageIndex":11},{"imageOffset":508980,"symbol":"CFRunLoopRunSpecific","symbolLocation":608,"imageIndex":11},{"imageOffset":1458568,"symbol":"_NSEventThread","symbolLocation":144,"imageIndex":3},{"imageOffset":28564,"symbol":"_pthread_start","symbolLocation":136,"imageIndex":10},{"imageOffset":7476,"symbol":"thread_start","symbolLocation":8,"imageIndex":10}]},{"id":3242045,"frames":[{"imageOffset":7456,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":10}],"threadState":{"x":[{"value":6097432576},{"value":65915},{"value":6096896000},{"value":0},{"value":409604},{"value":18446744073709551615},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0}],"flavor":"ARM_THREAD_STATE64","lr":{"value":0},"cpsr":{"value":4096},"fp":{"value":0},"sp":{"value":6097432576},"esr":{"value":1442840704,"description":" Address size fault"},"pc":{"value":6812687648},"far":{"value":0}}},{"id":3242946,"frames":[{"imageOffset":7456,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":10}],"threadState":{"x":[{"value":6098006016},{"value":86059},{"value":6097469440},{"value":0},{"value":409604},{"value":18446744073709551615},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0}],"flavor":"ARM_THREAD_STATE64","lr":{"value":0},"cpsr":{"value":4096},"fp":{"value":0},"sp":{"value":6098006016},"esr":{"value":1442840704,"description":" Address size fault"},"pc":{"value":6812687648},"far":{"value":0}}},{"id":3242974,"frames":[{"imageOffset":7456,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":10}],"threadState":{"x":[{"value":6098579456},{"value":18467},{"value":6098042880},{"value":0},{"value":409604},{"value":18446744073709551615},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0}],"flavor":"ARM_THREAD_STATE64","lr":{"value":0},"cpsr":{"value":4096},"fp":{"value":0},"sp":{"value":6098579456},"esr":{"value":1442840704,"description":" Address size fault"},"pc":{"value":6812687648},"far":{"value":0}}},{"id":3242975,"frames":[{"imageOffset":7456,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":10}],"threadState":{"x":[{"value":6099726336},{"value":23323},{"value":6099189760},{"value":0},{"value":409604},{"value":18446744073709551615},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0}],"flavor":"ARM_THREAD_STATE64","lr":{"value":0},"cpsr":{"value":4096},"fp":{"value":0},"sp":{"value":6099726336},"esr":{"value":1442840704,"description":" Address size fault"},"pc":{"value":6812687648},"far":{"value":0}}},{"id":3242976,"frames":[{"imageOffset":7456,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":10}],"threadState":{"x":[{"value":6100299776},{"value":30235},{"value":6099763200},{"value":0},{"value":409604},{"value":18446744073709551615},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0}],"flavor":"ARM_THREAD_STATE64","lr":{"value":0},"cpsr":{"value":4096},"fp":{"value":0},"sp":{"value":6100299776},"esr":{"value":1442840704,"description":" Address size fault"},"pc":{"value":6812687648},"far":{"value":0}}},{"id":3242977,"frames":[{"imageOffset":7456,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":10}],"threadState":{"x":[{"value":6100873216},{"value":23075},{"value":6100336640},{"value":0},{"value":409604},{"value":18446744073709551615},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0}],"flavor":"ARM_THREAD_STATE64","lr":{"value":0},"cpsr":{"value":4096},"fp":{"value":0},"sp":{"value":6100873216},"esr":{"value":1442840704,"description":" Address size fault"},"pc":{"value":6812687648},"far":{"value":0}}},{"id":3242978,"frames":[{"imageOffset":7456,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":10}],"threadState":{"x":[{"value":6101446656},{"value":67915},{"value":6100910080},{"value":0},{"value":409604},{"value":18446744073709551615},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0},{"value":0}],"flavor":"ARM_THREAD_STATE64","lr":{"value":0},"cpsr":{"value":4096},"fp":{"value":0},"sp":{"value":6101446656},"esr":{"value":1442840704,"description":" Address size fault"},"pc":{"value":6812687648},"far":{"value":0}}}],
  "usedImages" : [
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 4382851072,
    "size" : 49152,
    "uuid" : "9381bd6d-84a5-3c72-b3b8-88428afa4782",
    "path" : "\/usr\/lib\/libobjc-trampolines.dylib",
    "name" : "libobjc-trampolines.dylib"
  },
  {
    "source" : "P",
    "arch" : "arm64",
    "base" : 4370579456,
    "CFBundleShortVersionString" : "0.15.2-Beta",
    "CFBundleIdentifier" : "bobko.aerospace",
    "size" : 3211264,
    "uuid" : "3e7318c0-bba4-3f51-9a73-3abcc5d91165",
    "path" : "\/Applications\/AeroSpace.app\/Contents\/MacOS\/AeroSpace",
    "name" : "AeroSpace"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 6989189120,
    "CFBundleShortVersionString" : "2.1.1",
    "CFBundleIdentifier" : "com.apple.HIToolbox",
    "size" : 2899968,
    "uuid" : "7db6c397-563f-3756-908c-e25b019a1848",
    "path" : "\/System\/Library\/Frameworks\/Carbon.framework\/Versions\/A\/Frameworks\/HIToolbox.framework\/Versions\/A\/HIToolbox",
    "name" : "HIToolbox"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 6872489984,
    "CFBundleShortVersionString" : "6.9",
    "CFBundleIdentifier" : "com.apple.AppKit",
    "size" : 20172800,
    "uuid" : "61f710be-9132-3cc2-883d-066365fba1ad",
    "path" : "\/System\/Library\/Frameworks\/AppKit.framework\/Versions\/C\/AppKit",
    "name" : "AppKit",
    "CFBundleVersion" : "2487.60.105"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 7544029184,
    "CFBundleShortVersionString" : "5.5.8",
    "CFBundleIdentifier" : "com.apple.SwiftUI",
    "size" : 30294016,
    "uuid" : "71c9cc70-1a85-396b-a92a-c893fe8bd541",
    "path" : "\/System\/Library\/Frameworks\/SwiftUI.framework\/Versions\/A\/SwiftUI",
    "name" : "SwiftUI",
    "CFBundleVersion" : "5.5.8"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 6808977408,
    "size" : 559640,
    "uuid" : "37bbc384-0755-31c7-a808-0ed49e44dd8e",
    "path" : "\/usr\/lib\/dyld",
    "name" : "dyld"
  },
  {
    "size" : 0,
    "source" : "A",
    "base" : 0,
    "uuid" : "00000000-0000-0000-0000-000000000000"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 6812889088,
    "size" : 32744,
    "uuid" : "d5bbfc31-d52a-37d6-a41b-48638113ad4c",
    "path" : "\/usr\/lib\/system\/libsystem_platform.dylib",
    "name" : "libsystem_platform.dylib"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 6812438528,
    "size" : 241660,
    "uuid" : "9b8b53f9-e2b6-36df-98e9-28d8fca732f2",
    "path" : "\/usr\/lib\/system\/libsystem_kernel.dylib",
    "name" : "libsystem_kernel.dylib"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 6810918912,
    "size" : 294912,
    "uuid" : "502762ee-7aa7-306c-9dbd-88981a86bb78",
    "path" : "\/usr\/lib\/system\/libdispatch.dylib",
    "name" : "libdispatch.dylib"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 6812680192,
    "size" : 53248,
    "uuid" : "386b0fc1-7873-3328-8e71-43269fd1b2c7",
    "path" : "\/usr\/lib\/system\/libsystem_pthread.dylib",
    "name" : "libsystem_pthread.dylib"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 6813106176,
    "CFBundleShortVersionString" : "6.9",
    "CFBundleIdentifier" : "com.apple.CoreFoundation",
    "size" : 5083136,
    "uuid" : "84b539d5-22c9-3f8c-84c8-903e9c7b8d29",
    "path" : "\/System\/Library\/Frameworks\/CoreFoundation.framework\/Versions\/A\/CoreFoundation",
    "name" : "CoreFoundation",
    "CFBundleVersion" : "2503.1"
  }
],
  "sharedCache" : {
  "base" : 6808223744,
  "size" : 4220698624,
  "uuid" : "3406ad1b-2469-30eb-9863-5dce861e6dea"
},
  "vmSummary" : "ReadOnly portion of Libraries: Total=1.1G resident=0K(0%) swapped_out_or_unallocated=1.1G(100%)\nWritable regions: Total=1.6G written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=1.6G(100%)\n\n                                VIRTUAL   REGION \nREGION TYPE                        SIZE    COUNT (non-coalesced) \n===========                     =======  ======= \nAccelerate framework               256K        2 \nActivity Tracing                   256K        1 \nAttributeGraph Data               1024K        1 \nCG image                            80K        2 \nColorSync                          592K       29 \nCoreAnimation                      256K        5 \nCoreGraphics                        48K        3 \nFoundation                          16K        1 \nKernel Alloc Once                   32K        1 \nMALLOC                             1.6G       90 \nMALLOC guard page                  288K       18 \nSTACK GUARD                       56.2M       10 \nStack                             12.8M       10 \nVM_ALLOCATE                        128K        7 \n__AUTH                            1429K      260 \n__AUTH_CONST                      23.5M      444 \n__CTF                               824        1 \n__DATA                            10.0M      431 \n__DATA_CONST                      22.0M      449 \n__DATA_DIRTY                      1297K      140 \n__FONT_DATA                          4K        1 \n__LINKEDIT                       537.3M        3 \n__OBJC_RO                         71.9M        1 \n__OBJC_RW                         2199K        1 \n__TEXT                           546.5M      466 \ndyld private memory                272K        2 \nmapped file                      188.8M       26 \nshared memory                      864K       13 \n===========                     =======  ======= \nTOTAL                              3.0G     2418 \n",
  "legacyInfo" : {
  "threadTriggered" : {
    "queue" : "com.apple.main-thread"
  }
},
  "logWritingSignature" : "c8d478eeba702563a622c069fe640806d2274f7e",
  "trialInfo" : {
  "rollouts" : [
    {
      "rolloutId" : "64628732bf2f5257dedc8988",
      "factorPackIds" : {

      },
      "deploymentId" : 240000001
    },
    {
      "rolloutId" : "60356660bbe37970735c5624",
      "factorPackIds" : {

      },
      "deploymentId" : 240000027
    }
  ],
  "experiments" : [
    {
      "treatmentId" : "45f4e2a5-551b-4bc2-a2dc-19c244dda8f8",
      "experimentId" : "6643969b3099cf28e049862f",
      "deploymentId" : 400000007
    }
  ]
}
}
nikitabobko commented 2 weeks ago

Thanks, reproduced.

The following lines in the config are also important to reproduce the problem:

on-focus-changed = 'move-mouse window-lazy-center'

Though my crash stacktrace is a bit different:

0   AeroSpace                              0x102a5fa78 Swift runtime failure: Range requires lowerBound <= upperBound + 0 [inlined]
1   AeroSpace                              0x102a5fa78 Rect.contains(_:) + 0 (Rect.swift:29) [inlined]
2   AeroSpace                              0x102a5fa78 specialized MoveMouseCommand.run(_:_:) + 1960 (MoveMouseCommand.swift:14)
3   AeroSpace                              0x102a5f658 specialized MoveMouseCommand.run(_:_:) + 904 (MoveMouseCommand.swift:13)
4   AeroSpace                              0x102a5ef18 MoveMouseCommand.run(_:_:) + 32 [inlined]
5   AeroSpace                              0x102a5ef18 protocol witness for Command.run(_:_:) in conformance MoveMouseCommand + 68 (/<compiler-generated>:7)
6   AeroSpace                              0x102a35d40 Array<A>.runCmdSeq(_:_:) + 880 (Command.swift:45)
7   AeroSpace                              0x102a89ee4 onFocusChanged(_:) + 264
8   AeroSpace                              0x102a8984c checkOnFocusChangedCallbacks() + 648 (focus.swift:140)
9   AeroSpace                              0x102a35ef0 refreshModel() + 12 (refresh.swift:65) [inlined]
10  AeroSpace                              0x102a35ef0 Array<A>.runCmdSeq(_:_:) + 1312 (Command.swift:46)
11  AeroSpace                              0x102a72a78 Array<A>.runCmdSeq(_:_:) + 16 (Command.swift:54) [inlined]
12  AeroSpace                              0x102a72a78 closure #1 in closure #2 in activateMode(_:) + 500 (HotkeyBinding.swift:33)
13  AeroSpace                              0x102a8e450 specialized refreshSession<A>(startup:forceFocus:body:) + 784 (refresh.swift:20)
14  AeroSpace                              0x102c99234 specialized static HotKeysController.handleCarbonEvent(_:) + 336
15  HIToolbox                              0x1a2406b3c DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*) + 1256
16  HIToolbox                              0x1a2404894 SendEventToEventTargetInternal(OpaqueEventRef*, OpaqueEventTargetRef*, HandlerCallRec*) + 356
17  HIToolbox                              0x1a2404724 SendEventToEventTarget + 40
18  AppKit                                 0x19b412a80 -[NSApplication(NSEventRouting) sendEvent:] + 1288
19  AppKit                                 0x19b02089c -[NSApplication _handleEvent:] + 60
20  AppKit                                 0x19aac6b08 -[NSApplication run] + 520
21  AppKit                                 0x19aa9d364 NSApplicationMain + 888
22  SwiftUI                                0x1c514c340 specialized runApp(_:) + 160
23  SwiftUI                                0x1c55bcee4 runApp<A>(_:) + 84
24  SwiftUI                                0x1c5935f24 static App.main() + 224
25  AeroSpace                              0x102a2f6dc static AeroSpaceApp.$main() + 24 [inlined]
26  AeroSpace                              0x102a2f6dc main + 36
27  dyld                                   0x196b40274 start + 2840