Xcode 9.0 b5 storyboard editor crash

I have been tweaking our app for iOS 11 but Xcode 9.0 b5 crashes as soon as I attempt to edit my main storyboard (build/run work fine). Xcode 9.0 b4 has no issues with the same file. Crash report will follow at the bottom of this post.


I have identified the crash as being caused by the presence of 4 navigation controllers in the storyboard. Removing them with a text editor allows Xcode to display the storyboard (minus the offending navigation controllers). These were used to bring up view controllers modally when bar button items were tapped. The only common thread amongst those seem to be the fact that they aren't a visible part of their scene (the bar button items are attached as outlets and added to the toolbar or navigation bar if relevant). Note that recreating a show segue from the same bar button items causes Xcode to crash instantly.


Since I get no warnings and the app builds & runs normally, I'm not overly worried. Just wondering if anyone else has been experiencing a similar issue.


Crash report:


Process:               Xcode [33099]
Path:                  /Applications/Xcode-beta.app/Contents/MacOS/Xcode
Identifier:            com.apple.dt.Xcode
Version:               9.0 (13226.5)
Build Info:            IDEFrameworks-13226005000000000~14
Code Type:             X86-64 (Native)
Parent Process:        ??? [1]
Responsible:           Xcode [33099]
User ID:               1700997662


Date/Time:             2017-08-10 15:45:59.315 -0400
OS Version:            Mac OS X 10.12.6 (16G29)
Report Version:        12
Anonymous UUID:        4C707867-0F4B-A4D5-CFF4-F497B7B7F058




Time Awake Since Boot: 1200000 seconds


System Integrity Protection: enabled


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


Exception Type:        EXC_CRASH (SIGABRT)
Exception Codes:       0x0000000000000000, 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY


Application Specific Information:
ProductBuildVersion: 9M202q
ASSERTION FAILURE in /Library/Caches/com.apple.xbs/Sources/IDEInterfaceBuilder/IDEInterfaceBuilder-13178.6/InterfaceBuilderKit/Document/StoryboardDocument/Metrics/IBStoryboardMetricsInferrer.m:128
Details:  Failed to push inherited simulated metrics to all scenes.
Object:   <IBStoryboardMetricsInferrer: 0x7fb91138a690>
Method:   -rebuildInferredMetrics
Thread:   <NSThread: 0x7fb907c18050>{number = 1, name = main}
Hints: 
  0: Replacement view is installing: <IBStoryboardCanvasViewController: 0x7fb911167ee0 representing: (null)>
Backtrace:
  0   -[IDEAssertionHandler handleFailureInMethod:object:fileName:lineNumber:assertionSignature:messageFormat:arguments:] (in IDEKit)
  1   _DVTAssertionHandler (in DVTFoundation)
  2   _DVTAssertionFailureHandler (in DVTFoundation)
  3   -[IBStoryboardMetricsInferrer rebuildInferredMetrics] (in IDEInterfaceBuilderKit)
  4   -[DVTDelayedInvocation runBlock:] (in DVTFoundation)
  5   -[DVTDelayedInvocation invokeIfNeeded] (in DVTFoundation)
  6   -[DVTDelayedInvocation invoke] (in DVTFoundation)
  7   -[IBCocoaTouchDocumentPlatformAdapter updateDocumentSimulatedMetricsWithDeviceConfiguration:] (in IDEInterfaceBuilderCocoaTouchIntegration)
  8   -[IBDocument switchToDeviceConfigurationWithoutFrameDeciding:] (in IDEInterfaceBuilderKit)
  9   -[IBDocument switchToDeviceConfiguration:] (in IDEInterfaceBuilderKit)
10   -[IBCanvasViewController _addDeviceBarIfNeeded] (in IDEInterfaceBuilderKit)
11   -[IBAbstractDocumentEditor didFinishLoadingSubViewControllers] (in IDEInterfaceBuilderKit)
12   -[IBAbstractDocumentEditor replacementView:didInstallViewController:] (in IDEInterfaceBuilderKit)
13   __42-[DVTReplacementView _setupViewController]_block_invoke (in DVTKit)
14   DVTInvokeWithFailureHint (in DVTFoundation)
15   -[DVTReplacementView _setupViewController] (in DVTKit)
16   -[DVTReplacementView installedViewController] (in DVTKit)
17   -[IBAbstractDocumentEditor viewDidInstall] (in IDEInterfaceBuilderKit)
18   -[IBStoryboardDocumentEditor viewDidInstall] (in IDEInterfaceBuilderKit)
19   -[DVTViewController _viewDidInstall] (in DVTKit)
20   -[_DVTViewController_ViewLifecycleInterpositions viewDidMoveToWindow] (in DVTKit)
21   -[NSView _setWindow:] (in AppKit)
22   -[NSView addSubview:] (in AppKit)
23   -[NSView setSubviews:] (in AppKit)
24   -[DVTBorderedView setContentView:] (in DVTKit)
25   -[IDEEditorContext _setEditorView] (in IDEKit)
26   -[IDEEditorContext setupNewEditor:] (in IDEKit)
27   __91-[IDEEditorContext _openNavigableItem:documentExtension:document:shouldInstallEditorBlock:]_block_invoke (in IDEKit)
28   -[IDEEditorContext _performBlockInsideReentrantGuard:] (in IDEKit)
29   -[IDEEditorContext _openNavigableItem:documentExtension:document:shouldInstallEditorBlock:] (in IDEKit)
30   -[IDEEditorContext _openNavigableItem:withContentsOfURL:documentExtension:shouldInstallEditorBlock:] (in IDEKit)
31   -[IDEEditorContext _notifyDelegateAndOpenNavigableItem:withContentsURL:documentExtensionIdentifier:locationToSelect:annotationRepresentedObject:stateDictionary:annotationWantsIndicatorAnimation:exploreAnnotationRepresentedObject:highlightSelection:alwaysReplaceExistingNavigableItem:skipSubDocumentNavigationUnlessEditorIsReplaced:] (in IDEKit)
32   -[IDEEditorContext _notifyDelegateAndOpenEditorOpenSpecifier:updateHistory:] (in IDEKit)
33   -[IDEEditorContext openEditorOpenSpecifier:updateHistory:] (in IDEKit)
34   -[IDEEditorContext openEditorOpenSpecifier:] (in IDEKit)
35   -[IDEEditorModeViewController openEditorOpenSpecifier:editorContext:] (in IDEKit)
36   -[IDEEditorArea _openEditorOpenSpecifier:editorContext:takeFocus:] (in IDEKit)
37   __108+[IDEEditorCoordinator _doOpenEditorOpenSpecifier:forWorkspaceTabController:editorContext:target:takeFocus:]_block_invoke_2 (in IDEKit)
38   __108+[IDEEditorCoordinator _doOpenEditorOpenSpecifier:forWorkspaceTabController:editorContext:target:takeFocus:]_block_invoke (in IDEKit)
39   +[IDEEditorCoordinator _doOpenWithWorkspaceTabController:editorContext:target:allowFallback:documentURL:usingBlock:] (in IDEKit)
40   +[IDEEditorCoordinator _doOpenEditorOpenSpecifier:forWorkspaceTabController:editorContext:target:takeFocus:] (in IDEKit)
41   -[_IDEOpenRequest _primitiveRunIfNecessary] (in IDEKit)
42   -[_IDEOpenRequest _runIfNecessary] (in IDEKit)
43   __NSFireDelayedPerform (in Foundation)
44   __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ (in CoreFoundation)
45   __CFRunLoopDoTimer (in CoreFoundation)
46   __CFRunLoopDoTimers (in CoreFoundation)
47   __CFRunLoopRun (in CoreFoundation)
48   CFRunLoopRunSpecific (in CoreFoundation)
49   RunCurrentEventLoopInMode (in HIToolbox)
50   ReceiveNextEventCommon (in HIToolbox)
51   _BlockUntilNextEventMatchingListInModeWithFilter (in HIToolbox)
52   _DPSNextEvent (in AppKit)
53   -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] (in AppKit)
54   -[DVTApplication nextEventMatchingMask:untilDate:inMode:dequeue:] (in DVTKit)
55   -[NSApplication run] (in AppKit)
56   NSApplicationMain (in AppKit)
57   start (in libdyld.dylib)

Yeah, I get this same crash for two of my storyboards. Says something about simulated metrics. I tried changing all the metrics to "inferred" (via xcode 8), but still I get a crash 100% when trying to open those storyboards in the editor.

Exact same problem here and I have posted it in Xcode / Interface Builder two days ago but Apples forum admins are not interested and removed the posting. 😠 Also no response on Bug Reporter.

I'm having the same problem exactly....

Any news about it?

Did anyone with the very same problem manage to open the story board with the interface builder without causing the Xcode to crash?

I'm hoping this will be addressed in Xcode 9b6 which I'm expecting next week.

Accepted Answer

From Xcode 9b6 release notes:


Fixed a crash caused by simulated metrics not propagating across segues from top-level objects in a scene dock. (33770879)


I haven't installed it yet. Downloading right now.


EDIT: Installed and it indeed resolves the issue.

Xcode 9.0 b5 storyboard editor crash
 
 
Q