gingerbeardman / stapler

My take on the classic Macintosh app Stapler (with a little bit of LaunchList)
https://blog.gingerbeardman.com/2024/08/10/stapler-i-remade-a-32-year-old-classic-macintosh-app/
MIT License
215 stars 7 forks source link

Stapled documents disappear when Save #3

Closed paalb closed 1 month ago

paalb commented 1 month ago

I made a Screen Recording with QuickTime: (link removed)

The user is run as regular not admin. It only asked me once for admin password. It has not asked me for anything else, like access to folders, files ... I have rebooted after doing the first tests.

gingerbeardman commented 1 month ago

Your iCloud link seems to be a personal one as it is prompting me to enter your password(!)

I'll try to reproduce this issue. Thanks for the report.

paalb commented 1 month ago

OK. Hope this works.

https://github.com/user-attachments/assets/b800079c-8deb-43f4-ac27-1dc380e3c75d

gingerbeardman commented 1 month ago

Thanks, I have this fixed in the latest commit https://github.com/gingerbeardman/stapler/commit/9c15d780d4b6381bd9c002105c2ebc558836c477

Workaround might be to save the doc, then reopen it and then add items.

I'll look to release a new version ASAP, will try to fix the other issues before that.

Will leave this open until it's released and confirmed working.

paalb commented 1 month ago

Just for your info. I can wait for the new version. Tried Workaround before. It crashes the app.

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

Process:               Stapler [2064]
Path:                  /Applications/Stapler.app/Contents/MacOS/Stapler
Identifier:            com.gingerbeardman.Stapler
Version:               1.0 (240810)
Code Type:             ARM-64 (Native)
Parent Process:        launchd [1]
User ID:               502

Date/Time:             2024-08-11 10:38:04.7626 +0200
OS Version:            macOS 14.5 (23F79)
Report Version:        12
Anonymous UUID:        0EF55705-81D0-3506-B198-1B5303978502

Time Awake Since Boot: 1900 seconds

System Integrity Protection: enabled

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

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

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

Application Specific Backtrace 0:
0   CoreFoundation                      0x000000018803f2ec __exceptionPreprocess + 176
1   libobjc.A.dylib                     0x0000000187b26788 objc_exception_throw + 60
2   Foundation                          0x00000001891b242c -[NSCalendarDate initWithCoder:] + 0
3   AppKit                              0x000000018b953b00 -[NSEvent subtype] + 260
4   Stapler                             0x0000000100a37f0c Stapler + 48908
5   Stapler                             0x0000000100a3997c Stapler + 55676
6   SwiftUI                             0x00000001b4595e78 OUTLINED_FUNCTION_0 + 46492
7   SwiftUI                             0x00000001b47b79a4 OUTLINED_FUNCTION_3 + 704
8   SwiftUI                             0x00000001b4f1190c OUTLINED_FUNCTION_2 + 22668
9   SwiftUI                             0x00000001b4f11330 OUTLINED_FUNCTION_2 + 21168
10  SwiftUI                             0x00000001b4f0e0d8 OUTLINED_FUNCTION_2 + 8280
11  SwiftUI                             0x00000001b45c4a54 OUTLINED_FUNCTION_4 + 64944
12  SwiftUI                             0x00000001b45cfb84 OUTLINED_FUNCTION_4 + 110304
13  SwiftUI                             0x00000001b45c4ee0 OUTLINED_FUNCTION_4 + 66108
14  AppKit                              0x000000018b83f848 +[NSAnimationContext runAnimationGroup:] + 56
15  SwiftUI                             0x00000001b45c4930 OUTLINED_FUNCTION_4 + 64652
16  SwiftUI                             0x00000001b45c4f20 OUTLINED_FUNCTION_4 + 66172
17  AppKit                              0x000000018c2d4b58 ___NSViewLayout_block_invoke + 592
18  AppKit                              0x000000018b86a8a4 NSPerformVisuallyAtomicChange + 108
19  AppKit                              0x000000018b86efe4 _NSViewLayout + 96
20  AppKit                              0x000000018c2cb204 __36-[NSView _layoutSubtreeWithOldSize:]_block_invoke + 364
21  AppKit                              0x000000018b86a8a4 NSPerformVisuallyAtomicChange + 108
22  AppKit                              0x000000018b86ef78 -[NSView _layoutSubtreeWithOldSize:] + 100
23  AppKit                              0x000000018c2cb348 __36-[NSView _layoutSubtreeWithOldSize:]_block_invoke + 688
24  AppKit                              0x000000018b86a8a4 NSPerformVisuallyAtomicChange + 108
25  AppKit                              0x000000018b86ef78 -[NSView _layoutSubtreeWithOldSize:] + 100
26  AppKit                              0x000000018c2cbcec __56-[NSView _layoutSubtreeIfNeededAndAllowTemporaryEngine:]_block_invoke + 796
27  AppKit                              0x000000018b86a8a4 NSPerformVisuallyAtomicChange + 108
28  AppKit                              0x000000018b86eb38 -[NSView _layoutSubtreeIfNeededAndAllowTemporaryEngine:] + 100
29  AppKit                              0x000000018b86a8a4 NSPerformVisuallyAtomicChange + 108
30  AppKit                              0x000000018b86eac8 -[NSView layoutSubtreeIfNeeded] + 96
31  AppKit                              0x000000018c576520 -[NSWindow(NSConstraintBasedLayoutInternal) _layoutViewTree] + 104
32  AppKit                              0x000000018c5766a8 -[NSWindow(NSConstraintBasedLayoutInternal) layoutIfNeeded] + 240
33  AppKit                              0x000000018b8cd6b4 __NSWindowGetDisplayCycleObserverForLayout_block_invoke + 364
34  AppKit                              0x000000018b8ccc4c NSDisplayCycleObserverInvoke + 168
35  AppKit                              0x000000018b8cc8a8 NSDisplayCycleFlush + 644
36  QuartzCore                          0x00000001901bbf64 _ZN2CA11Transaction19run_commit_handlersE18CATransactionPhase + 120
37  QuartzCore                          0x00000001901bad04 _ZN2CA11Transaction6commitEv + 320
38  AppKit                              0x000000018b9509d0 __62+[CATransaction(NSCATransaction) NS_setFlushesWithDisplayLink]_block_invoke + 272
39  AppKit                              0x000000018c310208 ___NSRunLoopObserverCreateWithHandler_block_invoke + 64
40  CoreFoundation                      0x0000000187fc987c __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 36
41  CoreFoundation                      0x0000000187fc9768 __CFRunLoopDoObservers + 536
42  CoreFoundation                      0x0000000187fc8d94 __CFRunLoopRun + 776
43  CoreFoundation                      0x0000000187fc8434 CFRunLoopRunSpecific + 608
44  HIToolbox                           0x000000019276c19c RunCurrentEventLoopInMode + 292
45  HIToolbox                           0x000000019276bfd8 ReceiveNextEventCommon + 648
46  HIToolbox                           0x000000019276bd30 _BlockUntilNextEventMatchingListInModeWithFilter + 76
47  AppKit                              0x000000018b827d68 _DPSNextEvent + 660
48  AppKit                              0x000000018c01d808 -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 700
49  AppKit                              0x000000018b81b09c -[NSApplication run] + 476
50  AppKit                              0x000000018b7f22e0 NSApplicationMain + 880
51  SwiftUI                             0x00000001b3966474 OUTLINED_FUNCTION_12 + 13968
52  SwiftUI                             0x00000001b40cfe88 OUTLINED_FUNCTION_3 + 196
53  SwiftUI                             0x00000001b44caeb8 OUTLINED_FUNCTION_0 + 140
54  Stapler                             0x0000000100a3b56c Stapler + 62828
55  dyld                                0x0000000187b620e0 start + 2360

Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
0   AppKit                                 0x18bb04ae8 -[NSApplication _crashOnException:] + 240
1   AppKit                                 0x18b950b44 __62+[CATransaction(NSCATransaction) NS_setFlushesWithDisplayLink]_block_invoke + 644
2   AppKit                                 0x18c310208 ___NSRunLoopObserverCreateWithHandler_block_invoke + 64
3   CoreFoundation                         0x187fc987c __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 36
4   CoreFoundation                         0x187fc9768 __CFRunLoopDoObservers + 536
5   CoreFoundation                         0x187fc8d94 __CFRunLoopRun + 776
6   CoreFoundation                         0x187fc8434 CFRunLoopRunSpecific + 608
7   HIToolbox                              0x19276c19c RunCurrentEventLoopInMode + 292
8   HIToolbox                              0x19276bfd8 ReceiveNextEventCommon + 648
9   HIToolbox                              0x19276bd30 _BlockUntilNextEventMatchingListInModeWithFilter + 76
10  AppKit                                 0x18b827d68 _DPSNextEvent + 660
11  AppKit                                 0x18c01d808 -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 700
12  AppKit                                 0x18b81b09c -[NSApplication run] + 476
13  AppKit                                 0x18b7f22e0 NSApplicationMain + 880
14  SwiftUI                                0x1b3966474 0x1b385c000 + 1090676
15  SwiftUI                                0x1b40cfe88 0x1b385c000 + 8863368
16  SwiftUI                                0x1b44caeb8 0x1b385c000 + 13037240
17  Stapler                                0x100a3b56c 0x100a2c000 + 62828
18  dyld                                   0x187b620e0 start + 2360

Thread 1:
0   libsystem_pthread.dylib                0x187ee5d20 start_wqthread + 0

Thread 2:
0   libsystem_pthread.dylib                0x187ee5d20 start_wqthread + 0

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

Thread 4:: com.apple.NSEventThread
0   libsystem_kernel.dylib                 0x187eaa1f4 mach_msg2_trap + 8
1   libsystem_kernel.dylib                 0x187ebcb24 mach_msg2_internal + 80
2   libsystem_kernel.dylib                 0x187eb2e34 mach_msg_overwrite + 476
3   libsystem_kernel.dylib                 0x187eaa578 mach_msg + 24
4   CoreFoundation                         0x187fca680 __CFRunLoopServiceMachPort + 160
5   CoreFoundation                         0x187fc8f44 __CFRunLoopRun + 1208
6   CoreFoundation                         0x187fc8434 CFRunLoopRunSpecific + 608
7   AppKit                                 0x18b952188 _NSEventThread + 144
8   libsystem_pthread.dylib                0x187eeaf94 _pthread_start + 136
9   libsystem_pthread.dylib                0x187ee5d34 thread_start + 8

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

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

Thread 0 crashed with ARM Thread State (64-bit):
    x0: 0x000000015c0bfe00   x1: 0x000000015c0bf916   x2: 0xfffffffffffffff5   x3: 0x000000015c0c12f5
    x4: 0xffffffffffffe601   x5: 0x0000000000000020   x6: 0x000000015c0bfe00   x7: 0x0000000000001535
    x8: 0x00000001f0281000   x9: 0x683b4363095b00da  x10: 0x683b4363095b00da  x11: 0x000000000000007f
   x12: 0x000000000000006a  x13: 0x000000015a8f9090  x14: 0x01000001efd3c589  x15: 0x00000001efd3c588
   x16: 0x0000000187f1b1a0  x17: 0x00000001fa0d5ec0  x18: 0x0000000000000000  x19: 0x0000600000fc1cb0
   x20: 0x00006000014ab100  x21: 0x0000000aa015ae05  x22: 0x000000015a80a118  x23: 0x000000016f3d2320
   x24: 0x000000015a80a110  x25: 0x0000000000000000  x26: 0x00006000030a6080  x27: 0x0000600000fdb2d0
   x28: 0x0000000187fc9e04   fp: 0x000000016f3d2190   lr: 0xba7a80018bb04ae0
    sp: 0x000000016f3d2160   pc: 0x000000018bb04ae8 cpsr: 0x60001000
   far: 0x0000000000000000  esr: 0xf2000001 (Breakpoint) brk 1

Binary Images:
       0x10c4d8000 -        0x10c4dbfff com.apple.icloud.drive.fileprovider.override (1.0) <db39a641-8c34-385d-8faf-37cb3dcfc89e> /System/Library/Frameworks/FileProvider.framework/OverrideBundles/iCloudDriveFileProviderOverride.bundle/Contents/MacOS/iCloudDriveFileProviderOverride
       0x10c55c000 -        0x10c57bfff com.apple.findersync.fileprovideroverride.FinderSyncCollaborationFileProviderOverride (14.5) <45b63a1f-97c2-3047-9430-120757ec26f6> /System/Library/Frameworks/FileProvider.framework/OverrideBundles/FinderSyncCollaborationFileProviderOverride.bundle/Contents/MacOS/FinderSyncCollaborationFileProviderOverride
       0x10c4c0000 -        0x10c4c7fff com.apple.FileProviderOverride (1835.120.53) <48c78787-aebf-3b9c-8300-2b20ba87b0a4> /System/Library/Frameworks/FileProvider.framework/OverrideBundles/FileProviderOverride.bundle/Contents/MacOS/FileProviderOverride
       0x10c40c000 -        0x10c42bfff com.apple.security.csparser (3.0) <5b38c00e-20a2-3dd5-b582-3d7bf058f0ba> /System/Library/Frameworks/Security.framework/Versions/A/PlugIns/csparser.bundle/Contents/MacOS/csparser
       0x100e28000 -        0x100e33fff libobjc-trampolines.dylib (*) <9381bd6d-84a5-3c72-b3b8-88428afa4782> /usr/lib/libobjc-trampolines.dylib
       0x100a2c000 -        0x100a4bfff com.gingerbeardman.Stapler (1.0) <c0d16440-0d07-3f28-91be-87dd9beeb679> /Applications/Stapler.app/Contents/MacOS/Stapler
       0x18b7ee000 -        0x18cb2afff com.apple.AppKit (6.9) <61f710be-9132-3cc2-883d-066365fba1ad> /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
       0x187f4c000 -        0x188424fff com.apple.CoreFoundation (6.9) <84b539d5-22c9-3f8c-84c8-903e9c7b8d29> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
       0x192739000 -        0x1929fcfff com.apple.HIToolbox (2.1.1) <7db6c397-563f-3756-908c-e25b019a1848> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox
       0x1b385c000 -        0x1b553ffff com.apple.SwiftUI (5.5.8) <71c9cc70-1a85-396b-a92a-c893fe8bd541> /System/Library/Frameworks/SwiftUI.framework/Versions/A/SwiftUI
       0x187b5c000 -        0x187be4a17 dyld (*) <37bbc384-0755-31c7-a808-0ed49e44dd8e> /usr/lib/dyld
               0x0 - 0xffffffffffffffff ??? (*) <00000000-0000-0000-0000-000000000000> ???
       0x187f17000 -        0x187f1efe7 libsystem_platform.dylib (*) <d5bbfc31-d52a-37d6-a41b-48638113ad4c> /usr/lib/system/libsystem_platform.dylib
       0x187ee4000 -        0x187ef0fff libsystem_pthread.dylib (*) <386b0fc1-7873-3328-8e71-43269fd1b2c7> /usr/lib/system/libsystem_pthread.dylib
       0x187ea9000 -        0x187ee3ffb libsystem_kernel.dylib (*) <9b8b53f9-e2b6-36df-98e9-28d8fca732f2> /usr/lib/system/libsystem_kernel.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.1G resident=0K(0%) swapped_out_or_unallocated=1.1G(100%)
Writable regions: Total=1.8G written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=1.8G(100%)

                                VIRTUAL   REGION 
REGION TYPE                        SIZE    COUNT (non-coalesced) 
===========                     =======  ======= 
Accelerate framework               128K        1 
Activity Tracing                   256K        1 
AttributeGraph Data               1024K        1 
ColorSync                          544K       26 
CoreAnimation                      608K       38 
CoreGraphics                        32K        2 
CoreUI image data                  976K        5 
Foundation                          16K        1 
Kernel Alloc Once                   32K        1 
MALLOC                             1.7G       65 
MALLOC guard page                  288K       18 
STACK GUARD                       56.1M        7 
Stack                             11.2M        7 
VM_ALLOCATE                        128K        8 
__AUTH                            1947K      343 
__AUTH_CONST                      28.9M      544 
__CTF                               824        1 
__DATA                            13.6M      532 
__DATA_CONST                      28.3M      555 
__DATA_DIRTY                      1797K      196 
__FONT_DATA                          4K        1 
__LINKEDIT                       533.2M        7 
__OBJC_RO                         71.9M        1 
__OBJC_RW                         2199K        1 
__TEXT                           643.3M      572 
dyld private memory                272K        2 
mapped file                      184.0M       28 
shared memory                      864K       14 
===========                     =======  ======= 
TOTAL                              3.3G     2978 

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

{"app_name":"Stapler","timestamp":"2024-08-11 10:38:07.00 +0200","app_version":"1.0","slice_uuid":"c0d16440-0d07-3f28-91be-87dd9beeb679","build_version":"240810","platform":1,"bundleID":"com.gingerbeardman.Stapler","share_with_app_devs":0,"is_first_party":0,"bug_type":"309","os_version":"macOS 14.5 (23F79)","roots_installed":0,"name":"Stapler","incident_id":"E7C55940-FFFF-43EC-8763-2BB9CF8F5CF8"}
{
  "uptime" : 1900,
  "procRole" : "Foreground",
  "version" : 2,
  "userID" : 502,
  "deployVersion" : 210,
  "modelCode" : "MacBookPro18,2",
  "coalitionID" : 1950,
  "osVersion" : {
    "train" : "macOS 14.5",
    "build" : "23F79",
    "releaseType" : "User"
  },
  "captureTime" : "2024-08-11 10:38:04.7626 +0200",
  "codeSigningMonitor" : 1,
  "incident" : "E7C55940-FFFF-43EC-8763-2BB9CF8F5CF8",
  "pid" : 2064,
  "translated" : false,
  "cpuType" : "ARM-64",
  "roots_installed" : 0,
  "bug_type" : "309",
  "procLaunch" : "2024-08-11 10:37:55.0446 +0200",
  "procStartAbsTime" : 45404520999,
  "procExitAbsTime" : 45637405378,
  "procName" : "Stapler",
  "procPath" : "\/Applications\/Stapler.app\/Contents\/MacOS\/Stapler",
  "bundleInfo" : {"CFBundleShortVersionString":"1.0","CFBundleVersion":"240810","CFBundleIdentifier":"com.gingerbeardman.Stapler"},
  "storeInfo" : {"deviceIdentifierForVendor":"BCE86C7A-FECC-530A-B728-F300DDC2F72E","thirdParty":true},
  "parentProc" : "launchd",
  "parentPid" : 1,
  "coalitionName" : "com.gingerbeardman.Stapler",
  "crashReporterKey" : "0EF55705-81D0-3506-B198-1B5303978502",
  "lowPowerMode" : 1,
  "codeSigningID" : "com.gingerbeardman.Stapler",
  "codeSigningTeamID" : "Q3Z639YB49",
  "codeSigningFlags" : 1644245777,
  "codeSigningValidationCategory" : 3,
  "codeSigningTrustLevel" : 4294967295,
  "instructionByteStream" : {"beforePC":"AKAmkQcU+pfgAxOqzbM+lML6MpBCICaRasg+lIHOPJToOzKwAKUG+Q==","atPC":"IAAg1MGaLJT\/AwD5AACA0voT+pfdmiyUIAAg1AEAABTzAwCq0ZoslA=="},
  "sip" : "enabled",
  "exception" : {"codes":"0x0000000000000001, 0x000000018bb04ae8","rawCodes":[1,6638553832],"type":"EXC_BREAKPOINT","signal":"SIGTRAP"},
  "termination" : {"flags":0,"code":5,"namespace":"SIGNAL","indicator":"Trace\/BPT trap: 5","byProc":"exc handler","byPid":2064},
  "os_fault" : {"process":"Stapler"},
  "asiBacktraces" : ["0   CoreFoundation                      0x000000018803f2ec __exceptionPreprocess + 176\n1   libobjc.A.dylib                     0x0000000187b26788 objc_exception_throw + 60\n2   Foundation                          0x00000001891b242c -[NSCalendarDate initWithCoder:] + 0\n3   AppKit                              0x000000018b953b00 -[NSEvent subtype] + 260\n4   Stapler                             0x0000000100a37f0c Stapler + 48908\n5   Stapler                             0x0000000100a3997c Stapler + 55676\n6   SwiftUI                             0x00000001b4595e78 OUTLINED_FUNCTION_0 + 46492\n7   SwiftUI                             0x00000001b47b79a4 OUTLINED_FUNCTION_3 + 704\n8   SwiftUI                             0x00000001b4f1190c OUTLINED_FUNCTION_2 + 22668\n9   SwiftUI                             0x00000001b4f11330 OUTLINED_FUNCTION_2 + 21168\n10  SwiftUI                             0x00000001b4f0e0d8 OUTLINED_FUNCTION_2 + 8280\n11  SwiftUI                             0x00000001b45c4a54 OUTLINED_FUNCTION_4 + 64944\n12  SwiftUI                             0x00000001b45cfb84 OUTLINED_FUNCTION_4 + 110304\n13  SwiftUI                             0x00000001b45c4ee0 OUTLINED_FUNCTION_4 + 66108\n14  AppKit                              0x000000018b83f848 +[NSAnimationContext runAnimationGroup:] + 56\n15  SwiftUI                             0x00000001b45c4930 OUTLINED_FUNCTION_4 + 64652\n16  SwiftUI                             0x00000001b45c4f20 OUTLINED_FUNCTION_4 + 66172\n17  AppKit                              0x000000018c2d4b58 ___NSViewLayout_block_invoke + 592\n18  AppKit                              0x000000018b86a8a4 NSPerformVisuallyAtomicChange + 108\n19  AppKit                              0x000000018b86efe4 _NSViewLayout + 96\n20  AppKit                              0x000000018c2cb204 __36-[NSView _layoutSubtreeWithOldSize:]_block_invoke + 364\n21  AppKit                              0x000000018b86a8a4 NSPerformVisuallyAtomicChange + 108\n22  AppKit                              0x000000018b86ef78 -[NSView _layoutSubtreeWithOldSize:] + 100\n23  AppKit                              0x000000018c2cb348 __36-[NSView _layoutSubtreeWithOldSize:]_block_invoke + 688\n24  AppKit                              0x000000018b86a8a4 NSPerformVisuallyAtomicChange + 108\n25  AppKit                              0x000000018b86ef78 -[NSView _layoutSubtreeWithOldSize:] + 100\n26  AppKit                              0x000000018c2cbcec __56-[NSView _layoutSubtreeIfNeededAndAllowTemporaryEngine:]_block_invoke + 796\n27  AppKit                              0x000000018b86a8a4 NSPerformVisuallyAtomicChange + 108\n28  AppKit                              0x000000018b86eb38 -[NSView _layoutSubtreeIfNeededAndAllowTemporaryEngine:] + 100\n29  AppKit                              0x000000018b86a8a4 NSPerformVisuallyAtomicChange + 108\n30  AppKit                              0x000000018b86eac8 -[NSView layoutSubtreeIfNeeded] + 96\n31  AppKit                              0x000000018c576520 -[NSWindow(NSConstraintBasedLayoutInternal) _layoutViewTree] + 104\n32  AppKit                              0x000000018c5766a8 -[NSWindow(NSConstraintBasedLayoutInternal) layoutIfNeeded] + 240\n33  AppKit                              0x000000018b8cd6b4 __NSWindowGetDisplayCycleObserverForLayout_block_invoke + 364\n34  AppKit                              0x000000018b8ccc4c NSDisplayCycleObserverInvoke + 168\n35  AppKit                              0x000000018b8cc8a8 NSDisplayCycleFlush + 644\n36  QuartzCore                          0x00000001901bbf64 _ZN2CA11Transaction19run_commit_handlersE18CATransactionPhase + 120\n37  QuartzCore                          0x00000001901bad04 _ZN2CA11Transaction6commitEv + 320\n38  AppKit                              0x000000018b9509d0 __62+[CATransaction(NSCATransaction) NS_setFlushesWithDisplayLink]_block_invoke + 272\n39  AppKit                              0x000000018c310208 ___NSRunLoopObserverCreateWithHandler_block_invoke + 64\n40  CoreFoundation                      0x0000000187fc987c __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 36\n41  CoreFoundation                      0x0000000187fc9768 __CFRunLoopDoObservers + 536\n42  CoreFoundation                      0x0000000187fc8d94 __CFRunLoopRun + 776\n43  CoreFoundation                      0x0000000187fc8434 CFRunLoopRunSpecific + 608\n44  HIToolbox                           0x000000019276c19c RunCurrentEventLoopInMode + 292\n45  HIToolbox                           0x000000019276bfd8 ReceiveNextEventCommon + 648\n46  HIToolbox                           0x000000019276bd30 _BlockUntilNextEventMatchingListInModeWithFilter + 76\n47  AppKit                              0x000000018b827d68 _DPSNextEvent + 660\n48  AppKit                              0x000000018c01d808 -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 700\n49  AppKit                              0x000000018b81b09c -[NSApplication run] + 476\n50  AppKit                              0x000000018b7f22e0 NSApplicationMain + 880\n51  SwiftUI                             0x00000001b3966474 OUTLINED_FUNCTION_12 + 13968\n52  SwiftUI                             0x00000001b40cfe88 OUTLINED_FUNCTION_3 + 196\n53  SwiftUI                             0x00000001b44caeb8 OUTLINED_FUNCTION_0 + 140\n54  Stapler                             0x0000000100a3b56c Stapler + 62828\n55  dyld                                0x0000000187b620e0 start + 2360"],
  "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":34445,"threadState":{"x":[{"value":5839257088},{"value":5839255830},{"value":18446744073709551605},{"value":5839262453},{"value":18446744073709544961},{"value":32},{"value":5839257088},{"value":5429},{"value":8324124672,"symbolLocation":24,"symbol":"_OBJC_PROTOCOL_$__NSQuickActionItemSource"},{"value":7510670896208216282},{"value":7510670896208216282},{"value":127},{"value":106},{"value":5814325392},{"value":72057602356528521,"symbolLocation":72057594037927937,"symbol":"OBJC_CLASS_$___NSCFString"},{"value":8318600584,"symbolLocation":0,"symbol":"OBJC_CLASS_$___NSCFString"},{"value":6575731104,"symbolLocation":0,"symbol":"_platform_memmove"},{"value":8490147520},{"value":0},{"value":105553132788912},{"value":105553137938688},{"value":45635448325},{"value":5813346584},{"value":6161244960},{"value":5813346576},{"value":0},{"value":105553167278208},{"value":105553132892880},{"value":6576446980,"symbolLocation":0,"symbol":"_runLoopObserverWithBlockContext"}],"flavor":"ARM_THREAD_STATE64","lr":{"value":13437193182340205280},"cpsr":{"value":1610616832},"fp":{"value":6161244560},"sp":{"value":6161244512},"esr":{"value":4060086273,"description":"(Breakpoint) brk 1"},"pc":{"value":6638553832,"matchesCrashFrame":1},"far":{"value":0}},"queue":"com.apple.main-thread","frames":[{"imageOffset":3238632,"symbol":"-[NSApplication _crashOnException:]","symbolLocation":240,"imageIndex":6},{"imageOffset":1452868,"symbol":"__62+[CATransaction(NSCATransaction) NS_setFlushesWithDisplayLink]_block_invoke","symbolLocation":644,"imageIndex":6},{"imageOffset":11674120,"symbol":"___NSRunLoopObserverCreateWithHandler_block_invoke","symbolLocation":64,"imageIndex":6},{"imageOffset":514172,"symbol":"__CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__","symbolLocation":36,"imageIndex":7},{"imageOffset":513896,"symbol":"__CFRunLoopDoObservers","symbolLocation":536,"imageIndex":7},{"imageOffset":511380,"symbol":"__CFRunLoopRun","symbolLocation":776,"imageIndex":7},{"imageOffset":508980,"symbol":"CFRunLoopRunSpecific","symbolLocation":608,"imageIndex":7},{"imageOffset":209308,"symbol":"RunCurrentEventLoopInMode","symbolLocation":292,"imageIndex":8},{"imageOffset":208856,"symbol":"ReceiveNextEventCommon","symbolLocation":648,"imageIndex":8},{"imageOffset":208176,"symbol":"_BlockUntilNextEventMatchingListInModeWithFilter","symbolLocation":76,"imageIndex":8},{"imageOffset":236904,"symbol":"_DPSNextEvent","symbolLocation":660,"imageIndex":6},{"imageOffset":8583176,"symbol":"-[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:]","symbolLocation":700,"imageIndex":6},{"imageOffset":184476,"symbol":"-[NSApplication run]","symbolLocation":476,"imageIndex":6},{"imageOffset":17120,"symbol":"NSApplicationMain","symbolLocation":880,"imageIndex":6},{"imageOffset":1090676,"imageIndex":9},{"imageOffset":8863368,"imageIndex":9},{"imageOffset":13037240,"imageIndex":9},{"imageOffset":62828,"imageIndex":5},{"imageOffset":24800,"symbol":"start","symbolLocation":2360,"imageIndex":10}]},{"id":34450,"frames":[{"imageOffset":7456,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":13}],"threadState":{"x":[{"value":6161805312},{"value":6407},{"value":6161268736},{"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":6161805312},"esr":{"value":1442840704,"description":" Address size fault"},"pc":{"value":6575512864},"far":{"value":0}}},{"id":34452,"frames":[{"imageOffset":7456,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":13}],"threadState":{"x":[{"value":6162952192},{"value":20487},{"value":6162415616},{"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":6162952192},"esr":{"value":1442840704,"description":" Address size fault"},"pc":{"value":6575512864},"far":{"value":0}}},{"id":34454,"frames":[{"imageOffset":7456,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":13}],"threadState":{"x":[{"value":6164099072},{"value":64771},{"value":6163562496},{"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":6164099072},"esr":{"value":1442840704,"description":" Address size fault"},"pc":{"value":6575512864},"far":{"value":0}}},{"id":34532,"name":"com.apple.NSEventThread","threadState":{"x":[{"value":268451845},{"value":21592279046},{"value":8589934592},{"value":252900559290368},{"value":0},{"value":252900559290368},{"value":2},{"value":4294967295},{"value":18446744073709550527},{"value":58883},{"value":0},{"value":1},{"value":58883},{"value":372570},{"value":0},{"value":0},{"value":18446744073709551569},{"value":8490146560},{"value":0},{"value":4294967295},{"value":2},{"value":252900559290368},{"value":0},{"value":252900559290368},{"value":6164668520},{"value":8589934592},{"value":21592279046},{"value":21592279046},{"value":4412409862}],"flavor":"ARM_THREAD_STATE64","lr":{"value":6575344420},"cpsr":{"value":4096},"fp":{"value":6164668368},"sp":{"value":6164668288},"esr":{"value":1442840704,"description":" Address size fault"},"pc":{"value":6575268340},"far":{"value":0}},"frames":[{"imageOffset":4596,"symbol":"mach_msg2_trap","symbolLocation":8,"imageIndex":14},{"imageOffset":80676,"symbol":"mach_msg2_internal","symbolLocation":80,"imageIndex":14},{"imageOffset":40500,"symbol":"mach_msg_overwrite","symbolLocation":476,"imageIndex":14},{"imageOffset":5496,"symbol":"mach_msg","symbolLocation":24,"imageIndex":14},{"imageOffset":517760,"symbol":"__CFRunLoopServiceMachPort","symbolLocation":160,"imageIndex":7},{"imageOffset":511812,"symbol":"__CFRunLoopRun","symbolLocation":1208,"imageIndex":7},{"imageOffset":508980,"symbol":"CFRunLoopRunSpecific","symbolLocation":608,"imageIndex":7},{"imageOffset":1458568,"symbol":"_NSEventThread","symbolLocation":144,"imageIndex":6},{"imageOffset":28564,"symbol":"_pthread_start","symbolLocation":136,"imageIndex":13},{"imageOffset":7476,"symbol":"thread_start","symbolLocation":8,"imageIndex":13}]},{"id":34658,"frames":[{"imageOffset":7456,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":13}],"threadState":{"x":[{"value":6162378752},{"value":60527},{"value":6161842176},{"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":6162378752},"esr":{"value":1442840704,"description":" Address size fault"},"pc":{"value":6575512864},"far":{"value":0}}},{"id":34660,"frames":[{"imageOffset":7456,"symbol":"start_wqthread","symbolLocation":0,"imageIndex":13}],"threadState":{"x":[{"value":6163525632},{"value":61959},{"value":6162989056},{"value":0},{"value":409602},{"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":6163525632},"esr":{"value":1442840704,"description":" Address size fault"},"pc":{"value":6575512864},"far":{"value":0}}}],
  "usedImages" : [
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 4501372928,
    "CFBundleShortVersionString" : "1.0",
    "CFBundleIdentifier" : "com.apple.icloud.drive.fileprovider.override",
    "size" : 16384,
    "uuid" : "db39a641-8c34-385d-8faf-37cb3dcfc89e",
    "path" : "\/System\/Library\/Frameworks\/FileProvider.framework\/OverrideBundles\/iCloudDriveFileProviderOverride.bundle\/Contents\/MacOS\/iCloudDriveFileProviderOverride",
    "name" : "iCloudDriveFileProviderOverride",
    "CFBundleVersion" : "2720.120.29"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 4501913600,
    "CFBundleShortVersionString" : "14.5",
    "CFBundleIdentifier" : "com.apple.findersync.fileprovideroverride.FinderSyncCollaborationFileProviderOverride",
    "size" : 131072,
    "uuid" : "45b63a1f-97c2-3047-9430-120757ec26f6",
    "path" : "\/System\/Library\/Frameworks\/FileProvider.framework\/OverrideBundles\/FinderSyncCollaborationFileProviderOverride.bundle\/Contents\/MacOS\/FinderSyncCollaborationFileProviderOverride",
    "name" : "FinderSyncCollaborationFileProviderOverride",
    "CFBundleVersion" : "1632.5.3"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 4501274624,
    "CFBundleShortVersionString" : "1835.120.53",
    "CFBundleIdentifier" : "com.apple.FileProviderOverride",
    "size" : 32768,
    "uuid" : "48c78787-aebf-3b9c-8300-2b20ba87b0a4",
    "path" : "\/System\/Library\/Frameworks\/FileProvider.framework\/OverrideBundles\/FileProviderOverride.bundle\/Contents\/MacOS\/FileProviderOverride",
    "name" : "FileProviderOverride",
    "CFBundleVersion" : "1835.120.53"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 4500537344,
    "CFBundleShortVersionString" : "3.0",
    "CFBundleIdentifier" : "com.apple.security.csparser",
    "size" : 131072,
    "uuid" : "5b38c00e-20a2-3dd5-b582-3d7bf058f0ba",
    "path" : "\/System\/Library\/Frameworks\/Security.framework\/Versions\/A\/PlugIns\/csparser.bundle\/Contents\/MacOS\/csparser",
    "name" : "csparser",
    "CFBundleVersion" : "61123.121.1"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 4309811200,
    "size" : 49152,
    "uuid" : "9381bd6d-84a5-3c72-b3b8-88428afa4782",
    "path" : "\/usr\/lib\/libobjc-trampolines.dylib",
    "name" : "libobjc-trampolines.dylib"
  },
  {
    "source" : "P",
    "arch" : "arm64",
    "base" : 4305633280,
    "CFBundleShortVersionString" : "1.0",
    "CFBundleIdentifier" : "com.gingerbeardman.Stapler",
    "size" : 131072,
    "uuid" : "c0d16440-0d07-3f28-91be-87dd9beeb679",
    "path" : "\/Applications\/Stapler.app\/Contents\/MacOS\/Stapler",
    "name" : "Stapler",
    "CFBundleVersion" : "240810"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 6635315200,
    "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" : 6575931392,
    "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"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 6752014336,
    "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" : 7306854400,
    "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" : 6571802624,
    "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" : 6575714304,
    "size" : 32744,
    "uuid" : "d5bbfc31-d52a-37d6-a41b-48638113ad4c",
    "path" : "\/usr\/lib\/system\/libsystem_platform.dylib",
    "name" : "libsystem_platform.dylib"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 6575505408,
    "size" : 53248,
    "uuid" : "386b0fc1-7873-3328-8e71-43269fd1b2c7",
    "path" : "\/usr\/lib\/system\/libsystem_pthread.dylib",
    "name" : "libsystem_pthread.dylib"
  },
  {
    "source" : "P",
    "arch" : "arm64e",
    "base" : 6575263744,
    "size" : 241660,
    "uuid" : "9b8b53f9-e2b6-36df-98e9-28d8fca732f2",
    "path" : "\/usr\/lib\/system\/libsystem_kernel.dylib",
    "name" : "libsystem_kernel.dylib"
  }
],
  "sharedCache" : {
  "base" : 6571048960,
  "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.8G written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=1.8G(100%)\n\n                                VIRTUAL   REGION \nREGION TYPE                        SIZE    COUNT (non-coalesced) \n===========                     =======  ======= \nAccelerate framework               128K        1 \nActivity Tracing                   256K        1 \nAttributeGraph Data               1024K        1 \nColorSync                          544K       26 \nCoreAnimation                      608K       38 \nCoreGraphics                        32K        2 \nCoreUI image data                  976K        5 \nFoundation                          16K        1 \nKernel Alloc Once                   32K        1 \nMALLOC                             1.7G       65 \nMALLOC guard page                  288K       18 \nSTACK GUARD                       56.1M        7 \nStack                             11.2M        7 \nVM_ALLOCATE                        128K        8 \n__AUTH                            1947K      343 \n__AUTH_CONST                      28.9M      544 \n__CTF                               824        1 \n__DATA                            13.6M      532 \n__DATA_CONST                      28.3M      555 \n__DATA_DIRTY                      1797K      196 \n__FONT_DATA                          4K        1 \n__LINKEDIT                       533.2M        7 \n__OBJC_RO                         71.9M        1 \n__OBJC_RW                         2199K        1 \n__TEXT                           643.3M      572 \ndyld private memory                272K        2 \nmapped file                      184.0M       28 \nshared memory                      864K       14 \n===========                     =======  ======= \nTOTAL                              3.3G     2978 \n",
  "legacyInfo" : {
  "threadTriggered" : {
    "queue" : "com.apple.main-thread"
  }
},
  "logWritingSignature" : "9732eb6eb5384f452cadeb76a30bd4bdfcbe53dc",
  "trialInfo" : {
  "rollouts" : [
    {
      "rolloutId" : "65a8173205d942272410674b",
      "factorPackIds" : {
        "SIRI_HOME_AUTOMATION_SERVER_FLOW_DEPRECATION" : "65d39fa4cb0e2417d11ce5f6"
      },
      "deploymentId" : 240000001
    },
    {
      "rolloutId" : "648a2601f74c42732876cb5b",
      "factorPackIds" : {
        "SIRI_TEXT_TO_SPEECH" : "6699af8e86533c4d1be8b240"
      },
      "deploymentId" : 240000227
    }
  ],
  "experiments" : [
    {
      "treatmentId" : "c47ab4cc-c9c3-4b5d-a87c-e2433ce02597",
      "experimentId" : "6639bc6ba73d460582162323",
      "deploymentId" : 400000006
    },
    {
      "treatmentId" : "45f4e2a5-551b-4bc2-a2dc-19c244dda8f8",
      "experimentId" : "6643969b3099cf28e049862f",
      "deploymentId" : 400000006
    }
  ]
}
}

Model: MacBookPro18,2, BootROM 10151.121.1, proc 10:8:2 processors, 32 GB, SMC 
Graphics: Apple M1 Max, Apple M1 Max, Built-In
Display: Color LCD, 3456 x 2234 Retina, Main, MirrorOff, Online
Memory Module: LPDDR5, Samsung
AirPort: spairport_wireless_card_type_wifi (0x14E4, 0x4387), wl0: Apr  4 2024 20:37:43 version 20.103.14.0.8.7.174 FWID 01-95f1e684
AirPort: 
Bluetooth: Version (null), 0 services, 0 devices, 0 incoming serial ports
Network Service: Wi-Fi, AirPort, en0
USB Device: USB31Bus
USB Device: USB31Bus
USB Device: USB31Bus
Thunderbolt Bus: MacBook Pro, Apple Inc.
Thunderbolt Bus: MacBook Pro, Apple Inc.
Thunderbolt Bus: MacBook Pro, Apple Inc.
gingerbeardman commented 1 month ago

Crikey! I'll look into that one.

gingerbeardman commented 1 month ago

Blank doc issue solved for me in 1.1 https://github.com/gingerbeardman/stapler/releases/latest

If you're still having related issues, feel free to comment here.

The crash I have no idea about right now, but if you can figure out steps to reproduce it with v1.1 then please file a new issue.