Skip to content

Instantly share code, notes, and snippets.

@marcprux
Created May 13, 2021 12:09
Show Gist options
  • Save marcprux/8dc3edd0e37eaa5fbc18c134f3563a2e to your computer and use it in GitHub Desktop.
Save marcprux/8dc3edd0e37eaa5fbc18c134f3563a2e to your computer and use it in GitHub Desktop.
Stack dump of SwiftUI.OutlineView bridging to NSOutlineView (and crashing)
Thread 1 Queue : com.apple.main-thread (serial)
#0 0x00007fff41c65b57 in specialized Array._checkSubscript(_:wasNativeTypeChecked:) ()
#1 0x00007fff41ee03d8 in OutlineListRootViewTree.traits(forRowAt:) ()
#2 0x00007fff41ee066c in protocol witness for ListRootViewTree.traits(forRowAt:) in conformance OutlineListRootViewTree ()
#3 0x00007fff425713a0 in ListStyleDataSource.isTreeLeaf(forRowAt:) ()
#4 0x00007fff42072613 in NSOutlineViewListCoordinator.outlineView(_:isItemExpandable:) ()
#5 0x00007fff420729be in @objc NSOutlineViewListCoordinator.outlineView(_:isItemExpandable:) ()
#6 0x00007fff22e19b38 in -[NSOutlineView _nonStaticDataSourceIsItemExpandable:] ()
#7 0x00007fff22e08de3 in loadItemEntryLazyInfoIfNecessary ()
#8 0x00007fff22e22394 in findAndLoadRowEntryForUnloadedLazyItem ()
#9 0x00007fff2315aa91 in -[NSOutlineView _collapseItem:collapseChildren:clearExpandState:] ()
#10 0x00007fff420791a7 in ListCoreOutlineView.collapseItem(_:collapseChildren:) ()
#11 0x00007fff420792e2 in @objc ListCoreOutlineView.expandItem(_:expandChildren:) ()
#12 0x00007fff41f96da9 in OutlineListUpdater.collapseSections(_:in:source:rootItem:) ()
#13 0x00007fff41f958f2 in OutlineListUpdater.applyUpdates(to:from:rootItem:) ()
#14 0x00007fff42071e25 in NSOutlineViewListCoordinator.updateTableView(_:from:to:) ()
#15 0x00007fff42058888 in closure #1 in ListCoreCoordinator.updateTableViewAndVisibleRows(_:from:to:) ()
#16 0x00007fff420592a4 in ListCoreCoordinator.withSelectionUpdateGuard(_:) ()
#17 0x00007fff42057d7b in ListCoreCoordinator.updateTableViewAndVisibleRows(_:from:to:) ()
#18 0x00007fff42057cc0 in ListRepresentable.updateNSView(_:context:) ()
#19 0x00007fff41da8645 in PlatformViewRepresentableAdaptor.updateViewProvider(_:context:) ()
#20 0x00007fff42427ff9 in closure #1 in closure #1 in closure #4 in closure #1 in PlatformViewChild.updateValue() ()
#21 0x00007fff42427e63 in closure #1 in closure #4 in closure #1 in PlatformViewChild.updateValue() ()
#22 0x00007fff4246fbc5 in ViewRendererHost.performExternalUpdate(_:) ()
#23 0x00007fff42427d74 in closure #4 in closure #1 in PlatformViewChild.updateValue() ()
#24 0x00007fff42426a51 in closure #1 in PlatformViewChild.updateValue() ()
#25 0x00007fff42425eb9 in PlatformViewChild.updateValue() ()
#26 0x00007fff41d76c1a in partial apply for implicit closure #2 in implicit closure #1 in closure #1 in closure #1 in Attribute.init<τ_0_0>(_:) ()
#27 0x00007fff427a42a5 in AG::Graph::UpdateStack::update() ()
#28 0x00007fff427a472e in AG::Graph::update_attribute(AG::data::ptr<AG::Node>, bool) ()
#29 0x00007fff427a9196 in AG::Graph::value_ref(AG::AttributeID, AGSwiftMetadata const*, bool*) ()
#30 0x00007fff427bac8b in AGGraphGetValue ()
#31 0x00007fff41ed72ee in ViewGraph.sizeThatFits(_:) ()
#32 0x00007fff41ed70ec in ViewGraph.updateIdealSize() ()
#33 0x00007fff41ed7393 in ViewGraph.updateIdealSize(at:) ()
#34 0x00007fff4247b23e in partial apply for closure #1 in ViewRendererHost.updateIdealSize() ()
#35 0x00007fff4247b257 in partial apply for thunk for @callee_guaranteed (@guaranteed ViewGraph) -> () ()
#36 0x00007fff42470943 in closure #1 in ViewRendererHost.updateViewGraph<τ_0_0>(body:) ()
#37 0x00007fff4246ef76 in ViewRendererHost.updateViewGraph<τ_0_0>(body:) ()
#38 0x00007fff4247a4bb in protocol witness for ViewGraphDelegate.updateViewGraph<τ_0_0>(body:) in conformance NSHostingView<τ_1_0> ()
#39 0x00007fff42471cdc in ViewRendererHost.updateIdealSize() ()
#40 0x00007fff424a000c in NSHostingView._willUpdateConstraintsForSubtree() ()
#41 0x00007fff424a0155 in @objc NSHostingView._willUpdateConstraintsForSubtree() ()
#42 0x00007fff22e0b3b9 in -[NSView _updateConstraintsForSubtreeIfNeededCollectingViewsWithInvalidBaselines:] ()
#43 0x00007fff22e0b528 in -[NSView _updateConstraintsForSubtreeIfNeededCollectingViewsWithInvalidBaselines:] ()
#44 0x00007fff22e0b528 in -[NSView _updateConstraintsForSubtreeIfNeededCollectingViewsWithInvalidBaselines:] ()
#45 0x00007fff22e0b528 in -[NSView _updateConstraintsForSubtreeIfNeededCollectingViewsWithInvalidBaselines:] ()
#46 0x00007fff22e0b528 in -[NSView _updateConstraintsForSubtreeIfNeededCollectingViewsWithInvalidBaselines:] ()
#47 0x00007fff22e1b2a0 in __82-[NSView _updateConstraintsForSubtreeIfNeededCollectingViewsWithInvalidBaselines:]_block_invoke ()
#48 0x00007fff2727b84a in -[NSISEngine withBehaviors:performModifications:] ()
#49 0x00007fff22e0b436 in -[NSView _updateConstraintsForSubtreeIfNeededCollectingViewsWithInvalidBaselines:] ()
#50 0x00007fff22e0b27b in __45-[NSView updateConstraintsForSubtreeIfNeeded]_block_invoke ()
#51 0x00007fff2727b84a in -[NSISEngine withBehaviors:performModifications:] ()
#52 0x00007fff22d79c69 in -[NSView(NSConstraintBasedLayout) _withAutomaticEngineOptimizationDisabled:] ()
#53 0x00007fff22e0b033 in -[NSView updateConstraintsForSubtreeIfNeeded] ()
#54 0x00007fff42429740 in PlatformViewHost.updateLayoutTraits() ()
#55 0x00007fff42429668 in closure #1 in ViewLeafView.layoutTraits() ()
#56 0x00007fff424295c6 in ViewLeafView.layoutTraits() ()
#57 0x00007fff42429470 in ViewLeafView.sizeThatFits(in:) ()
#58 0x00007fff41f3db4e in closure #1 in LeafLayoutEngine.sizeThatFits(_:) ()
#59 0x00007fff41f3da00 in LeafLayoutEngine.sizeThatFits(_:) ()
#60 0x00007fff41ff8526 in LayoutComputer.EngineDelegate.sizeThatFits(_:) ()
#61 0x00007fff41ffbbcc in AlignmentModifiedLayoutComputer.LayoutEngine.sizeThatFits(_:) ()
#62 0x00007fff41ffbcd1 in protocol witness for LayoutEngineProtocol.sizeThatFits(_:) in conformance AlignmentModifiedLayoutComputer.LayoutEngine ()
#63 0x00007fff41ff8526 in LayoutComputer.EngineDelegate.sizeThatFits(_:) ()
#64 0x00007fff41ffbbcc in AlignmentModifiedLayoutComputer.LayoutEngine.sizeThatFits(_:) ()
#65 0x00007fff41ffbcd1 in protocol witness for LayoutEngineProtocol.sizeThatFits(_:) in conformance AlignmentModifiedLayoutComputer.LayoutEngine ()
#66 0x00007fff41ff8526 in LayoutComputer.EngineDelegate.sizeThatFits(_:) ()
#67 0x00007fff42459d0c in _SafeAreaRegionsIgnoringLayout.sizeThatFits(in:context:child:) ()
#68 0x00007fff422e3d71 in closure #1 in UnaryLayoutEngine.sizeThatFits(_:) ()
#69 0x00007fff422e3c17 in UnaryLayoutEngine.sizeThatFits(_:) ()
#70 0x00007fff41ff8526 in LayoutComputer.EngineDelegate.sizeThatFits(_:) ()
#71 0x00007fff425cb0ed in StackLayout.UnmanagedImplementation.resize(_:proposal:proxy:) ()
#72 0x00007fff425cc129 in specialized StackLayout.UnmanagedImplementation.sizeChildrenGenerallyWithConcreteMajorProposal(in:minorProposalForChild:) ()
#73 0x00007fff425cd2f0 in specialized StackLayout.UnmanagedImplementation.placeChildren1(in:minorProposalForChild:) ()
#74 0x00007fff425ca590 in StackLayout.UnmanagedImplementation.placeChildren(in:) ()
#75 0x00007fff425c9f6d in StackLayout.UnmanagedImplementation.sizeThatFits(_:) ()
#76 0x00007fff425c9ddb in StackLayout.Storage.sizeThatFits(_:) ()
#77 0x00007fff41ed81b6 in RootGeometry.value.getter ()
#78 0x00007fff41d60816 in specialized implicit closure #2 in implicit closure #1 in closure #1 in closure #1 in Attribute.init<τ_0_0>(_:) ()
#79 0x00007fff41d76b7e in partial apply for specialized implicit closure #2 in implicit closure #1 in closure #1 in closure #1 in Attribute.init<τ_0_0>(_:) ()
#80 0x00007fff427a42a5 in AG::Graph::UpdateStack::update() ()
#81 0x00007fff427a472e in AG::Graph::update_attribute(AG::data::ptr<AG::Node>, bool) ()
#82 0x00007fff427aca43 in AG::Subgraph::update(unsigned int) ()
#83 0x00007fff4259e862 in GraphHost.runTransaction() ()
#84 0x00007fff4259fc02 in GraphHost.runTransaction(_:) ()
#85 0x00007fff4259f053 in GraphHost.flushTransactions() ()
#86 0x00007fff42471ddf in closure #1 in ViewRendererHost.render(interval:updateDisplayList:) ()
#87 0x00007fff4246a487 in ViewRendererHost.render(interval:updateDisplayList:) ()
#88 0x00007fff424a0429 in closure #1 in NSHostingView.layout() ()
#89 0x00007fff424a9c9c in partial apply for thunk for @callee_guaranteed (@guaranteed NSAnimationContext) -> () ()
#90 0x00007fff4249dfd2 in thunk for @escaping @callee_guaranteed (@guaranteed NSAnimationContext) -> () ()
#91 0x00007fff22d7d694 in +[NSAnimationContext runAnimationGroup:] ()
#92 0x00007fff424a035f in NSHostingView.layout() ()
#93 0x00007fff424a054f in @objc NSHostingView.layout() ()
#94 0x00007fff22dbb2ff in _NSViewLayout ()
#95 0x00007fff22dbad9b in -[NSView _layoutSubtreeWithOldSize:] ()
#96 0x00007fff22dbaf07 in -[NSView _layoutSubtreeWithOldSize:] ()
#97 0x00007fff22dba291 in -[NSView _layoutSubtreeIfNeededAndAllowTemporaryEngine:] ()
#98 0x00007fff22db9d90 in -[NSWindow(NSConstraintBasedLayout) _layoutViewTree] ()
#99 0x00007fff22e36724 in -[NSWindow(NSConstraintBasedLayout) layoutIfNeeded] ()
#100 0x00007fff22e36560 in __NSWindowGetDisplayCycleObserverForLayout_block_invoke ()
#101 0x00007fff22e357d5 in NSDisplayCycleObserverInvoke ()
#102 0x00007fff22e35360 in NSDisplayCycleFlush ()
#103 0x00007fff26cb6856 in CA::Transaction::run_commit_handlers(CATransactionPhase) ()
#104 0x00007fff26cb55fd in CA::Transaction::commit() ()
#105 0x00007fff22ee51dc in __62+[CATransaction(NSCATransaction) NS_setFlushesWithDisplayLink]_block_invoke ()
#106 0x00007fff23639443 in ___NSRunLoopObserverCreateWithHandler_block_invoke ()
#107 0x00007fff20565e41 in __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ ()
#108 0x00007fff20565cd5 in __CFRunLoopDoObservers ()
#109 0x00007fff20565168 in __CFRunLoopRun ()
#110 0x00007fff2056475c in CFRunLoopRunSpecific ()
#111 0x00007fff28786203 in RunCurrentEventLoopInMode ()
#112 0x00007fff28785e36 in ReceiveNextEventCommon ()
#113 0x00007fff28785d03 in _BlockUntilNextEventMatchingListInModeWithFilter ()
#114 0x00007fff22d60b32 in _DPSNextEvent ()
#115 0x00007fff22d5f305 in -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] ()
#116 0x00007fff22d51679 in -[NSApplication run] ()
#117 0x00007fff22d2585c in NSApplicationMain ()
#118 0x00007fff41c65bbd in specialized runApp(_:) ()
#119 0x00007fff42497378 in runApp<τ_0_0>(_:) ()
#120 0x00007fff42080f2d in static App.main() ()
#122 0x0000000104ca42a4 in main ()
#123 0x00007fff20488f3d in start ()
@saurabhsharan
Copy link

Hey! Did you ever figure this one out? I'm running into this too on macOS 12.5 and Xcode 13.4.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment