nikitabobko / AeroSpace

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

Crash resume functionality #152

Open alper opened 9 months ago

alper commented 9 months ago

I love it when I have stuff setup nicely but Aerospace will still regularly crash for me.

Is there crash tracking?

Could there be a quick and dirty way to restore the workspace state after restarting the app?

I guess this requires some checkpointing of the window state but I imagine something like: if the app starts and finds a saved state with the exact same windows (and ids) as are currently present, probably worth trying to put them all back where the saved state says they should go.

nikitabobko commented 9 months ago

Aerospace will still regularly crash for me

It doesn't crash for me.

When it crashes it opens up Terminal window with crash log. Please report the crash log.

If the Terminal window doesn't open up for some reason, the latest crash log is stored in /tmp/bobko.aerospace/runtime-error.txt

alper commented 9 months ago

I've been messing around a bit and now it's no longer in the tray.

So no crash log.

nikitabobko commented 9 months ago

Then it means that you encountered a severe native crash

The crash log should be in Console.app

alper commented 9 months ago

I managed to pull this:

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

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

Date/Time:             2024-02-13 20:04:25.7627 +0100
OS Version:            macOS 14.3 (23D56)
Report Version:        12
Anonymous UUID:        C0B9408C-FBCD-3420-78D0-A8C6235452E9

Sleep/Wake UUID:       BABE6B69-18B8-4F91-81A4-8C0C0CF7FD25

Time Awake Since Boot: 160000 seconds
Time Since Wake:       4050 seconds

System Integrity Protection: enabled

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

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

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

Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
0   AeroSpace                              0x1044da750 CGPoint.findIn(tree:virtual:) + 496
1   AeroSpace                              0x1044dacac moveTilingWindow(_:) + 288
2   AeroSpace                              0x1044db3f8 specialized movedObs(_:ax:notif:data:) + 144
3   HIServices                             0x18fd5c3f4 _XXMIGPostNotification + 888
4   HIServices                             0x18fd874a8 _XPostNotification + 360
5   HIServices                             0x18fd3e3b8 mshMIGPerform + 204
6   CoreFoundation                         0x1899cff6c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 60
7   CoreFoundation                         0x1899cfe8c __CFRunLoopDoSource1 + 520
8   CoreFoundation                         0x1899ce858 __CFRunLoopRun + 2244
9   CoreFoundation                         0x1899cd93c CFRunLoopRunSpecific + 608
10  HIToolbox                              0x193f96448 RunCurrentEventLoopInMode + 292
11  HIToolbox                              0x193f96284 ReceiveNextEventCommon + 648
12  HIToolbox                              0x193f95fdc _BlockUntilNextEventMatchingListInModeWithFilter + 76
13  AppKit                                 0x18d1aced0 _DPSNextEvent + 660
14  AppKit                                 0x18d997eec -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 716
15  AppKit                                 0x18d1a037c -[NSApplication run] + 476
16  AppKit                                 0x18d177640 NSApplicationMain + 880
17  SwiftUI                                0x1b46e3004 0x1b4609000 + 892932
18  SwiftUI                                0x1b4f725ec 0x1b4609000 + 9868780
19  SwiftUI                                0x1b53b9a18 0x1b4609000 + 14354968
20  AeroSpace                              0x10449ffd4 main + 36
21  dyld                                   0x1895710e0 start + 2360

Thread 1::  Dispatch queue: com.apple.root.default-qos
0   libsystem_kernel.dylib                 0x1898ba1c0 __accept + 8
1   AeroSpace                              0x104557228 Socket.acceptClientConnection(invokeDelegate:) + 456
2   AeroSpace                              0x104501024 closure #3 in startServer() + 180
3   AeroSpace                              0x1045033e0 thunk for @escaping @callee_guaranteed @Sendable () -> () + 28
4   libdispatch.dylib                      0x18973ecb8 _dispatch_call_block_and_release + 32
5   libdispatch.dylib                      0x189740910 _dispatch_client_callout + 20
6   libdispatch.dylib                      0x189743a5c _dispatch_queue_override_invoke + 928
7   libdispatch.dylib                      0x1897521f4 _dispatch_root_queue_drain + 392
8   libdispatch.dylib                      0x189752a04 _dispatch_worker_thread2 + 156
9   libsystem_pthread.dylib                0x1898ee0d8 _pthread_wqthread + 228
10  libsystem_pthread.dylib                0x1898ece30 start_wqthread + 8

Thread 2:: com.apple.NSEventThread
0   libsystem_kernel.dylib                 0x1898b1874 mach_msg2_trap + 8
1   libsystem_kernel.dylib                 0x1898c3cf0 mach_msg2_internal + 80
2   libsystem_kernel.dylib                 0x1898ba4b0 mach_msg_overwrite + 476
3   libsystem_kernel.dylib                 0x1898b1bf8 mach_msg + 24
4   CoreFoundation                         0x1899cfb84 __CFRunLoopServiceMachPort + 160
5   CoreFoundation                         0x1899ce44c __CFRunLoopRun + 1208
6   CoreFoundation                         0x1899cd93c CFRunLoopRunSpecific + 608
7   AppKit                                 0x18d2d6160 _NSEventThread + 144
8   libsystem_pthread.dylib                0x1898f2034 _pthread_start + 136
9   libsystem_pthread.dylib                0x1898ece3c thread_start + 8

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

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

Thread 0 crashed with ARM Thread State (64-bit):
    x0: 0x00006000017bcc00   x1: 0x0000000400000003   x2: 0x0000000200000003   x3: 0x0000000000000003
    x4: 0x0000000400000003   x5: 0x0000000000000003   x6: 0x0000000200000003   x7: 0x0000000000000003
    x8: 0x00006000017bcc68   x9: 0x00006000017bcc60  x10: 0x00006000017bcc78  x11: 0x00006000017bcc70
   x12: 0x0000000000000000  x13: 0x00000000000007fd  x14: 0x00000000e444990f  x15: 0x000000000000010f
   x16: 0x000000019954f2ac  x17: 0x0000000000049800  x18: 0x0000000000000000  x19: 0x0000000000000000
   x20: 0x00006000017bcc00  x21: 0x00006000008b1270  x22: 0x0000000000000003  x23: 0x0000000000000003
   x24: 0x0000000000000000  x25: 0x0000000000000006  x26: 0x0000000000000008  x27: 0x0000000104938000
   x28: 0x00006000025ff8a0   fp: 0x000000016b965070   lr: 0x00000001044da64c
    sp: 0x000000016b965000   pc: 0x00000001044da750 cpsr: 0x20001000
   far: 0x0000000000000000  esr: 0xf2000001 (Breakpoint) brk 1

Binary Images:
       0x104b48000 -        0x104b53fff libobjc-trampolines.dylib (*) <39d1d8d0-6996-3bd4-8ce9-39512bb65c82> /usr/lib/libobjc-trampolines.dylib
       0x104498000 -        0x1045bbfff bobko.aerospace (0.8.4-Beta) <25a02a52-47df-36c0-9d0d-eab76fee3c5c> /Applications/AeroSpace.app/Contents/MacOS/AeroSpace
       0x18fd33000 -        0x18fd96fff com.apple.HIServices (1.22) <d8fe0349-f7d7-3ff2-9640-f3ecd800182b> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/HIServices.framework/Versions/A/HIServices
       0x189952000 -        0x189e29fff com.apple.CoreFoundation (6.9) <6030a572-b731-3f46-b3a0-2598fbb98c9a> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
       0x193f66000 -        0x194225fff com.apple.HIToolbox (2.1.1) <db8a8b63-7bfb-384b-b0a9-c124675fbb39> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox
       0x18d173000 -        0x18e49efff com.apple.AppKit (6.9) <873e5da0-bc01-399b-bf60-4066922d6a17> /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
       0x1b4609000 -        0x1b6448fff com.apple.SwiftUI (5.3.3) <397e2054-e98d-3d1e-bf74-4fd8e5fb0f49> /System/Library/Frameworks/SwiftUI.framework/Versions/A/SwiftUI
       0x18956b000 -        0x1895ff387 dyld (*) <50746901-db0e-39a0-b391-baaa6b82ad0f> /usr/lib/dyld
               0x0 - 0xffffffffffffffff ??? (*) <00000000-0000-0000-0000-000000000000> ???
       0x1991c1000 -        0x199701fff libswiftCore.dylib (*) <7eba7ef0-57d2-3155-b45d-1a4d40a732f3> /usr/lib/swift/libswiftCore.dylib
       0x1898b0000 -        0x1898eafff libsystem_kernel.dylib (*) <a7228b5d-53c7-3fe9-84e4-2a8c04dcf051> /usr/lib/system/libsystem_kernel.dylib
       0x18973d000 -        0x189783fff libdispatch.dylib (*) <5aa1649c-ef1d-39f7-a66c-4c5d2e53c474> /usr/lib/system/libdispatch.dylib
       0x1898eb000 -        0x1898f7ff3 libsystem_pthread.dylib (*) <449bbad3-f7ef-371d-9a59-fd4ffa78289b> /usr/lib/system/libsystem_pthread.dylib

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

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

{"app_name":"AeroSpace","timestamp":"2024-02-13 20:04:35.00 +0100","app_version":"0.8.4-Beta","slice_uuid":"25a02a52-47df-36c0-9d0d-eab76fee3c5c","build_version":"0.8.4","platform":1,"bundleID":"bobko.aerospace","share_with_app_devs":1,"is_first_party":0,"bug_type":"309","os_version":"macOS 14.3 (23D56)","roots_installed":0,"name":"AeroSpace","incident_id":"CEE8512A-975C-4571-AF8F-55B0A0566683"}
{
  "uptime" : 160000,
  "procRole" : "Default",
  "version" : 2,
  "userID" : 501,
  "deployVersion" : 210,
  "modelCode" : "MacBookAir10,1",
  "coalitionID" : 3429,
  "osVersion" : {
    "train" : "macOS 14.3",
    "build" : "23D56",
    "releaseType" : "User"
  },
  "captureTime" : "2024-02-13 20:04:25.7627 +0100",
  "codeSigningMonitor" : 1,
  "incident" : "CEE8512A-975C-4571-AF8F-55B0A0566683",
  "pid" : 8263,
  "translated" : false,
  "cpuType" : "ARM-64",
  "roots_installed" : 0,
  "bug_type" : "309",
  "procLaunch" : "2024-02-07 18:46:53.8955 +0100",
  "procStartAbsTime" : 654291076981,
  "procExitAbsTime" : 3842486591475,
  "procName" : "AeroSpace",
  "procPath" : "\/Applications\/AeroSpace.app\/Contents\/MacOS\/AeroSpace",
  "bundleInfo" : {"CFBundleShortVersionString":"0.8.4-Beta","CFBundleVersion":"0.8.4","CFBundleIdentifier":"bobko.aerospace"},
  "storeInfo" : {"deviceIdentifierForVendor":"C065101F-2D87-56E5-A70B-E43425E21A8F","thirdParty":true},
  "parentProc" : "launchd",
  "parentPid" : 1,
  "coalitionName" : "bobko.aerospace",
  "crashReporterKey" : "C0B9408C-FBCD-3420-78D0-A8C6235452E9",
  "lowPowerMode" : 1,
  "codeSigningID" : "bobko.aerospace",
  "codeSigningTeamID" : "4MWP47XA68",
  "codeSigningFlags" : 1644167685,
  "codeSigningValidationCategory" : 3,
  "codeSigningTrustLevel" : 4294967295,
  "instructionByteStream" : {"beforePC":"4AMVqiBBYB4BQWAei\/\/\/l\/UDAKrgAxSqQQCAUgPrApQSAAAUIAAg1A==","atPC":"IAAg1CAAINSo4n2SvwIA8RShlZrgAxWqQQCAUmbqApTgAxSqPecClA=="},
  "wakeTime" : 4050,
  "sleepWakeUUID" : "BABE6B69-18B8-4F91-81A4-8C0C0CF7FD25",
  "sip" : "enabled",
  "exception" : {"codes":"0x0000000000000001, 0x00000001044da750","rawCodes":[1,4367165264],"type":"EXC_BREAKPOINT","signal":"SIGTRAP"},
  "termination" : {"flags":0,"code":5,"namespace":"SIGNAL","indicator":"Trace\/BPT trap: 5","byProc":"exc handler","byPid":8263},
  "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":289996,"threadState":{"x":[{"value":105553141156864},{"value":17179869187},{"value":8589934595},{"value":3},{"value":17179869187},{"value":3},{"value":8589934595},{"value":3},{"value":105553141156968},{"value":105553141156960},{"value":105553141156984},{"value":105553141156976},{"value":0},{"value":2045},{"value":3829700879},{"value":271},{"value":6867448492,"symbolLocation":0,"symbol":"swift_retain"},{"value":301056},{"value":0},{"value":0},{"value":105553141156864},{"value":105553125380720},{"value":3},{"value":3},{"value":0},{"value":6},{"value":8},{"value":4371742720},{"value":105553156110496}],"flavor":"ARM_THREAD_STATE64","lr":{"value":4367165004},"cpsr":{"value":536875008},"fp":{"value":6099980400},"sp":{"value":6099980288},"esr":{"value":4060086273,"description":"(Breakpoint) brk 1"},"pc":{"value":4367165264,"matchesCrashFrame":1},"far":{"value":0}},"queue":"com.apple.main-thread","frames":[{"imageOffset":272208,"symbol":"CGPoint.findIn(tree:virtual:)","symbolLocation":496,"imageIndex":1},{"imageOffset":273580,"symbol":"moveTilingWindow(_:)","symbolLocation":288,"imageIndex":1},{"imageOffset":275448,"symbol":"specialized movedObs(_:ax:notif:data:)","symbolLocation":144,"imageIndex":1},{"imageOffset":168948,"symbol":"_XXMIGPostNotification","symbolLocation":888,"imageIndex":2},{"imageOffset":345256,"symbol":"_XPostNotification","symbolLocation":360,"imageIndex":2},{"imageOffset":46008,"symbol":"mshMIGPerform","symbolLocation":204,"imageIndex":2},{"imageOffset":515948,"symbol":"__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__","symbolLocation":60,"imageIndex":3},{"imageOffset":515724,"symbol":"__CFRunLoopDoSource1","symbolLocation":520,"imageIndex":3},{"imageOffset":510040,"symbol":"__CFRunLoopRun","symbolLocation":2244,"imageIndex":3},{"imageOffset":506172,"symbol":"CFRunLoopRunSpecific","symbolLocation":608,"imageIndex":3},{"imageOffset":197704,"symbol":"RunCurrentEventLoopInMode","symbolLocation":292,"imageIndex":4},{"imageOffset":197252,"symbol":"ReceiveNextEventCommon","symbolLocation":648,"imageIndex":4},{"imageOffset":196572,"symbol":"_BlockUntilNextEventMatchingListInModeWithFilter","symbolLocation":76,"imageIndex":4},{"imageOffset":237264,"symbol":"_DPSNextEvent","symbolLocation":660,"imageIndex":5},{"imageOffset":8539884,"symbol":"-[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:]","symbolLocation":716,"imageIndex":5},{"imageOffset":185212,"symbol":"-[NSApplication run]","symbolLocation":476,"imageIndex":5},{"imageOffset":17984,"symbol":"NSApplicationMain","symbolLocation":880,"imageIndex":5},{"imageOffset":892932,"imageIndex":6},{"imageOffset":9868780,"imageIndex":6},{"imageOffset":14354968,"imageIndex":6},{"imageOffset":32724,"symbol":"main","symbolLocation":36,"imageIndex":1},{"imageOffset":24800,"symbol":"start","symbolLocation":2360,"imageIndex":7}]},{"id":290098,"threadState":{"x":[{"value":4},{"value":0},{"value":6101117920},{"value":4793058194},{"value":0},{"value":3168},{"value":105553159965792},{"value":0},{"value":128},{"value":0},{"value":110907321286656},{"value":16},{"value":105553160039332},{"value":2095104},{"value":2043},{"value":4015638727},{"value":30},{"value":4017735675},{"value":0},{"value":4793057920},{"value":4793058194},{"value":0},{"value":6101117968},{"value":0},{"value":4793057972},{"value":8054906560,"symbolLocation":1536,"symbol":"_dispatch_root_queues"},{"value":9223372041222726720},{"value":14987979559889010718},{"value":4367950448}],"flavor":"ARM_THREAD_STATE64","lr":{"value":4367675944},"cpsr":{"value":1610616832},"fp":{"value":6101118384},"sp":{"value":6101117568},"esr":{"value":1442840704,"description":" Address size fault"},"pc":{"value":6602596800},"far":{"value":0}},"queue":"com.apple.root.default-qos","frames":[{"imageOffset":41408,"symbol":"__accept","symbolLocation":8,"imageIndex":10},{"imageOffset":782888,"symbol":"Socket.acceptClientConnection(invokeDelegate:)","symbolLocation":456,"imageIndex":1},{"imageOffset":430116,"symbol":"closure #3 in startServer()","symbolLocation":180,"imageIndex":1},{"imageOffset":439264,"symbol":"thunk for @escaping @callee_guaranteed @Sendable () -> ()","symbolLocation":28,"imageIndex":1},{"imageOffset":7352,"symbol":"_dispatch_call_block_and_release","symbolLocation":32,"imageIndex":11},{"imageOffset":14608,"symbol":"_dispatch_client_callout","symbolLocation":20,"imageIndex":11},{"imageOffset":27228,"symbol":"_dispatch_queue_override_invoke","symbolLocation":928,"imageIndex":11},{"imageOffset":86516,"symbol":"_dispatch_root_queue_drain","symbolLocation":392,"imageIndex":11},{"imageOffset":88580,"symbol":"_dispatch_worker_thread2","symbolLocation":156,"imageIndex":11},{"imageOffset":12504,"symbol":"_pthread_wqthread","symbolLocation":228,"imageIndex":12},{"imageOffset":7728,"symbol":"start_wqthread","symbolLocation":8,"imageIndex":12}]},{"id":290191,"name":"com.apple.NSEventThread","threadState":{"x":[{"value":268451845},{"value":21592279046},{"value":8589934592},{"value":271592256962560},{"value":0},{"value":271592256962560},{"value":2},{"value":4294967295},{"value":18446744073709550527},{"value":63235},{"value":0},{"value":1},{"value":63235},{"value":76335},{"value":0},{"value":0},{"value":18446744073709551569},{"value":8206415920},{"value":0},{"value":4294967295},{"value":2},{"value":271592256962560},{"value":0},{"value":271592256962560},{"value":6102835304},{"value":8589934592},{"value":21592279046},{"value":21592279046},{"value":4412409862}],"flavor":"ARM_THREAD_STATE64","lr":{"value":6602636528},"cpsr":{"value":4096},"fp":{"value":6102835152},"sp":{"value":6102835072},"esr":{"value":1442840704,"description":" Address size fault"},"pc":{"value":6602561652},"far":{"value":0}},"frames":[{"imageOffset":6260,"symbol":"mach_msg2_trap","symbolLocation":8,"imageIndex":10},{"imageOffset":81136,"symbol":"mach_msg2_internal","symbolLocation":80,"imageIndex":10},{"imageOffset":42160,"symbol":"mach_msg_overwrite","symbolLocation":476,"imageIndex":10},{"imageOffset":7160,"symbol":"mach_msg","symbolLocation":24,"imageIndex":10},{"imageOffset":514948,"symbol":"__CFRunLoopServiceMachPort","symbolLocation":160,"imageIndex":3},{"imageOffset":509004,"symbol":"__CFRunLoopRun","symbolLocation":1208,"imageIndex":3},{"imageOffset":506172,"symbol":"CFRunLoopRunSpecific","symbolLocation":608,"imageIndex":3},{"imageOffset":1454432,"symbol":"_NSEventThread","symbolLocation":144,"imageIndex":5},{"imageOffset":28724,"symbol":"_pthread_start","symbolLocation":136,"imageIndex":12},{"imageOffset":7740,"symbol":"thread_start","symbolLocation":8,"imageIndex":12}]},{"id":2136980,"frames":[{"imageOffset":7720,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":12}],"threadState":{"x":[{"value":6101692416},{"value":30655},{"value":6101155840},{"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":6101692416},"esr":{"value":1442840704,"description":" Address size fault"},"pc":{"value":6602804776},"far":{"value":0}}},{"id":2137698,"frames":[{"imageOffset":7720,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":12}],"threadState":{"x":[{"value":6100545536},{"value":48667},{"value":6100008960},{"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":6100545536},"esr":{"value":1442840704,"description":" Address size fault"},"pc":{"value":6602804776},"far":{"value":0}}}],
  "usedImages" : [
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 4373905408,
    "size" : 49152,
    "uuid" : "39d1d8d0-6996-3bd4-8ce9-39512bb65c82",
    "path" : "\/usr\/lib\/libobjc-trampolines.dylib",
    "name" : "libobjc-trampolines.dylib"
  },
  {
    "source" : "P",
    "arch" : "arm64",
    "base" : 4366893056,
    "CFBundleShortVersionString" : "0.8.4-Beta",
    "CFBundleIdentifier" : "bobko.aerospace",
    "size" : 1196032,
    "uuid" : "25a02a52-47df-36c0-9d0d-eab76fee3c5c",
    "path" : "\/Applications\/AeroSpace.app\/Contents\/MacOS\/AeroSpace",
    "name" : "AeroSpace",
    "CFBundleVersion" : "0.8.4"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 6707949568,
    "CFBundleShortVersionString" : "1.22",
    "CFBundleIdentifier" : "com.apple.HIServices",
    "size" : 409600,
    "uuid" : "d8fe0349-f7d7-3ff2-9640-f3ecd800182b",
    "path" : "\/System\/Library\/Frameworks\/ApplicationServices.framework\/Versions\/A\/Frameworks\/HIServices.framework\/Versions\/A\/HIServices",
    "name" : "HIServices"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 6603218944,
    "CFBundleShortVersionString" : "6.9",
    "CFBundleIdentifier" : "com.apple.CoreFoundation",
    "size" : 5079040,
    "uuid" : "6030a572-b731-3f46-b3a0-2598fbb98c9a",
    "path" : "\/System\/Library\/Frameworks\/CoreFoundation.framework\/Versions\/A\/CoreFoundation",
    "name" : "CoreFoundation",
    "CFBundleVersion" : "2303"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 6777364480,
    "CFBundleShortVersionString" : "2.1.1",
    "CFBundleIdentifier" : "com.apple.HIToolbox",
    "size" : 2883584,
    "uuid" : "db8a8b63-7bfb-384b-b0a9-c124675fbb39",
    "path" : "\/System\/Library\/Frameworks\/Carbon.framework\/Versions\/A\/Frameworks\/HIToolbox.framework\/Versions\/A\/HIToolbox",
    "name" : "HIToolbox"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 6662074368,
    "CFBundleShortVersionString" : "6.9",
    "CFBundleIdentifier" : "com.apple.AppKit",
    "size" : 20103168,
    "uuid" : "873e5da0-bc01-399b-bf60-4066922d6a17",
    "path" : "\/System\/Library\/Frameworks\/AppKit.framework\/Versions\/C\/AppKit",
    "name" : "AppKit",
    "CFBundleVersion" : "2487.40.107"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 7321194496,
    "CFBundleShortVersionString" : "5.3.3",
    "CFBundleIdentifier" : "com.apple.SwiftUI",
    "size" : 31719424,
    "uuid" : "397e2054-e98d-3d1e-bf74-4fd8e5fb0f49",
    "path" : "\/System\/Library\/Frameworks\/SwiftUI.framework\/Versions\/A\/SwiftUI",
    "name" : "SwiftUI",
    "CFBundleVersion" : "5.3.3"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 6599127040,
    "size" : 607112,
    "uuid" : "50746901-db0e-39a0-b391-baaa6b82ad0f",
    "path" : "\/usr\/lib\/dyld",
    "name" : "dyld"
  },
  {
    "size" : 0,
    "source" : "A",
    "base" : 0,
    "uuid" : "00000000-0000-0000-0000-000000000000"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 6863720448,
    "size" : 5509120,
    "uuid" : "7eba7ef0-57d2-3155-b45d-1a4d40a732f3",
    "path" : "\/usr\/lib\/swift\/libswiftCore.dylib",
    "name" : "libswiftCore.dylib"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 6602555392,
    "size" : 241664,
    "uuid" : "a7228b5d-53c7-3fe9-84e4-2a8c04dcf051",
    "path" : "\/usr\/lib\/system\/libsystem_kernel.dylib",
    "name" : "libsystem_kernel.dylib"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 6601035776,
    "size" : 290816,
    "uuid" : "5aa1649c-ef1d-39f7-a66c-4c5d2e53c474",
    "path" : "\/usr\/lib\/system\/libdispatch.dylib",
    "name" : "libdispatch.dylib"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 6602797056,
    "size" : 53236,
    "uuid" : "449bbad3-f7ef-371d-9a59-fd4ffa78289b",
    "path" : "\/usr\/lib\/system\/libsystem_pthread.dylib",
    "name" : "libsystem_pthread.dylib"
  }
],
  "sharedCache" : {
  "base" : 6598377472,
  "size" : 4065345536,
  "uuid" : "b81268a5-00ed-3883-b922-13118e8800fe"
},
  "legacyInfo" : {
  "threadTriggered" : {
    "queue" : "com.apple.main-thread"
  }
},
  "logWritingSignature" : "bffe471477868a5525b76cd5c46a27a0de5e5ca3",
  "trialInfo" : {
  "rollouts" : [
    {
      "rolloutId" : "62745b8e85854550ad70b6e4",
      "factorPackIds" : {
        "SIRI_TTS_DEVICE_TRAINING" : "6539d7f333b9b7499c6f1b63"
      },
      "deploymentId" : 240000073
    },
    {
      "rolloutId" : "60f8ddccefea4203d95cbeef",
      "factorPackIds" : {

      },
      "deploymentId" : 240000025
    }
  ],
  "experiments" : [
    {
      "treatmentId" : "5d51a80d-93ec-47e1-9027-675002e78e4a",
      "experimentId" : "6384d56b96e8d228551ec182",
      "deploymentId" : 400000025
    }
  ]
}
}
nikitabobko commented 9 months ago

Thanks for the report!

It looks like it fails somewhere here https://github.com/nikitabobko/AeroSpace/blob/0ce757b/src/mouse/moveWithMouse.swift#L77 when you move the window with your mouse

But I don't understand yet why it fails. The code under the question looks safe to me :thinking:

david-soloveichik commented 3 months ago

I am encountering the same issue: crashing a few times a day depending on use. No terminal window and no folder /tmp/bobko.aerospace/

Here is an example crash log:

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

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

Date/Time:             2024-08-14 20:57:30.0803 -0500
OS Version:            macOS 14.6.1 (23G93)
Report Version:        12
Anonymous UUID:        88DBEB41-59DF-80B8-B27A-EF5521217643

Sleep/Wake UUID:       152A8B6A-BD11-4385-A427-AD05145254A1

Time Awake Since Boot: 53000 seconds
Time Since Wake:       2259 seconds

System Integrity Protection: enabled

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

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

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

Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
0   AeroSpace                              0x100e897f0 CGPoint.findIn(tree:virtual:) + 480
1   AeroSpace                              0x100e89cc4 moveTilingWindow(_:) + 256
2   AeroSpace                              0x100e8a43c specialized movedObs(_:ax:notif:data:) + 148
3   HIServices                             0x1a1ebc3b0 _XXMIGPostNotification + 896
4   HIServices                             0x1a1ee749c _XPostNotification + 360
5   HIServices                             0x1a1e9e340 mshMIGPerform + 208
6   CoreFoundation                         0x19ba85a6c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 60
7   CoreFoundation                         0x19ba8598c __CFRunLoopDoSource1 + 524
8   CoreFoundation                         0x19ba84350 __CFRunLoopRun + 2244
9   CoreFoundation                         0x19ba83434 CFRunLoopRunSpecific + 608
10  HIToolbox                              0x1a622d19c RunCurrentEventLoopInMode + 292
11  HIToolbox                              0x1a622cfd8 ReceiveNextEventCommon + 648
12  HIToolbox                              0x1a622cd30 _BlockUntilNextEventMatchingListInModeWithFilter + 76
13  AppKit                                 0x19f2e2cc8 _DPSNextEvent + 660
14  AppKit                                 0x19fad94d0 -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 700
15  AppKit                                 0x19f2d5ffc -[NSApplication run] + 476
16  AppKit                                 0x19f2ad240 NSApplicationMain + 880
17  SwiftUI                                0x1c747b3b8 0x1c7371000 + 1090488
18  SwiftUI                                0x1c7be4ddc 0x1c7371000 + 8863196
19  SwiftUI                                0x1c7fdfe0c 0x1c7371000 + 13037068
20  AeroSpace                              0x100e2b474 main + 36
21  dyld                                   0x19b61b154 start + 2476

Thread 1::  Dispatch queue: com.apple.root.default-qos
0   libsystem_kernel.dylib                 0x19b96d6d4 __accept + 8
1   AeroSpace                              0x1010983ac Socket.acceptClientConnection(invokeDelegate:) + 456
2   AeroSpace                              0x100e8e24c closure #3 in startServer() + 180
3   AeroSpace                              0x100e908c0 thunk for @escaping @callee_guaranteed @Sendable () -> () + 28
4   libdispatch.dylib                      0x19b7f3750 _dispatch_call_block_and_release + 32
5   libdispatch.dylib                      0x19b7f53e8 _dispatch_client_callout + 20
6   libdispatch.dylib                      0x19b7f8580 _dispatch_queue_override_invoke + 928
7   libdispatch.dylib                      0x19b806ea8 _dispatch_root_queue_drain + 392
8   libdispatch.dylib                      0x19b8076b8 _dispatch_worker_thread2 + 156
9   libsystem_pthread.dylib                0x19b9a1fd0 _pthread_wqthread + 228
10  libsystem_pthread.dylib                0x19b9a0d28 start_wqthread + 8

Thread 2:: com.apple.NSEventThread
0   libsystem_kernel.dylib                 0x19b964df4 mach_msg2_trap + 8
1   libsystem_kernel.dylib                 0x19b9775e4 mach_msg2_internal + 80
2   libsystem_kernel.dylib                 0x19b96d9c4 mach_msg_overwrite + 476
3   libsystem_kernel.dylib                 0x19b965178 mach_msg + 24
4   CoreFoundation                         0x19ba85680 __CFRunLoopServiceMachPort + 160
5   CoreFoundation                         0x19ba83f44 __CFRunLoopRun + 1208
6   CoreFoundation                         0x19ba83434 CFRunLoopRunSpecific + 608
7   AppKit                                 0x19f40d280 _NSEventThread + 144
8   libsystem_pthread.dylib                0x19b9a5f94 _pthread_start + 136
9   libsystem_pthread.dylib                0x19b9a0d34 thread_start + 8

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

Thread 0 crashed with ARM Thread State (64-bit):
    x0: 0x0000600001db6c00   x1: 0x0000000400000003   x2: 0x0000000000000002   x3: 0x00000001aba215a8
    x4: 0x0000000000000000   x5: 0x0000000000000005   x6: 0x0000000400000003   x7: 0x0000000000000005
    x8: 0x0000600001db6c68   x9: 0x0000600001db6c60  x10: 0x0000600001db6c78  x11: 0x0000600001db6c70
   x12: 0x0000000000000000  x13: 0x00000000000007fd  x14: 0x00000000d041003d  x15: 0x000000000000003d
   x16: 0x00000001aba2269c  x17: 0x0000000000010000  x18: 0x0000000000000000  x19: 0x0000000000000000
   x20: 0x0000600001db6c00  x21: 0x0000600001093ac0  x22: 0x0000000000000004  x23: 0x0000000000000001
   x24: 0x0000000000000000  x25: 0x0000000000000004  x26: 0x0000000000000008  x27: 0x0000000104210000
   x28: 0x0000600002f5fc90   fp: 0x000000016efd5080   lr: 0x0000000100e8970c
    sp: 0x000000016efd5010   pc: 0x0000000100e897f0 cpsr: 0x20001000
   far: 0x0000000000000000  esr: 0xf2000001 (Breakpoint) brk 1

Binary Images:
       0x10bbec000 -        0x10bbf7fff libobjc-trampolines.dylib (*) <7d6ca1cb-c5e6-38b6-9618-2c580486fc6b> /usr/lib/libobjc-trampolines.dylib
       0x100e28000 -        0x101157fff bobko.aerospace (0.14.1-Beta) <d0ce19ab-955c-3bf1-a2c9-5210f72ad711> /Applications/AeroSpace.app/Contents/MacOS/AeroSpace
       0x1a1e93000 -        0x1a1ef6fff com.apple.HIServices (1.22) <5edc02bc-3474-3577-a9d5-8d543bc1521e> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/HIServices.framework/Versions/A/HIServices
       0x19ba07000 -        0x19bedffff com.apple.CoreFoundation (6.9) <55720ee0-d8c3-33a1-9854-8e61a6f44895> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
       0x1a61fa000 -        0x1a64bdfff com.apple.HIToolbox (2.1.1) <4166f6cb-b599-306c-8568-823bd29a74c3> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox
       0x19f2a9000 -        0x1a05e7fff com.apple.AppKit (6.9) <7acbeef9-a453-3e4d-98ac-f9441d86e183> /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
       0x1c7371000 -        0x1c9054fff com.apple.SwiftUI (5.6.2) <0ccf2597-869c-37ef-aded-ce62f6ac3c77> /System/Library/Frameworks/SwiftUI.framework/Versions/A/SwiftUI
       0x19b615000 -        0x19b69e507 dyld (*) <f635824e-318b-3f0c-842c-c369737f2b68> /usr/lib/dyld
               0x0 - 0xffffffffffffffff ??? (*) <00000000-0000-0000-0000-000000000000> ???
       0x1ab677000 -        0x1abbd4fff libswiftCore.dylib (*) <7db1818b-1d9a-328e-821b-21a33442746a> /usr/lib/swift/libswiftCore.dylib
       0x19b964000 -        0x19b99effb libsystem_kernel.dylib (*) <71ff45b8-f14e-3666-9e96-6cf58315b91d> /usr/lib/system/libsystem_kernel.dylib
       0x19b7f1000 -        0x19b838fff libdispatch.dylib (*) <1a1ce00a-89cd-36ba-9678-5038aedd0d8d> /usr/lib/system/libdispatch.dylib
       0x19b99f000 -        0x19b9abfff libsystem_pthread.dylib (*) <e03e8478-6f5c-3d21-a79a-58408f514000> /usr/lib/system/libsystem_pthread.dylib

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.2G resident=0K(0%) swapped_out_or_unallocated=1.2G(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                            64K        3 
ColorSync                          576K       27 
CoreAnimation                       16K        1 
CoreGraphics                       112K        7 
CoreUI image data                   80K        1 
Foundation                          16K        1 
Kernel Alloc Once                   32K        1 
MALLOC                             1.6G       85 
MALLOC guard page                  288K       18 
Mach message                      5472K       57 
STACK GUARD                       56.1M        4 
Stack                             9808K        4 
VM_ALLOCATE                        176K        6 
__AUTH                            2251K      368 
__AUTH_CONST                      29.8M      571 
__CTF                               824        1 
__DATA                            12.3M      557 
__DATA_CONST                      29.4M      578 
__DATA_DIRTY                      1784K      192 
__FONT_DATA                          4K        1 
__INFO_FILTER                         8        1 
__LINKEDIT                       529.9M        3 
__OBJC_RO                         71.9M        1 
__OBJC_RW                         2200K        1 
__TEXT                           673.3M      595 
dyld private memory                272K        2 
mapped file                      191.7M       30 
shared memory                      864K       13 
===========                     =======  ======= 
TOTAL                              3.2G     3133 

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

{"app_name":"AeroSpace","timestamp":"2024-08-14 20:57:31.00 -0500","app_version":"0.14.1-Beta","slice_uuid":"d0ce19ab-955c-3bf1-a2c9-5210f72ad711","build_version":"","platform":1,"bundleID":"bobko.aerospace","share_with_app_devs":1,"is_first_party":0,"bug_type":"309","os_version":"macOS 14.6.1 (23G93)","roots_installed":0,"name":"AeroSpace","incident_id":"EB101D2E-6F26-4130-BD47-6B2043436143"}
{
  "uptime" : 53000,
  "procRole" : "Default",
  "version" : 2,
  "userID" : 501,
  "deployVersion" : 210,
  "modelCode" : "Mac15,3",
  "coalitionID" : 1939,
  "osVersion" : {
    "train" : "macOS 14.6.1",
    "build" : "23G93",
    "releaseType" : "User"
  },
  "captureTime" : "2024-08-14 20:57:30.0803 -0500",
  "codeSigningMonitor" : 1,
  "incident" : "EB101D2E-6F26-4130-BD47-6B2043436143",
  "pid" : 4543,
  "translated" : false,
  "cpuType" : "ARM-64",
  "roots_installed" : 0,
  "bug_type" : "309",
  "procLaunch" : "2024-08-13 15:04:48.2238 -0500",
  "procStartAbsTime" : 207643342280,
  "procExitAbsTime" : 1286120112247,
  "procName" : "AeroSpace",
  "procPath" : "\/Applications\/AeroSpace.app\/Contents\/MacOS\/AeroSpace",
  "bundleInfo" : {"CFBundleShortVersionString":"0.14.1-Beta","CFBundleIdentifier":"bobko.aerospace"},
  "storeInfo" : {"deviceIdentifierForVendor":"FE561977-99A7-5D0E-AC38-761F23FC46E8","thirdParty":true},
  "parentProc" : "launchd",
  "parentPid" : 1,
  "coalitionName" : "bobko.aerospace",
  "crashReporterKey" : "88DBEB41-59DF-80B8-B27A-EF5521217643",
  "codeSigningID" : "bobko.aerospace",
  "codeSigningTeamID" : "",
  "codeSigningFlags" : 570425861,
  "codeSigningValidationCategory" : 10,
  "codeSigningTrustLevel" : 4294967295,
  "instructionByteStream" : {"beforePC":"4AMVqiBBYB4BQWAej\/\/\/l\/UDAKrgAxSqYQCAUmauCZQSAAAUIAAg1A==","atPC":"IAAg1CAAINSo4n2SvwIA8RShlZrgAxWqQQCAUretCZTgAxSqzqkJlA=="},
  "wakeTime" : 2259,
  "sleepWakeUUID" : "152A8B6A-BD11-4385-A427-AD05145254A1",
  "sip" : "enabled",
  "exception" : {"codes":"0x0000000000000001, 0x0000000100e897f0","rawCodes":[1,4310210544],"type":"EXC_BREAKPOINT","signal":"SIGTRAP"},
  "termination" : {"flags":0,"code":5,"namespace":"SIGNAL","indicator":"Trace\/BPT trap: 5","byProc":"exc handler","byPid":4543},
  "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":132484,"threadState":{"x":[{"value":105553147423744},{"value":17179869187},{"value":2},{"value":7174493608,"symbolLocation":0,"symbol":"_swift_retain_n_"},{"value":0},{"value":5},{"value":17179869187},{"value":5},{"value":105553147423848},{"value":105553147423840},{"value":105553147423864},{"value":105553147423856},{"value":0},{"value":2045},{"value":3493920829},{"value":61},{"value":7174497948,"symbolLocation":0,"symbol":"swift_retain"},{"value":65536},{"value":0},{"value":0},{"value":105553147423744},{"value":105553133648576},{"value":4},{"value":1},{"value":0},{"value":4},{"value":8},{"value":4364238848},{"value":105553165941904}],"flavor":"ARM_THREAD_STATE64","lr":{"value":4310210316},"cpsr":{"value":536875008},"fp":{"value":6157062272},"sp":{"value":6157062160},"esr":{"value":4060086273,"description":"(Breakpoint) brk 1"},"pc":{"value":4310210544,"matchesCrashFrame":1},"far":{"value":0}},"queue":"com.apple.main-thread","frames":[{"imageOffset":399344,"symbol":"CGPoint.findIn(tree:virtual:)","symbolLocation":480,"imageIndex":1},{"imageOffset":400580,"symbol":"moveTilingWindow(_:)","symbolLocation":256,"imageIndex":1},{"imageOffset":402492,"symbol":"specialized movedObs(_:ax:notif:data:)","symbolLocation":148,"imageIndex":1},{"imageOffset":168880,"symbol":"_XXMIGPostNotification","symbolLocation":896,"imageIndex":2},{"imageOffset":345244,"symbol":"_XPostNotification","symbolLocation":360,"imageIndex":2},{"imageOffset":45888,"symbol":"mshMIGPerform","symbolLocation":208,"imageIndex":2},{"imageOffset":518764,"symbol":"__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__","symbolLocation":60,"imageIndex":3},{"imageOffset":518540,"symbol":"__CFRunLoopDoSource1","symbolLocation":524,"imageIndex":3},{"imageOffset":512848,"symbol":"__CFRunLoopRun","symbolLocation":2244,"imageIndex":3},{"imageOffset":508980,"symbol":"CFRunLoopRunSpecific","symbolLocation":608,"imageIndex":3},{"imageOffset":209308,"symbol":"RunCurrentEventLoopInMode","symbolLocation":292,"imageIndex":4},{"imageOffset":208856,"symbol":"ReceiveNextEventCommon","symbolLocation":648,"imageIndex":4},{"imageOffset":208176,"symbol":"_BlockUntilNextEventMatchingListInModeWithFilter","symbolLocation":76,"imageIndex":4},{"imageOffset":236744,"symbol":"_DPSNextEvent","symbolLocation":660,"imageIndex":5},{"imageOffset":8586448,"symbol":"-[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:]","symbolLocation":700,"imageIndex":5},{"imageOffset":184316,"symbol":"-[NSApplication run]","symbolLocation":476,"imageIndex":5},{"imageOffset":16960,"symbol":"NSApplicationMain","symbolLocation":880,"imageIndex":5},{"imageOffset":1090488,"imageIndex":6},{"imageOffset":8863196,"imageIndex":6},{"imageOffset":13037068,"imageIndex":6},{"imageOffset":13428,"symbol":"main","symbolLocation":36,"imageIndex":1},{"imageOffset":24916,"symbol":"start","symbolLocation":2476,"imageIndex":7}]},{"id":132497,"threadState":{"x":[{"value":4},{"value":0},{"value":6157626336},{"value":5456810674},{"value":0},{"value":2912},{"value":105553153641312},{"value":0},{"value":128},{"value":0},{"value":242796851888128},{"value":16},{"value":105553153698188},{"value":2095104},{"value":2043},{"value":2862237879},{"value":30},{"value":2864334843},{"value":0},{"value":5456810400},{"value":5456810674},{"value":0},{"value":6157626384},{"value":0},{"value":5456810452},{"value":8648626624,"symbolLocation":1536,"symbol":"_dispatch_root_queues"},{"value":9223372041167796704},{"value":14987979559889010718},{"value":4313020432}],"flavor":"ARM_THREAD_STATE64","lr":{"value":4312368044},"cpsr":{"value":1610616832},"fp":{"value":6157626800},"sp":{"value":6157625984},"esr":{"value":1442840704,"description":" Address size fault"},"pc":{"value":6905321172},"far":{"value":0}},"queue":"com.apple.root.default-qos","frames":[{"imageOffset":38612,"symbol":"__accept","symbolLocation":8,"imageIndex":10},{"imageOffset":2556844,"symbol":"Socket.acceptClientConnection(invokeDelegate:)","symbolLocation":456,"imageIndex":1},{"imageOffset":418380,"symbol":"closure #3 in startServer()","symbolLocation":180,"imageIndex":1},{"imageOffset":428224,"symbol":"thunk for @escaping @callee_guaranteed @Sendable () -> ()","symbolLocation":28,"imageIndex":1},{"imageOffset":10064,"symbol":"_dispatch_call_block_and_release","symbolLocation":32,"imageIndex":11},{"imageOffset":17384,"symbol":"_dispatch_client_callout","symbolLocation":20,"imageIndex":11},{"imageOffset":30080,"symbol":"_dispatch_queue_override_invoke","symbolLocation":928,"imageIndex":11},{"imageOffset":89768,"symbol":"_dispatch_root_queue_drain","symbolLocation":392,"imageIndex":11},{"imageOffset":91832,"symbol":"_dispatch_worker_thread2","symbolLocation":156,"imageIndex":11},{"imageOffset":12240,"symbol":"_pthread_wqthread","symbolLocation":228,"imageIndex":12},{"imageOffset":7464,"symbol":"start_wqthread","symbolLocation":8,"imageIndex":12}]},{"id":132528,"name":"com.apple.NSEventThread","threadState":{"x":[{"value":268451845},{"value":21592279046},{"value":8589934592,"objc-selector":"\u0001"},{"value":222114233712640},{"value":0},{"value":222114233712640},{"value":2},{"value":4294967295},{"value":18446744073709550527},{"value":51715},{"value":0},{"value":1},{"value":51715},{"value":144646},{"value":0},{"value":0},{"value":18446744073709551569},{"value":8823711464},{"value":0},{"value":4294967295},{"value":2},{"value":222114233712640},{"value":0},{"value":222114233712640},{"value":6159917160},{"value":8589934592,"objc-selector":"\u0001"},{"value":21592279046},{"value":21592279046},{"value":4412409862}],"flavor":"ARM_THREAD_STATE64","lr":{"value":6905361892},"cpsr":{"value":4096},"fp":{"value":6159917008},"sp":{"value":6159916928},"esr":{"value":1442840704,"description":" Address size fault"},"pc":{"value":6905286132},"far":{"value":0}},"frames":[{"imageOffset":3572,"symbol":"mach_msg2_trap","symbolLocation":8,"imageIndex":10},{"imageOffset":79332,"symbol":"mach_msg2_internal","symbolLocation":80,"imageIndex":10},{"imageOffset":39364,"symbol":"mach_msg_overwrite","symbolLocation":476,"imageIndex":10},{"imageOffset":4472,"symbol":"mach_msg","symbolLocation":24,"imageIndex":10},{"imageOffset":517760,"symbol":"__CFRunLoopServiceMachPort","symbolLocation":160,"imageIndex":3},{"imageOffset":511812,"symbol":"__CFRunLoopRun","symbolLocation":1208,"imageIndex":3},{"imageOffset":508980,"symbol":"CFRunLoopRunSpecific","symbolLocation":608,"imageIndex":3},{"imageOffset":1458816,"symbol":"_NSEventThread","symbolLocation":144,"imageIndex":5},{"imageOffset":28564,"symbol":"_pthread_start","symbolLocation":136,"imageIndex":12},{"imageOffset":7476,"symbol":"thread_start","symbolLocation":8,"imageIndex":12}]},{"id":825166,"frames":[{"imageOffset":7456,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":12}],"threadState":{"x":[{"value":6158774272},{"value":76103},{"value":6158237696},{"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":6158774272},"esr":{"value":1442840704,"description":" Address size fault"},"pc":{"value":6905531680},"far":{"value":0}}}],
  "usedImages" : [
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 4492017664,
    "size" : 49152,
    "uuid" : "7d6ca1cb-c5e6-38b6-9618-2c580486fc6b",
    "path" : "\/usr\/lib\/libobjc-trampolines.dylib",
    "name" : "libobjc-trampolines.dylib"
  },
  {
    "source" : "P",
    "arch" : "arm64",
    "base" : 4309811200,
    "CFBundleShortVersionString" : "0.14.1-Beta",
    "CFBundleIdentifier" : "bobko.aerospace",
    "size" : 3342336,
    "uuid" : "d0ce19ab-955c-3bf1-a2c9-5210f72ad711",
    "path" : "\/Applications\/AeroSpace.app\/Contents\/MacOS\/AeroSpace",
    "name" : "AeroSpace"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 7011381248,
    "CFBundleShortVersionString" : "1.22",
    "CFBundleIdentifier" : "com.apple.HIServices",
    "size" : 409600,
    "uuid" : "5edc02bc-3474-3577-a9d5-8d543bc1521e",
    "path" : "\/System\/Library\/Frameworks\/ApplicationServices.framework\/Versions\/A\/Frameworks\/HIServices.framework\/Versions\/A\/HIServices",
    "name" : "HIServices"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 6905950208,
    "CFBundleShortVersionString" : "6.9",
    "CFBundleIdentifier" : "com.apple.CoreFoundation",
    "size" : 5083136,
    "uuid" : "55720ee0-d8c3-33a1-9854-8e61a6f44895",
    "path" : "\/System\/Library\/Frameworks\/CoreFoundation.framework\/Versions\/A\/CoreFoundation",
    "name" : "CoreFoundation",
    "CFBundleVersion" : "2602"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 7082057728,
    "CFBundleShortVersionString" : "2.1.1",
    "CFBundleIdentifier" : "com.apple.HIToolbox",
    "size" : 2899968,
    "uuid" : "4166f6cb-b599-306c-8568-823bd29a74c3",
    "path" : "\/System\/Library\/Frameworks\/Carbon.framework\/Versions\/A\/Frameworks\/HIToolbox.framework\/Versions\/A\/HIToolbox",
    "name" : "HIToolbox"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 6965334016,
    "CFBundleShortVersionString" : "6.9",
    "CFBundleIdentifier" : "com.apple.AppKit",
    "size" : 20180992,
    "uuid" : "7acbeef9-a453-3e4d-98ac-f9441d86e183",
    "path" : "\/System\/Library\/Frameworks\/AppKit.framework\/Versions\/C\/AppKit",
    "name" : "AppKit",
    "CFBundleVersion" : "2487.70.105"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 7637241856,
    "CFBundleShortVersionString" : "5.6.2",
    "CFBundleIdentifier" : "com.apple.SwiftUI",
    "size" : 30294016,
    "uuid" : "0ccf2597-869c-37ef-aded-ce62f6ac3c77",
    "path" : "\/System\/Library\/Frameworks\/SwiftUI.framework\/Versions\/A\/SwiftUI",
    "name" : "SwiftUI",
    "CFBundleVersion" : "5.6.2"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 6901813248,
    "size" : 562440,
    "uuid" : "f635824e-318b-3f0c-842c-c369737f2b68",
    "path" : "\/usr\/lib\/dyld",
    "name" : "dyld"
  },
  {
    "size" : 0,
    "source" : "A",
    "base" : 0,
    "uuid" : "00000000-0000-0000-0000-000000000000"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 7170650112,
    "size" : 5627904,
    "uuid" : "7db1818b-1d9a-328e-821b-21a33442746a",
    "path" : "\/usr\/lib\/swift\/libswiftCore.dylib",
    "name" : "libswiftCore.dylib"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 6905282560,
    "size" : 241660,
    "uuid" : "71ff45b8-f14e-3666-9e96-6cf58315b91d",
    "path" : "\/usr\/lib\/system\/libsystem_kernel.dylib",
    "name" : "libsystem_kernel.dylib"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 6903762944,
    "size" : 294912,
    "uuid" : "1a1ce00a-89cd-36ba-9678-5038aedd0d8d",
    "path" : "\/usr\/lib\/system\/libdispatch.dylib",
    "name" : "libdispatch.dylib"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 6905524224,
    "size" : 53248,
    "uuid" : "e03e8478-6f5c-3d21-a79a-58408f514000",
    "path" : "\/usr\/lib\/system\/libsystem_pthread.dylib",
    "name" : "libsystem_pthread.dylib"
  }
],
  "sharedCache" : {
  "base" : 6901055488,
  "size" : 4214358016,
  "uuid" : "bb3df3d3-38bd-304c-9233-e43de95f1903"
},
  "vmSummary" : "ReadOnly portion of Libraries: Total=1.2G resident=0K(0%) swapped_out_or_unallocated=1.2G(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                            64K        3 \nColorSync                          576K       27 \nCoreAnimation                       16K        1 \nCoreGraphics                       112K        7 \nCoreUI image data                   80K        1 \nFoundation                          16K        1 \nKernel Alloc Once                   32K        1 \nMALLOC                             1.6G       85 \nMALLOC guard page                  288K       18 \nMach message                      5472K       57 \nSTACK GUARD                       56.1M        4 \nStack                             9808K        4 \nVM_ALLOCATE                        176K        6 \n__AUTH                            2251K      368 \n__AUTH_CONST                      29.8M      571 \n__CTF                               824        1 \n__DATA                            12.3M      557 \n__DATA_CONST                      29.4M      578 \n__DATA_DIRTY                      1784K      192 \n__FONT_DATA                          4K        1 \n__INFO_FILTER                         8        1 \n__LINKEDIT                       529.9M        3 \n__OBJC_RO                         71.9M        1 \n__OBJC_RW                         2200K        1 \n__TEXT                           673.3M      595 \ndyld private memory                272K        2 \nmapped file                      191.7M       30 \nshared memory                      864K       13 \n===========                     =======  ======= \nTOTAL                              3.2G     3133 \n",
  "legacyInfo" : {
  "threadTriggered" : {
    "queue" : "com.apple.main-thread"
  }
},
  "logWritingSignature" : "cbf7683e4f7fbd2eb29346ca83ed87d1cfb021cb",
  "trialInfo" : {
  "rollouts" : [
    {
      "rolloutId" : "64c025b28b7f0e739e4fbe58",
      "factorPackIds" : {

      },
      "deploymentId" : 240000019
    },
    {
      "rolloutId" : "64c17a9925d75a7281053d4c",
      "factorPackIds" : {
        "SIRI_AUDIO_DISABLE_MEDIA_ENTITY_SYNC" : "64d29746ad29a465b3bbeace"
      },
      "deploymentId" : 240000002
    }
  ],
  "experiments" : [
    {
      "treatmentId" : "c47ab4cc-c9c3-4b5d-a87c-e2433ce02597",
      "experimentId" : "6639bc6ba73d460582162323",
      "deploymentId" : 400000006
    },
    {
      "treatmentId" : "45f4e2a5-551b-4bc2-a2dc-19c244dda8f8",
      "experimentId" : "6643969b3099cf28e049862f",
      "deploymentId" : 400000007
    }
  ]
}
}
bbrendon commented 2 months ago

Save/restore state automatically would be great. Crashes at least once a day for me. Here are 3 more crashes

https://pastebin.com/T4zRL1J6 https://pastebin.com/b7CM2Cn9 https://pastebin.com/dTWynicP

pencilcheck commented 3 weeks ago

oh man, wish there is a restore functionality as well, or a snapshot features similar to tmux-resurrect.

But i guess that would require a background process continously record the layout every 10s interval so aerospace can use the latest one to restore the windows/app in each workspace.

Looks like the layout feature is being tracked here: https://github.com/nikitabobko/AeroSpace/issues/57