Xcode 6 GM crashes when selecting the main storybo

2020-02-23 07:07发布

I just downloaded the Xcode 6 GM and every time I select the main storyboard (and a specific xib) Xcode crashes.

The error to be sent to Apple contains the following info

ASSERTION FAILURE in /SourceCache/IDEInterfaceBuilderCocoaTouch/IDEInterfaceBuilderCocoaTouch-6238/InterfaceBuilder/Documents/IBCocoaTouchPlatform.m:531 Details: Returned status computation result is not an IBMarshallingResult, it's {

Anyone experiencing the same problem?

13条回答
别忘想泡老子
2楼-- · 2020-02-23 07:58

I've been wrestling with the same problem after upgrading from Xcode 5 to 6.0.1. Trying to load my large and complicated iPad storyboard would freeze Xcode, bring up the Pinwheel Of Death, and eventually crash it out. Sometimes it would show errors on build as well, mentioning missing OIDs.

I ended up rolling back the Storyboard file in Git (via the command line since Xcode wouldn't let me get that far) all the way back to the very first straight-from-the-template version. I cleaned the project and rebuilt it, and the storyboard loaded properly.

I then went forward in time commit by commit, cleaning and building every time. I expected I would get to a point where things broke again - but I got all the way up to the most recent commit without any freezes.

When I tried jumping ahead by several weeks, though, I got the freeze-ups and crashes again.

I wonder if the new Storyboard editor in 6.0.1 just needs to build up its internal representations (and caches?) in smaller easy steps rather than the giant leap of a full complicated file.

This rollback/roll forward/rebuild process took about 45 minutes for me, but that's a whole lot less time than it would take for me to rebuild this storyboard. Hope this helps you.

查看更多
迷人小祖宗
3楼-- · 2020-02-23 08:04

(1) Have you cleaned and rebuilt the project?

(2) Have you tried to empty the xcuserdata folder? The folder contains ui states and can be the reason for such an issue, especially when xcode was updated. The xcuserdata folder can be found in your project directory when you right-click your .xcodeproj "file" and select "show package content". Close Xcode, empty the xcuserdata folder and reopen the .xcodeproj file.

Hope one of these helps :)

查看更多
孤傲高冷的网名
4楼-- · 2020-02-23 08:05

If people are using multiple tabs that might be an issue. My Xcode 6.0.1 was becoming unresponsive whenever the same storyboard was opened in more than one tab...

查看更多
太酷不给撩
5楼-- · 2020-02-23 08:05

Was this from an earlier version of Xcode, or was it from one of the earlier Xcode 6 releases? If the latter, then the solution will be to recreate it.

You might be able to take a look inside the storyboard file and find out if it's a valid document - the file is XML based so you should be able to see if there are any missing elements or problems introduced by a merge conflict, for example. You may also be able to try deleting particular screens to see if that resolves your problem - perhaps the issue is in relation to one particular screen.

I'd also suggest checking if your objects have implemented an IBDesignable attribute and if you used that in the storyboard; if so, it might be a failure of the NSCoder to be able to restore the object from the file.

查看更多
爷的心禁止访问
6楼-- · 2020-02-23 08:05

I just experienced the same thing. It turned out to be a duplicate UILabel in the storyboard due to a git merge. Apparently Xcode will crash if two UI elements have the same internal ID.

Somewhat similar to andrew-burke's method, my method for finding the responsible issue involved tracing through git for the problem change. Steps:

  • Iteratively step backward through the git history, checking out each commit until you find the first storyboard that doesn't crash Xcode.
  • Once you have the commit that started crashing, check out HEAD and iteratively revert the storyboard changes in the problem commit. Continue to narrow it down until you have the one UI element or one line that will cause a crash.
  • Revert the responsible change permanently and restart Xcode. Open the storyboard again and you may be warned about an internal inconsistency. Agree to the proposed changes Xcode makes, but review them.
  • If necessary, you may now attempt to re-create the UI element or changes from scratch that were causing the problem before.
查看更多
Lonely孤独者°
7楼-- · 2020-02-23 08:06

My Xcode crashed when I dragged a button on Main.storyboard to create a IBOutlet.

I found it caused by a build settings item -- [Objective-C Automatic Reference Counting].

If it is set to "No", Xcode will crash on creating a IBOutlet.

OS X Version: Yosemite 10.10.1 

Xcode Version: 6.1.1 (6A2008a)

Hope this helps.

查看更多
登录 后发表回答