When I open my storyboard, Xcode gives me the message “An internal error occurred. Editing functionality may be limited.” Controls in all view controllers, or just the one I'm working on, show as frames only. The view controller background is black.

I've tried
- Xcode 13.1 (which I was using, thought it might be a bug fixed later, so I upgraded to...)
- Xcode 13.4 (same behaviour)
- Xcode 14 beta 4 & beta 5 (which crash when I open the storyboard, then on re-opening have the same behaviour as Xcode 13 described above)
The relevant scene from the storyboard file is:
<!--Select competitor-->
<scene sceneID="1Rd-29-aXK">
<objects>
<viewController title="Select race" modalPresentationStyle="overCurrentContext" id="wLi-12-ve1" userLabel="Select competitor" customClass="PredictedCompetitorSelectionViewController" customModule="SportsCarnivalPro" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="P8d-FI-hv8">
<rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="4ZN-m6-LL3">
<rect key="frame" x="0.0" y="50" width="375" height="728"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" title=" "/>
<connections>
<action selector="backgroundTapped:" destination="wLi-12-ve1" eventType="touchUpInside" id="fiw-h5-sQ5"/>
</connections>
</button>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="hXf-DU-djO">
<rect key="frame" x="0.0" y="209.66666666666669" width="375" height="568.33333333333326"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="QJg-yd-Ug7">
<rect key="frame" x="0.0" y="0.0" width="375" height="568.33333333333337"/>
<subviews>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="1" estimatedSectionHeaderHeight="-1" sectionFooterHeight="1" estimatedSectionFooterHeight="-1" translatesAutoresizingMaskIntoConstraints="NO" id="Wtc-x9-Wfb">
<rect key="frame" x="0.0" y="56.000000000000028" width="375" height="365.33333333333337"/>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" restorationIdentifier="predictedCompetitorCell" insetsLayoutMarginsFromSafeArea="NO" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="predictedCompetitorCell" id="W0j-o5-aAl" customClass="PredictedCompetitorTableViewCell" customModule="SportsCarnivalPro" customModuleProvider="target">
<rect key="frame" x="0.0" y="50" width="375" height="43.666667938232422"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="W0j-o5-aAl" id="OdJ-q4-tfi">
<rect key="frame" x="0.0" y="0.0" width="375" height="43.666667938232422"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="yHQ-qO-4Zh">
<rect key="frame" x="16" y="16" width="12" height="12"/>
<color key="backgroundColor" systemColor="systemOrangeColor"/>
<constraints>
<constraint firstAttribute="width" constant="12" id="Cfx-rD-oe5"/>
<constraint firstAttribute="height" constant="12" id="VSr-zR-Kmb"/>
</constraints>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="499" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="lvz-wt-bJT">
<rect key="frame" x="36" y="11.666666666666666" width="41.333333333333343" height="20.333333333333336"/>
<fontDescription key="fontDescription" type="system" pointSize="20"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
<variation key="heightClass=regular-widthClass=compact">
<fontDescription key="fontDescription" type="system" pointSize="17"/>
</variation>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="XNp-sM-MqF">
<rect key="frame" x="166" y="11.333333333333286" width="42" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<constraints>
<constraint firstItem="XNp-sM-MqF" firstAttribute="leading" secondItem="lvz-wt-bJT" secondAttribute="trailing" constant="8" symbolic="YES" id="I9d-7O-Fmn"/>
<constraint firstItem="lvz-wt-bJT" firstAttribute="leading" secondItem="yHQ-qO-4Zh" secondAttribute="trailing" constant="8" symbolic="YES" id="T95-j4-6kj"/>
<constraint firstItem="lvz-wt-bJT" firstAttribute="centerY" secondItem="OdJ-q4-tfi" secondAttribute="centerY" id="VOB-3s-imc"/>
<constraint firstAttribute="trailingMargin" secondItem="XNp-sM-MqF" secondAttribute="trailing" id="Vho-Eu-dJo"/>
<constraint firstItem="yHQ-qO-4Zh" firstAttribute="centerY" secondItem="OdJ-q4-tfi" secondAttribute="centerY" id="YgZ-tz-Cf3"/>
<constraint firstItem="yHQ-qO-4Zh" firstAttribute="leading" secondItem="OdJ-q4-tfi" secondAttribute="leadingMargin" id="psp-ms-jQY"/>
<constraint firstItem="XNp-sM-MqF" firstAttribute="centerY" secondItem="OdJ-q4-tfi" secondAttribute="centerY" id="z6t-ev-cYw"/>
</constraints>
</tableViewCellContentView>
<connections>
<outlet property="competitorName" destination="lvz-wt-bJT" id="Wll-XO-VE7"/>
<outlet property="houseColour" destination="yHQ-qO-4Zh" id="NfI-87-4f2"/>
<outlet property="raceTime" destination="XNp-sM-MqF" id="2FB-OO-YvI"/>
</connections>
</tableViewCell>
</prototypes>
</tableView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Wle-qL-cXE">
<rect key="frame" x="0.0" y="421.33333333333337" width="375" height="47"/>
<subviews>
<switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="8wL-Ii-h8F">
<rect key="frame" x="163" y="8" width="51" height="31"/>
</switch>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Sort:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ffE-Hb-DX0">
<rect key="frame" x="19.999999999999996" y="13.333333333333369" width="36.666666666666657" height="20.333333333333329"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="by name" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="JoV-ry-yY0">
<rect key="frame" x="90" y="13.333333333333369" width="65" height="20.333333333333329"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="by time" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="vR4-HO-JwU">
<rect key="frame" x="220" y="13.333333333333369" width="56" height="20.333333333333329"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="vR4-HO-JwU" firstAttribute="centerY" secondItem="Wle-qL-cXE" secondAttribute="centerY" id="5pb-Dq-oRt"/>
<constraint firstItem="ffE-Hb-DX0" firstAttribute="leading" secondItem="Wle-qL-cXE" secondAttribute="leading" constant="20" symbolic="YES" id="BHo-BB-hOB"/>
<constraint firstItem="JoV-ry-yY0" firstAttribute="centerY" secondItem="Wle-qL-cXE" secondAttribute="centerY" id="KCz-HI-oPY"/>
<constraint firstAttribute="bottom" secondItem="8wL-Ii-h8F" secondAttribute="bottom" constant="8" id="Ot4-79-L49"/>
<constraint firstItem="ffE-Hb-DX0" firstAttribute="centerY" secondItem="Wle-qL-cXE" secondAttribute="centerY" id="QbK-Py-Q8J"/>
<constraint firstItem="vR4-HO-JwU" firstAttribute="leading" secondItem="8wL-Ii-h8F" secondAttribute="trailing" constant="8" symbolic="YES" id="Qq2-Sg-xVZ"/>
<constraint firstItem="8wL-Ii-h8F" firstAttribute="leading" secondItem="JoV-ry-yY0" secondAttribute="trailing" constant="8" symbolic="YES" id="ZSd-X6-g3T"/>
<constraint firstItem="8wL-Ii-h8F" firstAttribute="top" secondItem="Wle-qL-cXE" secondAttribute="top" constant="8" id="alv-L2-xV7"/>
<constraint firstAttribute="height" secondItem="8wL-Ii-h8F" secondAttribute="height" constant="16" id="dcE-TG-QGb"/>
<constraint firstItem="8wL-Ii-h8F" firstAttribute="centerX" secondItem="Wle-qL-cXE" secondAttribute="centerX" id="olZ-bX-eTs"/>
</constraints>
</view>
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="prototypes" translatesAutoresizingMaskIntoConstraints="NO" id="1aw-9A-3ws">
<rect key="frame" x="0.0" y="468.33333333333337" width="375" height="100"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstAttribute="height" constant="100" id="6Ok-Zw-3QM"/>
</constraints>
<collectionViewFlowLayout key="collectionViewLayout" scrollDirection="horizontal" automaticEstimatedItemSize="YES" minimumLineSpacing="10" minimumInteritemSpacing="10" id="Daj-eu-gzw">
<size key="itemSize" width="100" height="44"/>
<size key="headerReferenceSize" width="0.0" height="0.0"/>
<size key="footerReferenceSize" width="0.0" height="0.0"/>
<inset key="sectionInset" minX="8" minY="8" maxX="8" maxY="8"/>
</collectionViewFlowLayout>
<cells>
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" restorationIdentifier="groupSelectorCell" reuseIdentifier="groupSelectorCell" id="dc4-IP-bsg" customClass="GroupCollectionViewCell" customModule="SportsCarnivalPro" customModuleProvider="target">
<rect key="frame" x="8" y="8" width="100" height="44"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<collectionViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" id="hJL-WW-YBD">
<rect key="frame" x="0.0" y="0.0" width="100" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Group" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="aSC-pX-jLP">
<rect key="frame" x="16" y="8" width="68" height="28"/>
<fontDescription key="fontDescription" type="system" pointSize="20"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<constraints>
<constraint firstAttribute="trailing" secondItem="aSC-pX-jLP" secondAttribute="trailing" constant="16" id="UIl-Ta-jI6"/>
<constraint firstAttribute="bottom" secondItem="aSC-pX-jLP" secondAttribute="bottom" constant="8" id="fOH-PC-cte"/>
<constraint firstItem="aSC-pX-jLP" firstAttribute="top" secondItem="hJL-WW-YBD" secondAttribute="top" constant="8" id="j9X-1V-HqP"/>
<constraint firstItem="aSC-pX-jLP" firstAttribute="leading" secondItem="hJL-WW-YBD" secondAttribute="leading" constant="16" id="xXU-9O-Qk6"/>
</constraints>
</collectionViewCellContentView>
<connections>
<outlet property="label" destination="aSC-pX-jLP" id="UDF-kw-2nG"/>
</connections>
</collectionViewCell>
</cells>
</collectionView>
</subviews>
</stackView>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstAttribute="bottom" secondItem="QJg-yd-Ug7" secondAttribute="bottom" id="4J7-vZ-AX9"/>
<constraint firstItem="QJg-yd-Ug7" firstAttribute="leading" secondItem="hXf-DU-djO" secondAttribute="leading" id="5hx-IX-UjV"/>
<constraint firstItem="QJg-yd-Ug7" firstAttribute="top" secondItem="hXf-DU-djO" secondAttribute="top" id="Oin-X5-CLd"/>
<constraint firstAttribute="trailing" secondItem="QJg-yd-Ug7" secondAttribute="trailing" id="jBs-sv-VdS"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="f0F-kQ-r8v">
<rect key="frame" x="16" y="165" width="83" height="44.666666666666657"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Lane" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="5ds-Cv-kBU">
<rect key="frame" x="16" y="8.0000000000000018" width="51" height="28.666666666666671"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<fontDescription key="fontDescription" type="system" pointSize="24"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="5ds-Cv-kBU" firstAttribute="top" secondItem="f0F-kQ-r8v" secondAttribute="top" constant="8" id="E7s-HW-g7d"/>
<constraint firstAttribute="bottom" secondItem="5ds-Cv-kBU" secondAttribute="bottom" constant="8" id="Itt-Es-Eow"/>
<constraint firstAttribute="trailing" secondItem="5ds-Cv-kBU" secondAttribute="trailing" constant="16" id="UiU-lw-CZC"/>
<constraint firstItem="5ds-Cv-kBU" firstAttribute="leading" secondItem="f0F-kQ-r8v" secondAttribute="leading" constant="16" id="cqy-sK-aNE"/>
</constraints>
</view>
</subviews>
<viewLayoutGuide key="safeArea" id="iCt-ps-UbF"/>
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.29999999999999999" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="iCt-ps-UbF" firstAttribute="bottom" secondItem="4ZN-m6-LL3" secondAttribute="bottom" id="0XP-u0-Jxm"/>
<constraint firstItem="iCt-ps-UbF" firstAttribute="trailing" secondItem="4ZN-m6-LL3" secondAttribute="trailing" id="1aH-MO-hVt"/>
<constraint firstItem="4ZN-m6-LL3" firstAttribute="top" secondItem="iCt-ps-UbF" secondAttribute="top" id="5zh-Wf-s2O"/>
<constraint firstItem="hXf-DU-djO" firstAttribute="height" secondItem="P8d-FI-hv8" secondAttribute="height" multiplier="0.7" id="9lE-H8-cg5"/>
<constraint firstItem="hXf-DU-djO" firstAttribute="bottom" secondItem="iCt-ps-UbF" secondAttribute="bottom" id="EA5-GZ-2BW"/>
<constraint firstItem="4ZN-m6-LL3" firstAttribute="leading" secondItem="iCt-ps-UbF" secondAttribute="leading" id="WBI-gZ-0fq"/>
<constraint firstItem="iCt-ps-UbF" firstAttribute="trailing" secondItem="hXf-DU-djO" secondAttribute="trailing" id="f0B-xh-9eY"/>
<constraint firstItem="hXf-DU-djO" firstAttribute="top" secondItem="f0F-kQ-r8v" secondAttribute="bottom" id="fY2-Er-uBr"/>
<constraint firstItem="hXf-DU-djO" firstAttribute="leading" secondItem="iCt-ps-UbF" secondAttribute="leading" id="hqV-k9-YXv"/>
<constraint firstItem="f0F-kQ-r8v" firstAttribute="leading" secondItem="hXf-DU-djO" secondAttribute="leading" constant="16" id="pvo-wX-lAX"/>
</constraints>
</view>
<connections>
<outlet property="groupCollection" destination="1aw-9A-3ws" id="aHq-Fl-awQ"/>
<outlet property="predictionTable" destination="Wtc-x9-Wfb" id="oF4-Sv-4RE"/>
<outlet property="sortBySwitch" destination="8wL-Ii-h8F" id="ULJ-ZY-a7v"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="TjY-2P-T0P" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="2627.6923076923076" y="546.6824644549763"/>
</scene>
The crash reports seem to vary quite a lot, but they all include something like this:
Thread 21 Crashed:: Dispatch queue: Xcode.IB.MessageChannel
0 libsystem_kernel.dylib 0x7ff81702c00e __pthread_kill + 10
1 libsystem_pthread.dylib 0x7ff8170621ff pthread_kill + 263
2 libsystem_c.dylib 0x7ff816fadd24 abort + 123
3 IDEKit 0x109406578 +[IDEAssertionHandler _handleAssertionWithLogString:assertionSignature:assertionReason:extraBacktrace:] + 1216
4 IDEKit 0x109406a83 -[IDEAssertionHandler handleFailureInMethod:object:fileName:lineNumber:assertionSignature:messageFormat:arguments:] + 1075
5 DVTFoundation 0x105e7e495 _DVTAssertionHandler + 464
6 DVTFoundation 0x105e7e6a1 _DVTAssertionFailureHandler + 306
7 AssetCatalogFoundation 0x11774d871 -[IBMessageSendChannel sendMessage:returnValue:context:error:arguments:] + 1785
8 IDEInterfaceBuilderCocoaTouchIntegration 0x12b098b36 __61-[IBCocoaTouchToolProxy updateScenesWithSceneUpdateRequests:]_block_invoke + 115
9 IDEInterfaceBuilderKit 0x129e299ef -[IBAbstractPlatformToolProxy _ON_QUEUE_sendMessage:toChannelReturningError:during:] + 149
10 IDEInterfaceBuilderKit 0x129e29636 __59-[IBAbstractPlatformToolProxy sendMessage:toChannelDuring:]_block_invoke + 49
...
What is wrong with my storyboard? How do I fix it?
Yes, I have tried cleaning the build, and deleting the DerivedData folder. Yes, I have tried removing this scene and recreating it - same behaviour results. (Does this mean there's something wrong somewhere else in my storyboard file? How do I find the problem?) I have looked through the code and cannot see any merge conflicts etc. (which I wouldn't expect anyway, since I'm the only person editing it in a linear sequence of commits).