We've got a hard to repro issue on Intel only when performing UI layout. It seems the collection view code gets into a recursive loop of doom and eventually the app crashes.
This is only happening on Intel, the ARM version is fine. It seems related to this issue: https://developer.apple.com/forums/thread/732580 There an Apple Dev acknowledges that there are issues with the Intel version of the OS.
Here's the simplified stack we're seeing:
-[NSISEngine _coreReplaceMarker:withMarkerPlusDelta:]"
-[NSISEngine constraintDidChangeSuchThatMarker:shouldBeReplacedByMarkerPlusDelta:]",
-[NSISEngine tryToChangeConstraintSuchThatMarker:isReplacedByMarkerPlusDelta:undoHandler:]",
-[NSLayoutConstraint _tryToChangeContainerGeometryWithUndoHandler:]",
-[NSLayoutConstraint _setSymbolicConstant:constant:symbolicConstantMultiplier:]",
-[NSLayoutConstraint setConstant:]",
-[NSView(NSConstraintBasedLayoutInternal) _updateSimpleAutoresizingConstraintsInPlace:forAutoresizingMask:]",
NSViewUpdateConstraintsForFrameChange
-[NSView setFrameSize:]",
-[NSView setFrame:]",
-[NSClipView _updateOverhangSubviewsIfNeeded]",
-[NSClipView _reflectDocumentViewFrameChange]",
-[NSView _postFrameChangeNotification]","
-[NSView setFrameSize:]",
-[NSCollectionView setFrameSize:]",
-[NSView setFrame:]",
NSViewActuallyUpdateFrameFromLayoutEngine",
-[NSView resizeSubviewsWithOldSize:]",
-[NSView setFrameSize:]",
-[NSClipView setFrameSize:]",
-[NSView setFrame:]",
-[NSScrollView _setContentViewFrame:]",
-[NSScrollView tile]",
-[NSScrollView _tileWithoutRecursing]",
-[NSScrollView reflectScrolledClipView:]",
-[NSClipView _reflectDocumentViewFrameChange]_block_invoke",
-[NSClipView _reflectDocumentViewFrameChange]",
-[NSView _postFrameChangeNotification]",
-[NSView setFrameSize:]",
-[NSCollectionView setFrameSize:]",
-[NSView setFrame:]",
-[NSCollectionView _resizeToFitContentAndClipView]",
-[_NSCollectionViewCore setContentSize:]",
-[_NSCollectionViewCore _updateVisibleCellsNow:]"
-[_NSCollectionViewCore _updateVisibleCellsNow:]"
-[_NSCollectionViewCore _updateVisibleCellsNow:]"
-[_NSCollectionViewCore _updateVisibleCellsNow:]"
.
.
It seems to be limited to macOS 13.1 too. Hoping someone might have a clue?
Thanks,
Robert.
Here's a link to the full stack: https://www.icloud.com/notes/076h1RXj4rvv7TzS5ICnvG6vw#NSCollectionView_crash_stack: