【问题标题】:Xcode crashes when I open a specific XIB file打开特定 XIB 文件时 Xcode 崩溃
【发布时间】:2013-07-16 07:31:21
【问题描述】:

我有一个 XIB 文件,直到今天它都运行良好 - 当我尝试在 Xcode 中打开它时,出现了沙滩球,1 分钟后 Xcode 崩溃了。其他人XIBs 工作得很好。此外,如果我只是在我的设备上构建和运行项目,它也可以工作(并且 XIB 在应用程序上工作)。

这是错误信息:

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

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

Application Specific Information:
ProductBuildVersion: 4G1004
ASSERTION FAILURE in /SourceCache/IDEInterfaceBuilderCocoaTouch/IDEInterfaceBuilderCocoaTouch-1929/IBPlugin/Utilities/IBObjectMarshalling.m:651
Details:  Failed to arbitrate IBNSLayoutConstraint, IBUIButton, IBUIImageView, IBUILabel, IBUITextField, and IBUIView.

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: NSInternalInconsistencyException

我会感激任何想法和想法!

【问题讨论】:

  • 您最近是否在其他 Xcode 版本中打开了那个 xib 文件?尤其是在一些尚未发布的开发者预览版中?
  • @HermannKlecker 不,我没有。我现在有一个 Lion 版本,不幸的是,我无法设置 Xcode 5。

标签: objective-c xcode crash xib


【解决方案1】:

如果 Xcode 在您单击 xib 文件时立即崩溃,您将无法取消选中 Use AutoLayout。以下是您可以更改它的方法:

  1. 在项目导航器中右键单击 .xib 文件
  2. 选择打开方式... > 源代码
  3. 在最后找到这条线:<bool key="IBDocument.UseAutolayout">YES</bool>
  4. YES 更改为NO
  5. 保存文件
  6. 在项目导航器中再次右键单击 .xib 文件
  7. 选择 打开方式... > 界面生成器 - iOS

【讨论】:

  • 该死。我希望那会奏效。我已经向 bugreporter 提交了 28497465。以下是我的文件的标题(有点旧)-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="4510" systemVersion="12F37" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="NO">
  • 我的解决方法是将文件加载到 Xcode 7.3.1 中,并将其用作尝试在 8.0 中重建它的参考。 (这总是会导致可能由相关问题引起的崩溃。)
【解决方案2】:

你在使用 autoLayout 属性吗?取消选中 Use AutoLayout 复选框,它应该可以正常工作。取消选中它然后保存文件似乎更早地为我解决了这个问题。查看此链接了解更多详情Xcode Interface Builder crashes when I edit storyboard

【讨论】:

  • 我不使用自动布局 + 我无法在 xib 中进行任何更改,因为当我打开它时 - 它崩溃了。
  • 你检查了我在这里添加的链接吗,在那里提到并解决了。
猜你喜欢
  • 2011-09-06
  • 1970-01-01
  • 2015-04-10
  • 1970-01-01
  • 1970-01-01
  • 2023-03-10
  • 2015-10-02
  • 2011-05-26
  • 1970-01-01
相关资源
最近更新 更多