Xcode 9 GM crashes when opening any storyboard

I am unable to open any storyboards in Xcode 9 GM because Xcode crashes immediately. I cleared out the `xcuserdata` directories from the project and the workspace to makes sure it wasn't in a bad state. Here is the crash log:


Process:               Xcode [43275]
Path:                  /Applications/Xcode.app/Contents/MacOS/Xcode
Identifier:            Xcode
Version:               9.0 (13247)
Code Type:             X86-64 (Native)
Parent Process:        ??? [1]
Responsible:           Xcode [43275]
User ID:               501


Date/Time:             2017-09-18 11:04:45.027 -0600
OS Version:            Mac OS X 10.13 (17A362a)
Report Version:        12
Bridge OS Version:     3.0 (14Y661)
Anonymous UUID:        8ACC2F1A-A912-94D5-E4A0-89FADCDEDB2C


Sleep/Wake UUID:       90BFAE53-A676-4E94-8B0F-4C0DCDE64007


Time Awake Since Boot: 170000 seconds
Time Since Wake:       4600 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: 9A235
ASSERTION FAILURE in /Library/Caches/com.apple.xbs/Sources/IDEFrameworks/IDEFrameworks-13247/IDEKit/Application/IDEDocumentController.m:2223
Details:  There can only be one document registered with a given URL. newDocument:<IBStoryboardDocument: 0x7fa25eb8da00>(  0   -[IDEEditorDocument init] (in IDEKit)
  1   -[IBDocument init] (in IDEInterfaceBuilderKit)
  2   -[NSDocument initForURL:withContentsOfURL:ofType:error:] (in AppKit)
  3   -[IDEEditorDocument initForURL:withContentsOfURL:ofType:error:] (in IDEKit)
  4   -[IBDocument initForURL:withContentsOfURL:ofType:error:] (in IDEInterfaceBuilderKit)
  5   +[IDEDocumentController _newEditorDocumentWithClass:forURL:withContentsOfURL:ofType:extension:error:] (in IDEKit)
  6   +[IDEDocumentController _retainedEditorDocumentForURL:type:error:] (in IDEKit)
  7   +[IDEDocumentController retainedEditorDocumentForNavigableItem:forUseWithWorkspaceDocument:error:] (in IDEKit)
  8   -[IDEUtilityArea computeSelectedDocumentsForNavigables:] (in IDEKit)
  9   -[IDEUtilityArea _rebuildStackWithNavigableItems:] (in IDEKit)
10   -[IDEUtilityArea _rebuildCategoriesAndStack] (in IDEKit)
11   -[DVTDelayedInvocation runBlock:] (in DVTFoundation)
12   performSelectorWithObject__DVTMainThreadLatencyChecker__ (in DVTFoundation)
13   __NSFirePerformWithOrder (in Foundation)
14   __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ (in CoreFoundation)
15   __CFRunLoopDoObservers (in CoreFoundation)
16   __CFRunLoopRun (in CoreFoundation)
17   CFRunLoopRunSpecific (in CoreFoundation)
18   RunCurrentEventLoopInMode (in HIToolbox)
19   ReceiveNextEventCommon (in HIToolbox)
20   _BlockUntilNextEventMatchingListInModeWithFilter (in HIToolbox)
21   _DPSNextEvent (in AppKit)
22   -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] (in AppKit)
23   -[DVTApplication nextEventMatchingMask:untilDate:inMode:dequeue:] (in DVTKit)
24   -[NSApplication run] (in AppKit)
25   NSApplicationMain (in AppKit)
26   start (in libdyld.dylib)
), existingDocument:<IBStoryboardDocument: 0x7fa263933a00>(  0   -[IDEEditorDocument init] (in IDEKit)
  1   -[IBDocument init] (in IDEInterfaceBuilderKit)
  2   -[NSDocument initForURL:withContentsOfURL:ofType:error:] (in AppKit)
  3   -[IDEEditorDocument initForURL:withContentsOfURL:ofType:error:] (in IDEKit)
  4   -[IBDocument initForURL:withContentsOfURL:ofType:error:] (in IDEInterfaceBuilderKit)
  5   +[IDEDocumentController _newEditorDocumentWithClass:forURL:withContentsOfURL:ofType:extension:error:] (in IDEKit)
  6   -[IDEEditorContext _newEditorDocumentWithClass:forURL:withContentsOfURL:ofType:extension:error:] (in IDEKit)
  7   -[IDEEditorContext _openNavigableItem:withContentsOfURL:documentExtension:shouldInstallEditorBlock:] (in IDEKit)
  8   -[IDEEditorContext _openNavigableItem:withContentsOfURL:shouldInstallEditorBlock:] (in IDEKit)
  9   -[IDEEditorContext _notifyDelegateAndOpenNavigableItem:withContentsURL:documentExtensionIdentifier:locationToSelect:annotationRepresentedObject:stateDictionary:annotationWantsIndicatorAnimation:exploreAnnotationRepresentedObject:highlightSelection:alwaysReplaceExistingNavigableItem:skipSubDocumentNavigationUnlessEditorIsReplaced:] (in IDEKit)
10   -[IDEEditorContext _notifyDelegateAndOpenEditorOpenSpecifier:updateHistory:] (in IDEKit)
11   -[IDEEditorContext openEditorOpenSpecifier:updateHistory:] (in IDEKit)
12   -[IDEEditorContext openEditorOpenSpecifier:] (in IDEKit)
13   -[IDEEditorModeViewController openEditorOpenSpecifier:editorContext:] (in IDEKit)
14   -[IDEEditorArea _openEditorOpenSpecifier:editorContext:takeFocus:] (in IDEKit)
15   __108+[IDEEditorCoordinator _doOpenEditorOpenSpecifier:forWorkspaceTabController:editorContext:target:takeFocus:]_block_invoke_2 (in IDEKit)
16   __108+[IDEEditorCoordinator _doOpenEditorOpenSpecifier:forWorkspaceTabController:editorContext:target:takeFocus:]_block_invoke (in IDEKit)
17   +[IDEEditorCoordinator _doOpenWithWorkspaceTabController:editorContext:target:allowFallback:documentURL:usingBlock:] (in IDEKit)
18   +[IDEEditorCoordinator _doOpenEditorOpenSpecifier:forWorkspaceTabController:editorContext:target:takeFocus:] (in IDEKit)
19   -[_IDEOpenRequest _primitiveRunIfNecessary] (in IDEKit)
20   -[_IDEOpenRequest _runIfNecessary] (in IDEKit)
21   performSelector__DVTMainThreadLatencyChecker__ (in DVTFoundation)
22   __NSFireDelayedPerform (in Foundation)
23   __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ (in CoreFoundation)
24   __CFRunLoopDoTimer (in CoreFoundation)
25   __CFRunLoopDoTimers (in CoreFoundation)
26   __CFRunLoopRun (in CoreFoundation)
27   CFRunLoopRunSpecific (in CoreFoundation)
28   RunCurrentEventLoopInMode (in HIToolbox)
29   ReceiveNextEventCommon (in HIToolbox)
30   _BlockUntilNextEventMatchingListInModeWithFilter (in HIToolbox)
31   _DPSNextEvent (in AppKit)
32   -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] (in AppKit)
33   -[DVTApplication nextEventMatchingMask:untilDate:inMode:dequeue:] (in DVTKit)
34   -[NSColorPanel _loadColorPickers] (in AppKit)
35   -[NSColorPanel _colorPanelDidLoad] (in AppKit)
36   -[NSColorPanel initWithContentRect:styleMask:backing:defer:] (in AppKit)
37   -[NSColorPanel init] (in AppKit)
38   +[NSColorPanel sharedColorPanel] (in AppKit)
39   -[IBTargetRuntime installColorListIfNeeded] (in IDEInterfaceBuilderKit)
40   -[IBCocoaTouchTargetRuntime installColorListIfNeeded] (in IDEInterfaceBuilderCocoaTouchIntegration)
41   -[IBCocoaTouchTargetRuntime installColorListIfNeeded] (in IDEInterfaceBuilderCocoaTouchIntegration)
42   -[IBDocument setTargetRuntime:] (in IDEInterfaceBuilderKit)
43   -[IBDocument decodeContentsOfURL:ofType:decodingStyle:error:] (in IDEInterfaceBuilderKit)
44   -[IBDocument readFromURL:ofType:error:] (in IDEInterfaceBuilderKit)
45   -[NSDocument _initForURL:withContentsOfURL:ofType:error:] (in AppKit)
46   -[NSDocument initForURL:withContentsOfURL:ofType:error:] (in AppKit)
47   -[IDEEditorDocument initForURL:withContentsOfURL:ofType:error:] (in IDEKit)
48   -[IBDocument initForURL:withContentsOfURL:ofType:error:] (in IDEInterfaceBuilderKit)
49   +[IDEDocumentController _newEditorDocumentWithClass:forURL:withContentsOfURL:ofType:extension:error:] (in IDEKit)
50   +[IDEDocumentController _retainedEditorDocumentForURL:type:error:] (in IDEKit)
51   +[IDEDocumentController retainedEditorDocumentForNavigableItem:forUseWithWorkspaceDocument:error:] (in IDEKit)
52   -[IDEUtilityArea computeSelectedDocumentsForNavigables:] (in IDEKit)
53   -[IDEUtilityArea _rebuildStackWithNavigableItems:] (in IDEKit)
54   -[IDEUtilityArea _rebuildCategoriesAndStack] (in IDEKit)
55   -[DVTDelayedInvocation runBlock:] (in DVTFoundation)
56   performSelectorWithObject__DVTMainThreadLatencyChecker__ (in DVTFoundation)
57   __NSFirePerformWithOrder (in Foundation)
58   __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ (in CoreFoundation)
59   __CFRunLoopDoObservers (in CoreFoundation)
60   __CFRunLoopRun (in CoreFoundation)
61   CFRunLoopRunSpecific (in CoreFoundation)
62   RunCurrentEventLoopInMode (in HIToolbox)
63   ReceiveNextEventCommon (in HIToolbox)
64   _BlockUntilNextEventMatchingListInModeWithFilter (in HIToolbox)
65   _DPSNextEvent (in AppKit)
66   -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] (in AppKit)
67   -[DVTApplication nextEventMatchingMask:untilDate:inMode:dequeue:] (in DVTKit)
68   -[NSApplication run] (in AppKit)
69   NSApplicationMain (in AppKit)
70   start (in libdyld.dylib)
)
Object:   <IDEDocumentController: 0x7fa26141b600>
Method:   -addDocument:
Thread:   <NSThread: 0x7fa2614199c0>{number = 1, name = main}
Hints:  

Backtrace:
  0   -[IDEAssertionHandler handleFailureInMethod:object:fileName:lineNumber:assertionSignature:messageFormat:arguments:] (in IDEKit)
  1   _DVTAssertionHandler (in DVTFoundation)
  2   _DVTAssertionFailureHandler (in DVTFoundation)
  3   -[IDEDocumentController addDocument:] (in IDEKit)
  4   +[IDEDocumentController retainEditorDocument:] (in IDEKit)
  5   +[IDEDocumentController _retainedEditorDocumentForURL:type:error:] (in IDEKit)
  6   +[IDEDocumentController retainedEditorDocumentForNavigableItem:forUseWithWorkspaceDocument:error:] (in IDEKit)
  7   -[IDEUtilityArea computeSelectedDocumentsForNavigables:] (in IDEKit)
  8   -[IDEUtilityArea _rebuildStackWithNavigableItems:] (in IDEKit)
  9   -[IDEUtilityArea _rebuildCategoriesAndStack] (in IDEKit)
10   -[DVTDelayedInvocation runBlock:] (in DVTFoundation)
11   performSelectorWithObject__DVTMainThreadLatencyChecker__ (in DVTFoundation)
12   __NSFirePerformWithOrder (in Foundation)
13   __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ (in CoreFoundation)
14   __CFRunLoopDoObservers (in CoreFoundation)
15   __CFRunLoopRun (in CoreFoundation)
16   CFRunLoopRunSpecific (in CoreFoundation)
17   RunCurrentEventLoopInMode (in HIToolbox)
18   ReceiveNextEventCommon (in HIToolbox)
19   _BlockUntilNextEventMatchingListInModeWithFilter (in HIToolbox)
20   _DPSNextEvent (in AppKit)
21   -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] (in AppKit)
22   -[DVTApplication nextEventMatchingMask:untilDate:inMode:dequeue:] (in DVTKit)
23   -[NSApplication run] (in AppKit)
24   NSApplicationMain (in AppKit)
25   start (in libdyld.dylib)

abort() called

Replies

Me too.

Seems you have something in cache that causes problem.

Did you performa Build Folder Clean ?

Is it a project created in XCode8 that you open in 9 ?

yeah, i have the same problem.. my project was been created on xcode 8.. after update to xcode 9, i cant open any storyboard because crash xcode or i have to force quit.. any sugestions ??


i try to remove any row with <nil key=", but doesnt work.. =/

Same here. Cleaning or "deep cleaning" (remove build folder) doesn't help. Help!

Hello again!


so.. i thinking i got it resolved!!


if your application be using camera and photo, open storyboard with xml, remove scene are you using camera and photo, and try open as interface Build again.


After I create a new project and copy/paste item by item (scene), I found the bug. in my case, the Camera and Photo using tag . So, I removed row, and open as interface building. and... Worked!


so, I just need recreate the scene with camera and photo.. Sry my English!

UGH, me too. Is there no fix for this? I can't submit until this is resolved.

I managed to fix it !
Cleaning build folder, clean, delete derived data, delete saved state, reboot with reopening windows, create new single view application, open storyboard.

Now you should be able to open your storyboards again

Same problem. For me to fix it, the solution was to create new single view application, open the storyboard there, and then I could go back to my original project and it worked fine.

Me too. A large Storyboard created in Xcode 8 causes Xcode 9 (including the 9.1 beta 2 release) to hang and crash.


I'm blocked from submitting any updates to my app, as I had spent a lot of time converting my application to support Storyboards. Sigh. That was a waste of two months.


I've gone through the Storyboard in Xcode 8, deleting each view in turn to see if getting rid of a specific one will let Xcode 9 use them, but to no avail.


I've tried all the supersticious removing of derrived data, looking for <nil> tags etc. Nothing makes a blind bit of difference. I'm totally stuck.


I created a bug, and it's just marked as "dupe".

How do you open an existing Storyboard in a new app?

Try changing the "View As:" to iPhone X. Then storyboard loads quickly again.

Hi everyone,


Yesterday I was creating a test project (single view app) and I only modified the Main.storyboard in this newly created project. After adding a UIStackView with some UILabels (embedded in UIViews) and one more UILabel next to the stack view I added some basic constraints and after that started setting the content hugging and compression resistance. Xcode started crashing and after a few crashes the storyboard would no longer load. Now I can look at an activity spinner for hours and nothing happens. After this, other storyboards (even in new projects) also won't open.


I just filed a bug report with the test project. I also tried opening the test project on another Macbook but it has the same issue. I'm using the latest official app store Xcode release.

I finally resolved my issue by extracting each view in turn to see what was wrong. Only took a few days.


It seems to be related to the Toolbar, and adding multiple buttons. Looks like this is a bug mentioned in a separate posting in these forums.


So open up your project in Xcode 8, and simplify or remove your toolbars and see if that helps.

I just spent some hours having the same experience. I tried creating a new class then copy everything from the "busted" class. When I added a toolbar button and tried to change that button to a camera, Xcode went into infinite hang mode. Every one of my XIB files that had the problem had a toolbar camera button in it.

XCode 9.0 was working on my project.

XCode 9.1 would not build any of my storyboards.


Building a storyboard from scratch I found that it would crash if any Tab Bar Item: System Item was set to any of the standards (Search, More...). Custom would build.


I've filed bug 35241757