What happened?
Whenever I click the 3-dot menu next to a repository in the sidebar, and choose "Remove Repository...", I get a modal and once I confirm the app runs for a little bit then crashes completely.
I get a full macOS crash report, that seems very similar to #784 / #785:
Triggered by Thread: 0, Dispatch Queue: com.apple.main-thread
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Termination Reason: Namespace SIGNAL, Code 6, Abort trap: 6
Terminating Process: supacode [897]
Application Specific Information:
abort() called
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x19ce415b0 __pthread_kill + 8
1 libsystem_pthread.dylib 0x19ce7b888 pthread_kill + 296
2 libsystem_c.dylib 0x19cd80850 abort + 124
3 libsystem_malloc.dylib 0x19cc7f224 malloc_vreport + 892
4 libsystem_malloc.dylib 0x19cc82f78 malloc_report + 64
5 libsystem_malloc.dylib 0x19cc87e04 ___BUG_IN_CLIENT_OF_LIBMALLOC_POINTER_BEING_FREED_WAS_NOT_ALLOCATED + 76
6 libswift_Concurrency.dylib 0x29c2f683c swift::TaskLocal::StopLookupScope::~StopLookupScope() + 144
7 libswift_Concurrency.dylib 0x29c2e78e0 swift_task_deinitOnExecutorImpl(void*, void (void*) swiftcall*, swift::SerialExecutorRef, unsigned long) + 152
8 libswiftCore.dylib 0x1b02db5a8 _swift_release_dealloc + 56
9 libswiftCore.dylib 0x1b02dc114 bool swift::RefCounts<swift::RefCountBitsT<(swift::RefCountInlinedness)1>>::doDecrementSlow<(swift::PerformDeinit)1>(swift::RefCountBitsT<(swift::RefCountInlinedness)1>, unsigned int) + 152
10 supacode 0x1030cf4e0 0x102b0c000 + 6042848
11 AttributeGraph 0x1d2806030 AGGraphSetOutputValue + 608
12 SwiftUICore 0x24c10ede8 closure #1 in StatefulRule.value.setter + 72
13 SwiftUICore 0x24b955d6c partial apply for closure #1 in StatefulRule.value.setter + 24
14 SwiftUICore 0x24b9691d0 withUnsafePointer<A, B, C>(to:_:) + 160
15 SwiftUICore 0x24c33e9ec CachedView.updateValue() + 988
16 SwiftUICore 0x24b977698 partial apply for implicit closure #1 in closure #1 in closure #1 in Attribute.init<A>(_:) + 32
17 AttributeGraph 0x1d27e4554 AG::Graph::UpdateStack::update() + 500
18 AttributeGraph 0x1d27f4230 AG::Subgraph::update(unsigned int) + 960
19 SwiftUICore 0x24bf1a7a4 specialized GraphHost.runTransaction(_:do:id:) + 388
20 SwiftUICore 0x24befd550 GraphHost.flushTransactions() + 184
21 SwiftUICore 0x24b87c80c specialized GraphHost.asyncTransaction<A>(_:id:mutation:style:mayDeferUpdate:) + 780
22 SwiftUICore 0x24bf267bc closure #1 in closure #2 in ObservationCenter.invalidate<A>(_:onChangeIn:) + 272
23 SwiftUICore 0x24bf26624 closure #2 in ObservationCenter.invalidate<A>(_:onChangeIn:) + 144
24 libswiftObservation.dylib 0x29c113960 partial apply for closure #4 in closure #1 in static ObservationTracking._installTracking(_:willSet:didSet:) + 112
25 libswiftObservation.dylib 0x29c1139e0 partial apply for thunk for @escaping @callee_guaranteed @Sendable (@guaranteed AnyKeyPath) -> () + 32
26 libswiftObservation.dylib 0x29c110ec0 specialized ObservationRegistrar.Context.willSet<A, B>(_:keyPath:) + 508
27 libswiftObservation.dylib 0x29c1113dc specialized ObservationRegistrar.willSet<A, B>(_:keyPath:) + 68
28 libswiftObservation.dylib 0x29c10a47c ObservationRegistrar.withMutation<A, B, C>(of:keyPath:_:) + 100
29 supacode 0x102e119e4 0x102b0c000 + 3168740
30 supacode 0x102e3c848 0x102b0c000 + 3344456
31 SwiftUICore 0x24bbccde0 closure #1 in withTransaction<A>(_:_:) + 308
32 SwiftUICore 0x24bbcce90 partial apply for closure #1 in withTransaction<A>(_:_:) + 28
33 SwiftUICore 0x24bbccf34 withExtendedLifetime<A, B, C>(_:_:) + 156
34 SwiftUICore 0x24bbcbe04 withTransaction<A>(_:_:) + 124
35 SwiftUICore 0x24c2cf638 withAnimation<A>(_:_:) + 120
36 supacode 0x102e23298 0x102b0c000 + 3240600
37 supacode 0x102dcb784 0x102b0c000 + 2881412
38 supacode 0x103c200cc 0x102b0c000 + 17907916
39 supacode 0x103c10ae0 0x102b0c000 + 17844960
40 supacode 0x103c1c67c 0x102b0c000 + 17892988
41 supacode 0x103c1c67c 0x102b0c000 + 17892988
42 supacode 0x103c1c67c 0x102b0c000 + 17892988
43 supacode 0x103c0c1dc 0x102b0c000 + 17826268
-------- RECURSION LEVEL 13
44 supacode 0x103c0c1dc 0x102b0c000 + 17826268
-------- RECURSION LEVEL 12
45 supacode 0x103c0c1dc 0x102b0c000 + 17826268
-------- RECURSION LEVEL 11
--------
-------- ELIDED 7 LEVELS OF RECURSION THROUGH 0x103c0c1dc 0x102b0c000 + 17826268
--------
56 supacode 0x103c0c1dc 0x102b0c000 + 17826268
-------- RECURSION LEVEL 3
57 supacode 0x103c0c1dc 0x102b0c000 + 17826268
-------- RECURSION LEVEL 2
58 supacode 0x103c0c1dc 0x102b0c000 + 17826268
-------- RECURSION LEVEL 1
59 supacode 0x103c0baac 0x102b0c000 + 17824428
60 supacode 0x102bb89bc 0x102b0c000 + 707004
61 supacode 0x103c0e2e8 0x102b0c000 + 17834728
62 supacode 0x103b48f7c 0x102b0c000 + 17026940
63 supacode 0x103b4bb5c 0x102b0c000 + 17038172
64 libswift_Concurrency.dylib 0x29c2b68fc TaskLocal.withValue<A>(_:operation:file:line:) + 232
65 supacode 0x103b48ae0 0x102b0c000 + 17025760
66 supacode 0x103c0e25c 0x102b0c000 + 17834588
67 supacode 0x103bdc768 0x102b0c000 + 17631080
68 supacode 0x103bdfb80 0x102b0c000 + 17644416
69 supacode 0x103be0234 0x102b0c000 + 17646132
70 supacode 0x103c30584 0x102b0c000 + 17974660
71 supacode 0x103bfa0a8 0x102b0c000 + 17752232
72 supacode 0x103bfa830 0x102b0c000 + 17754160
73 SwiftUI 0x1d23b84b4 partial apply for closure #1 in ButtonAction.callAsFunction() + 32
74 SwiftUI 0x1d2401348 partial apply for specialized thunk for @callee_guaranteed () -> (@out A, @error @owned Error) + 28
75 SwiftUI 0x1d23fbf98 specialized static MainActor.assumeIsolated<A>(_:file:line:) + 132
76 SwiftUI 0x1d23b4878 ButtonAction.callAsFunction() + 584
77 SwiftUI 0x1d120f8f4 <deduplicated_symbol> + 88
78 SwiftUI 0x1d1e13b6c AppKitDialogBridge.handleAlertResponse(_:alert:) + 2020
79 SwiftUI 0x1d1e14818 closure #1 in closure #4 in AppKitDialogBridge.showNewNSAlert(title:icon:severity:actions:message:suppressionConfiguration:auxiliaryContent:presentationType:accessibilityTitle:sourceAnchor:isModal:preventsTermination:) + 88
80 SwiftUI 0x1d195fdbc thunk for @escaping @callee_guaranteed (@unowned NSModalResponse) -> () + 48
81 AppKit 0x1a1878874 __54-[NSAlert beginSheetModalForWindow:completionHandler:]_block_invoke_2 + 40
82 AppKit 0x1a202f04c NSWindowEndWindowModalSession + 476
83 AppKit 0x1a1dfd0c8 -[NSApplication(NSResponder) sendAction:to:from:] + 560
84 AppKit 0x1a1baa9f4 -[NSControl sendAction:to:] + 72
85 AppKit 0x1a1b93aac __26-[NSCell _sendActionFrom:]_block_invoke + 100
86 AppKit 0x1a1b939d4 -[NSCell _sendActionFrom:] + 204
87 AppKit 0x1a1b8889c -[NSButtonCell _sendActionFrom:] + 96
88 AppKit 0x1a1bb31c0 -[NSControl(_NSTracking) _pressGRActionCellBased:] + 2388
89 AppKit 0x1a1bb3a04 -[NSControl(_NSTracking) gestureRecognizerTrackingAction:] + 104
90 AppKit 0x1a1dfd0c8 -[NSApplication(NSResponder) sendAction:to:from:] + 560
91 AppKit 0x1a143809c _NSGestureRecognizerSendActions + 156
92 AppKit 0x1a227b8cc -[NSGestureRecognizer _updateGesture] + 444
93 Gestures 0x267eafb98 0x267e9f000 + 68504
94 Gestures 0x267ed0c28 0x267e9f000 + 203816
95 Gestures 0x267f02544 0x267e9f000 + 406852
96 Gestures 0x267f32380 0x267e9f000 + 603008
97 AppKit 0x1a219072c -[_NSGFGestureEnvironment _routeMouseEventToActiveGestureRecognizers:] + 316
98 AppKit 0x1a18468a0 -[_NSGestureEnvironmentBase _sendMouseEventToGestureRecognizers:requireAcceptsFirstMouse:] + 376
99 AppKit 0x1a1847c30 -[_NSGestureEnvironmentBase sendEventToGestureRecognizers:requireAcceptsFirstMouse:] + 88
100 AppKit 0x1a20c1448 -[NSWindow(NSEventRouting) sendEvent:] + 308
101 AppKit 0x1a1df9a5c -[NSApplication(NSEventRouting) sendEvent:] + 1276
102 AppKit 0x1a1891bbc -[NSApplication _handleEvent:] + 60
103 AppKit 0x1a132c7a8 -[NSApplication run] + 408
104 AppKit 0x1a13186dc NSApplicationMain + 880
105 SwiftUI 0x1d11a13ec specialized runApp(_:) + 168
106 SwiftUI 0x1d155ac88 runApp<A>(_:) + 112
107 SwiftUI 0x1d1825320 static App.main() + 224
108 supacode 0x10313dc7c 0x102b0c000 + 6495356
109 dyld 0x19cab1d54 start + 7184
I get something very similar as well, if I drag and drop repositories to try and reorder them...
Triggered by Thread: 0, Dispatch Queue: com.apple.main-thread
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Termination Reason: Namespace SIGNAL, Code 6, Abort trap: 6
Terminating Process: supacode [17198]
Application Specific Information:
abort() called
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x19ce415b0 __pthread_kill + 8
1 libsystem_pthread.dylib 0x19ce7b888 pthread_kill + 296
2 libsystem_c.dylib 0x19cd80850 abort + 124
3 libsystem_malloc.dylib 0x19cc7f224 malloc_vreport + 892
4 libsystem_malloc.dylib 0x19cc82f78 malloc_report + 64
5 libsystem_malloc.dylib 0x19cc87e04 ___BUG_IN_CLIENT_OF_LIBMALLOC_POINTER_BEING_FREED_WAS_NOT_ALLOCATED + 76
6 libswift_Concurrency.dylib 0x29c2f683c swift::TaskLocal::StopLookupScope::~StopLookupScope() + 144
7 libswift_Concurrency.dylib 0x29c2e78e0 swift_task_deinitOnExecutorImpl(void*, void (void*) swiftcall*, swift::SerialExecutorRef, unsigned long) + 152
8 libswiftCore.dylib 0x1b02db5a8 _swift_release_dealloc + 56
9 libswiftCore.dylib 0x1b02dc114 bool swift::RefCounts<swift::RefCountBitsT<(swift::RefCountInlinedness)1>>::doDecrementSlow<(swift::PerformDeinit)1>(swift::RefCountBitsT<(swift::RefCountInlinedness)1>, unsigned int) + 152
10 supacode 0x100c2f4e0 0x10066c000 + 6042848
11 AttributeGraph 0x1d2806030 AGGraphSetOutputValue + 608
12 SwiftUICore 0x24c10ede8 closure #1 in StatefulRule.value.setter + 72
13 SwiftUICore 0x24b955d6c partial apply for closure #1 in StatefulRule.value.setter + 24
14 SwiftUICore 0x24b9691d0 withUnsafePointer<A, B, C>(to:_:) + 160
15 SwiftUICore 0x24c33e9ec CachedView.updateValue() + 988
16 SwiftUICore 0x24b977698 partial apply for implicit closure #1 in closure #1 in closure #1 in Attribute.init<A>(_:) + 32
17 AttributeGraph 0x1d27e4554 AG::Graph::UpdateStack::update() + 500
18 AttributeGraph 0x1d27f4230 AG::Subgraph::update(unsigned int) + 960
19 SwiftUICore 0x24bf1a7a4 specialized GraphHost.runTransaction(_:do:id:) + 388
20 SwiftUICore 0x24befd550 GraphHost.flushTransactions() + 184
21 SwiftUICore 0x24b87c80c specialized GraphHost.asyncTransaction<A>(_:id:mutation:style:mayDeferUpdate:) + 780
22 SwiftUICore 0x24bf267bc closure #1 in closure #2 in ObservationCenter.invalidate<A>(_:onChangeIn:) + 272
23 SwiftUICore 0x24bf26624 closure #2 in ObservationCenter.invalidate<A>(_:onChangeIn:) + 144
24 libswiftObservation.dylib 0x29c113960 partial apply for closure #4 in closure #1 in static ObservationTracking._installTracking(_:willSet:didSet:) + 112
25 libswiftObservation.dylib 0x29c1139e0 partial apply for thunk for @escaping @callee_guaranteed @Sendable (@guaranteed AnyKeyPath) -> () + 32
26 libswiftObservation.dylib 0x29c110ec0 specialized ObservationRegistrar.Context.willSet<A, B>(_:keyPath:) + 508
27 libswiftObservation.dylib 0x29c1113dc specialized ObservationRegistrar.willSet<A, B>(_:keyPath:) + 68
28 libswiftObservation.dylib 0x29c10a47c ObservationRegistrar.withMutation<A, B, C>(of:keyPath:_:) + 100
29 supacode 0x1008c0518 0x10066c000 + 2442520
30 supacode 0x100868058 0x10066c000 + 2080856
31 supacode 0x10086a178 0x10066c000 + 2089336
32 supacode 0x10093fce4 0x10066c000 + 2964708
33 supacode 0x1017800cc 0x10066c000 + 17907916
34 supacode 0x10176c200 0x10066c000 + 17826304
35 supacode 0x10176baac 0x10066c000 + 17824428
36 supacode 0x101780d80 0x10066c000 + 17911168
37 supacode 0x10176c200 0x10066c000 + 17826304
38 supacode 0x10176c1dc 0x10066c000 + 17826268
39 supacode 0x10176c1dc 0x10066c000 + 17826268
40 supacode 0x10176c1dc 0x10066c000 + 17826268
41 supacode 0x10176c1dc 0x10066c000 + 17826268
42 supacode 0x10176baac 0x10066c000 + 17824428
43 supacode 0x1007189bc 0x10066c000 + 707004
44 supacode 0x10176e2e8 0x10066c000 + 17834728
45 supacode 0x1016a8f7c 0x10066c000 + 17026940
46 supacode 0x1016abb5c 0x10066c000 + 17038172
47 libswift_Concurrency.dylib 0x29c2b68fc TaskLocal.withValue<A>(_:operation:file:line:) + 232
48 supacode 0x1016a8ae0 0x10066c000 + 17025760
49 supacode 0x10176e25c 0x10066c000 + 17834588
50 supacode 0x10173c768 0x10066c000 + 17631080
51 supacode 0x10173fb80 0x10066c000 + 17644416
52 supacode 0x101790584 0x10066c000 + 17974660
53 supacode 0x100a6173c 0x10066c000 + 4151100
54 supacode 0x100a70268 0x10066c000 + 4211304
55 supacode 0x100a4c5a8 0x10066c000 + 4064680
56 SwiftUI 0x1d159739c thunk for @escaping @callee_guaranteed (@in_guaranteed IndexSet, @in_guaranteed Int) -> (@out ()) + 40
57 SwiftUI 0x1d1af4824 partial apply for specialized closure #1 in MoveInteraction.move(to:) + 144
58 SwiftUICore 0x24bc80cac static Update.dispatchActions() + 1252
59 SwiftUICore 0x24bc7fa1c static Update.end() + 72
60 SwiftUICore 0x24bc7f74c static Update.enqueueAction(reason:_:) + 192
61 SwiftUI 0x1d1af432c MoveInteraction.move(to:) + 464
62 SwiftUI 0x1d1c92c14 OutlineListCoordinator.moveCells(fromRows:to:) + 6112
63 SwiftUI 0x1d1c90d7c OutlineListCoordinator.outlineView(_:performDropInsertion:with:at:) + 8356
64 SwiftUI 0x1d1c8e780 OutlineListCoordinator.outlineView(_:acceptDrop:item:childIndex:) + 2740
65 SwiftUI 0x1d1c8eac4 @objc OutlineListCoordinator.outlineView(_:acceptDrop:item:childIndex:) + 156
66 AppKit 0x1a1d135a8 -[NSOutlineView performDragOperation:] + 372
67 AppKit 0x1a145c64c NSCoreDragReceiveMessageProc + 452
68 HIServices 0x1a453e500 CallReceiveMessageCollectionWithMessage + 116
69 HIServices 0x1a4538218 DoMultipartDropMessage + 96
70 HIServices 0x1a4537fd8 DoDropMessage + 56
71 HIServices 0x1a4536848 DragInApplication + 952
72 HIServices 0x1a453f38c CoreDragStartDraggingAsync + 588
73 AppKit 0x1a1a345f4 -[NSCoreDragManager _dragUntilMouseUp:initialEvent:async:] + 1112
74 AppKit 0x1a1a34124 -[NSCoreDragManager _tryCatchDragUntilMouseUp:initialEvent:async:] + 32
75 CoreFoundation 0x19cf19e58 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 36
76 CoreFoundation 0x19cf19d54 __CFRunLoopDoObservers + 648
77 CoreFoundation 0x19cfd3f0c _CFRunLoopRunSpecificWithOptions + 484
78 HIToolbox 0x1a9a84790 RunCurrentEventLoopInMode + 316
79 HIToolbox 0x1a9a87ab8 ReceiveNextEventCommon + 488
80 HIToolbox 0x1a9c11b64 _BlockUntilNextEventMatchingListInMode + 48
81 AppKit 0x1a1836014 _DPSBlockUntilNextEventMatchingListInMode + 236
82 AppKit 0x1a1333e48 _DPSNextEvent + 588
83 AppKit 0x1a1dfaf08 -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 688
84 AppKit 0x1a1dfac14 -[NSApplication(NSEventRouting) nextEventMatchingMask:untilDate:inMode:dequeue:] + 72
85 AppKit 0x1a132c780 -[NSApplication run] + 368
86 AppKit 0x1a13186dc NSApplicationMain + 880
87 SwiftUI 0x1d11a13ec specialized runApp(_:) + 168
88 SwiftUI 0x1d155ac88 runApp<A>(_:) + 112
89 SwiftUI 0x1d1825320 static App.main() + 224
90 supacode 0x100c9dc7c 0x10066c000 + 6495356
91 dyld 0x19cab1d54 start + 7184
It seems like the same mechanism as #784: the teardown runs synchronously inside the store's task-local scope, the SwiftUI graph flush releases a surface view whose deinit is actor-isolated, and that corrupts the task-local stack. The remove-repository and sidebar reorder actions still seem to run on the synchronous UI send stack, so the same trampoline-to-Task fix as #785 should apply. 🤞
Steps to reproduce
- Drag and drop repositories to reorder the sidebar; or
- Confirm "Remove Repository..." modal.
Supacode version and build
0.10.8 (1785775286)
macOS version
macOS 26.3.1 (a) (25D771280a)
System locale
en_NL
Mac hardware
M1 Max
Are you planning to fix this yourself?
Before submitting
What happened?
Whenever I click the 3-dot menu next to a repository in the sidebar, and choose "Remove Repository...", I get a modal and once I confirm the app runs for a little bit then crashes completely.
I get a full macOS crash report, that seems very similar to #784 / #785:
I get something very similar as well, if I drag and drop repositories to try and reorder them...
It seems like the same mechanism as #784: the teardown runs synchronously inside the store's task-local scope, the SwiftUI graph flush releases a surface view whose deinit is actor-isolated, and that corrupts the task-local stack. The remove-repository and sidebar reorder actions still seem to run on the synchronous UI send stack, so the same trampoline-to-Task fix as #785 should apply. 🤞
Steps to reproduce
Supacode version and build
0.10.8 (1785775286)
macOS version
macOS 26.3.1 (a) (25D771280a)
System locale
en_NL
Mac hardware
M1 Max
Are you planning to fix this yourself?
ready.Before submitting
ready.