Xcode 在打开 xib 文件时崩溃
我的 xcode 有问题,无法打开 xib 文件。每次我点击 xib 文件,xcode 就会崩溃。这种情况发生在 xcode3.2 和 xcode4 上。
我能做点什么吗?我已经卸载并重新安装但仍然无法工作。
任何帮助都将非常感激。
如果有帮助的话,我正在使用 xcode4 并从应用程序商店购买。
I have problems with xcode and can't open xib files. Everytime I click on the xib file, xcode crashes. This happens on the xcode3.2 as well as the xcode4.
Is there anything I can do to it? I have un-installed and re-installed but still not working.
Any help would really be appreciable.
If it helps, I am using xcode4 and bought it from the app store.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(8)
我的问题是 XIB 文件中的自定义字体。我必须在计算机上安装缺少的字体,问题就解决了。
My problem was custom fonts in XIB file. I had to install missing fonts on my computer and problem was solved.
这个问题的解决方案是重新安装我的操作系统。基本上,我必须重新安装 Lion,之后一切正常。我认为这个问题与缺少一些库文件有关。
注意:如果您遇到此问题,那么重新安装操作系统可能不是唯一的解决方案,因为可能会出现更简单的解决方案。这个问题的一些答案可能会有所帮助,而在其他情况下,简单的谷歌或 stackoverflow 搜索可能会有很大帮助。您还可以尝试 Xcode 邮件列表。我建议仅当您尝试了“一切”并且没有人能够提供帮助时才重新安装操作系统,因此您的 Z 计划。
The solution to this problem was to re-install my operating system. Basically, I had to re-install Lion and after that everything worked fine. I think the problem had something to do with some library files that were missing.
NOTE: If you have this problem then re-installing your OS might not be the only solution as easier solutions may present themselves. Some of the answers on this question could be of help and in other cases, a simple google or stackoverflow search could be of great aid. You could also try the Xcode mailing list. I would advice resorting to re-installing your OS only if you have tried 'everything' and no one is able to help, hence your plan-Z.
我今天在 Xcode 4.3 中遇到了同样的问题。这绝对是 Xcode 中的一个错误,与打开旧版本 Xcode 保存的 xib 文件有关。为了解决这个问题,我做了以下操作,其中一些可能不是必需的,但我将在此处列出所有内容以防万一:
此时我很确定它要么是与 xcode 的颠覆冲突,要么是 xcode 保留了对文件名的过时引用。但现在我已打开该文件,我将执行以下操作:
之后一切都神奇地发生了。
我要指出的是,我检查并更改了所有 nib 文件,然后在“文档版本控制”窗格下另存为“Xcode 4.3”。
我在错误报告中向苹果发送了崩溃报告和笔尖内容,但如果有人想查看实际发生的情况,我将其粘贴到此处:
http://pastebin.com/sC0pBUfu
我希望这对某人有帮助,我花了大约四个小时才解决这个问题。重新创建 nib 文件不起作用,我怀疑保存到 nib 文件中的文件名和 IDE 版本有问题。
I had this same problem in Xcode 4.3 today. It is definitely a bug in Xcode and it has something to do with opening xib files saved with older versions of Xcode. To work around it, I did the following, some of which may not be necessary, but I'll list it all here just in case:
At this point I'm pretty sure it's either a subversion conflict with xcode or xcode is keeping a stale reference to a filename around. But now that I have the file open, I do the following:
And everything just magically worked after that.
I will point out that I went through and changed all of my nib files after that to save as "Xcode 4.3" under the Document Versioning pane.
I sent a crash report and the nib contents to apple in a bug report but if anyone wants to see what actually happened I pasted it here:
http://pastebin.com/sC0pBUfu
I hope this helps someone, it took me about four hours to sort this out. Recreating nib files doesn't work, its a problem with the filename and IDE-version saved into the nib file I suspect.
一次只安装一个 xcode。意味着单独使用 Xcode 4 或 Xcode 3.2。这可能会解决您的问题。尝试一下。
Just Install one xcode at a time. Means use Xcode 4 or Xcode 3.2 alone. This may solve your problem. Try that.
使用 http://www.cocoabuilder.com/archive/ 的新建议进行编辑xcode/305032-xcode-help.html :
并且不要使用 App Store 版本。使用 Apple.com/Developer 上的 iOS SDK。
创建一个新的 XIB。单击一次。如果没有:
不要只打开 xib,右键单击 Open As : Source。看看你是否能看到任何东西,如果它仍然崩溃:
似乎没有 Xcode.pbxproject 错误
Edited with new suggestion from http://www.cocoabuilder.com/archive/xcode/305032-xcode-help.html :
and Don't use the App Store version. Use the one on Apple.com/Developer for iOS SDK's.
Create a new XIB. Click once. If not:
Don't just open the xib, right click Open As : Source. See if you can see anything, if it still crashes:
Does not seem to a Xcode.pbxproject error
好吧,一种方法可以是......:
在聚光灯下键入界面生成器
打开它。
转到您的项目并拖动并添加将您的 xib 拖放到扩展坞上的界面生成器中。
它会打开。
此问题可能是由于您的 Mac 上的不同位置存在多个版本的 xcode。
Well, one way can be..:
type interface builder in spotlight
open it.
go to your project and drag & drop your xib to the interface builder on the dock.
It will open.
This problem may be because of multiple versions of xcode on different locations on your mac.
无法打开 iOS 版任何 xib 文件?在你的崩溃日志中,
您是否使用 Console.app 检查过控制台日志?无论如何,听起来您的 Xcode 环境已损坏。
Can't open any xib file for iOS? In your crash log,
Have you checked your console log using Console.app? Anyway, it sounds like that your Xcode environment is corrupted.
这是一个
XCode
错误。创建一个新的 .storyboard 并在打开 .xib 之前打开它将修复崩溃,至少是暂时的。
Its an
XCode
bug.Creating a new .storyboard and opening it before opening .xib will fix the crash, at least temporarily.