How to prevent XCode5 from hanging/beachballing when opening a storyboard?

依然范特西╮ 提交于 2019-12-11 07:46:46

问题


Im working on a game I did create in Xcode 4.6 with storyboards. A few weeks ago I opened it in Xcode5 and it worked fine. I was asked to upgrade storyboard and it worked fine. Its not a complex storyboard, only 4 scenes and all standard stuff. Today I went in to try and open it again and xcode hangs and beach balls. I have to force quit it and I do get a very large report which I have saved in a text file but would be too long to post here.

How do I even find out what is causing the problem more specifically in order to ask or google around for an answer?

Things Ive tried: I have disabled source control I cant select the storyboard in order to see the IB Document opens in version, because it hangs.

I think this is the relevant part of the crash report:

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

Application Specific Information: ProductBuildVersion: 5A1413 ASSERTION FAILURE in /SourceCache/IDEInterfaceBuilderCocoaTouch/IDEInterfaceBuilderCocoaTouch-3742/IBPlugin/Utilities/IBObjectMarshalling.m:670 Details: Failed to run one shot request for IBLayoutConstraint, IBUIButton, IBUILabel, IBUITextField, IBUIView, and IBUIViewController. Interface Builder encountered an error communicating with the iOS Simulator. If you choose to file a crash report or radar for this issue, please check Console.app for crash reports for "Interface Builder Cocoa Touch Tool" and include their content in your crash report. Exception name: The operation couldn’t be completed. (IBMessageChannelErrorDomain error 1.) Exception reason: (null) Exception backtrace: (null) Exception info:{ IBUnderlyingError = "Error Domain=IBMessageChannelErrorDomain Code=1 \"The operation couldn\U2019t be completed. (IBMessageChannelErrorDomain error 1.)\""; } Function: void IBAssertMarshallingFailure(NSString *_strong, NSString *_strong) Thread: {name = (null), num = 1} Hints:
None


回答1:


You may have to disable autolayout manually in the storyboard. Right-click the storyboard -> Open As -> Source Code. Find useAutolayout="YES" and change it to useAutolayout="NO".

This may only work with Mavericks OS and XCode 5.0.2. XCode 5.0.2 has several "occasionally hangs" bug fixes.




回答2:


Well, this is what I did.

  1. I opened up the Storyboard file from Finder, in TextEdit, saw the Autolayout property and decided to set it to NO. I did this because I remember skimming through the Crash report, seeing something about constraints.

  2. Then I opened the Storyboard from Finder, but this time in Xcode5. It opened up the storyboard scenes but all scenes were pretty much blank. Meaning I couldn't see any controls that were originally there. I thought this was due to removing autolayout. So I re-added the key useAutolayout="YES" into the xml in TextEdit. Then I opened up the Storyboard file again, in Xcode5 and it was still blank.

  3. Then I decided that perhaps I needed to open the entire project in XCode5 to see if the controls were still there. I did but I still didn't SEE the controls, but in the Scene navigator I could expand the nodes and those controls appeared to be in there.

  4. Finally I resolved each AL issue individually and now the storyboard items have reappeared.



来源:https://stackoverflow.com/questions/19127809/how-to-prevent-xcode5-from-hanging-beachballing-when-opening-a-storyboard

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!