Xcode 在打开 xib 文件时崩溃

发布于 2024-11-13 06:41:57 字数 177 浏览 10 评论 0原文

我的 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(8

在梵高的星空下 2024-11-20 06:41:57

我的问题是 XIB 文件中的自定义字体。我必须在计算机上安装缺少的字体,问题就解决了。

My problem was custom fonts in XIB file. I had to install missing fonts on my computer and problem was solved.

沙与沫 2024-11-20 06:41:57

这个问题的解决方案是重新安装我的操作系统。基本上,我必须重新安装 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.

萌酱 2024-11-20 06:41:57

我今天在 Xcode 4.3 中遇到了同样的问题。这绝对是 Xcode 中的一个错误,与打开旧版本 Xcode 保存的 xib 文件有关。为了解决这个问题,我做了以下操作,其中一些可能不是必需的,但我将在此处列出所有内容以防万一:

  1. quit Xcode
  2. 将我的 xib 文件 foo.xib 复制到 foo2.xib
  3. svn rm foo.xib
  4. svn commit
  5. svn update(现在 foo.xib 不在磁盘上)
  6. 打开我的 xcode 项目,foo.xib 显示为红色,因为它找不到该文件。从项目中删除 foo.xib。
  7. 将 foo2.xib 从 finder 拖到我的项目中,
  8. 单击 foo2.xib ——对我来说它打开得很好

此时我很确定它要么是与 xcode 的颠覆冲突,要么是 xcode 保留了对文件名的过时引用。但现在我已打开该文件,我将执行以下操作:

  1. 显示右侧 IDE 设置窗格(您可以在其中设置 NIB 选项)。
  2. 单击右窗格中的左上角图标(工具提示显示“显示文件检查器”)。
  3. 有一个名为“Interface Builder Document”的部分,下面有一个“Document Versioning”弹出/组合框。我的文件显示 Xcode 4.2.1,所以我将其更改为 Xcode 4.3。
  4. 此时,我还在笔尖中摆弄了一些其他设置,例如更改窗口的标题。这样做的目的是确保笔尖能够被重新保存。
  5. 现在,在列出项目文件的左侧窗格中,我单击“foo2.xib”并将其重命名为“foo.xib”——Xcode 会自动将其添加回 subversion 存储库。

之后一切都神奇地发生了。

我要指出的是,我检查并更改了所有 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:

  1. quit Xcode
  2. copied my xib file foo.xib to foo2.xib
  3. svn rm foo.xib
  4. svn commit
  5. svn update (now foo.xib is not on disk)
  6. open my xcode project, foo.xib shows up in red since it can't find the file. delete foo.xib from the project.
  7. drag foo2.xib from the finder into my project
  8. click on foo2.xib -- for me it opened just fine

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:

  1. Show the right-hand-side IDE settings pane (where you can set NIB options).
  2. Click the top left icon in the right-pane (tooltip says "Show the File Inspector").
  3. There is a section called "Interface Builder Document" and under there is a "Document Versioning" popup/combo box. My file shows Xcode 4.2.1, so I changed it to Xcode 4.3.
  4. At this point I also fiddled with a few other settings in my nib, for example changing the title of a Window. The point of this was to make sure the nib would be re-saved.
  5. Now in the left-hand pane that lists the project files, I clicked on "foo2.xib" and renamed it to "foo.xib" -- Xcode automatically adds it back to the subversion repository.

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.

旧伤还要旧人安 2024-11-20 06:41:57

一次只安装一个 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.

っ左 2024-11-20 06:41:57

使用 http://www.cocoabuilder.com/archive/ 的新建议进行编辑xcode/305032-xcode-help.html

如果您完全卸载并重新安装了 XCode,并且通过
已卸载,我的意思是正在运行

sudo /Developer/Library/uninstall-devtools -mode=all

然后删除/Developer,然后重新安装,但仍然不行
然后从错误中工作我必须认为你的 OSX 已损坏
或一个杂散的图书馆。

我用谷歌搜索并发现了几个通过重新安装成功的人
SnowLeopard(然后将其一直升级到最新补丁级别,
然后重新安装 XCode),并且有一些人发现
/usr/local/include 和 /usr/local/lib 中的杂散库,因此您可能
想去那里寻找奇怪的文件,或者暂时重命名
他们并尝试重新安装 XCode,我不确定里面有多少内容
那里有你真正需要的。我发现他们的特别帖子
安装了 ImageMagic 并从其中删除了这些库
/usr/local/lib 并再次工作。

此时我将超越 XCode 本身并假设我的
系统已损坏。

Google上还有更多建议,放入CFXMLNodeGetInfoPtr即可
而且有大量的帖子,询问多于回答。

并且不要使用 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 :

If you have entirely uninstalled and then reinstalled XCode, and by
uninstalled I mean running

sudo /Developer/Library/uninstall-devtools -mode=all

and then trashing /Developer and then reinstalled and it's STILL not
working then from the error I have to think you have a corrupted OSX
or a stray library.

I googled and found a couple of people who succeeded by reinstalled
SnowLeopard (and then upgrading it all the way to latest patch level,
then reinstalling XCode), and there were a few people who had found
stray libraries in /usr/local/include and /usr/local/lib, so you might
want to go look for odd files there, or perhaps TEMPORARILY rename
them and try reinstalling XCode, I'm not sure how much of what's in
there you really need. The particular post I found they guy had
installed ImageMagic and he had removed those libraries from
/usr/local/lib and was working again.

At this point I'd be looking beyond XCode itself and assuming my
system was corrupt.

There's more suggestions on Google, just put in CFXMLNodeGetInfoPtr
and there are loads of posts, more asking than answering.

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

孤独陪着我 2024-11-20 06:41:57

好吧,一种方法可以是......:

  1. 在聚光灯下键入界面生成器

  2. 打开它。

  3. 转到您的项目并拖动并添加将您的 xib 拖放到扩展坞上的界面生成器中。

它会打开。

此问题可能是由于您的 Mac 上的不同位置存在多个版本的 xcode。

Well, one way can be..:

  1. type interface builder in spotlight

  2. open it.

  3. 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.

婴鹅 2024-11-20 06:41:57

无法打开 iOS 版任何 xib 文件?在你的崩溃日志中,

详细信息:Interface Builder 与 iOS 模拟器通信时遇到错误。 “Interface Builder Cocoa Touch Tool”(5963) 无法启动并退出,状态为 (null),信号 5。请检查 Console.app 以获取“Interface Builder Cocoa Touch Tool”的崩溃报告以获取更多信息。

您是否使用 Console.app 检查过控制台日志?无论如何,听起来您的 Xcode 环境已损坏。

  1. sudo /Developer/Library/uninstall-devtools -mode=all
  2. 如果您将任何文件放入 /Developer,请将其备份。
  3. sudo rm -rf /开发人员
  4. 重新启动。
  5. 安装 Xcode。

Can't open any xib file for iOS? In your crash log,

Details: Interface Builder encountered an error communicating with the iOS Simulator. "Interface Builder Cocoa Touch Tool" (5963) failed to launch and exited with status (null), signal 5. Please check Console.app for crash reports for "Interface Builder Cocoa Touch Tool" for further information.

Have you checked your console log using Console.app? Anyway, it sounds like that your Xcode environment is corrupted.

  1. sudo /Developer/Library/uninstall-devtools -mode=all
  2. If you put any files into /Developer, back it up.
  3. sudo rm -rf /Developer
  4. reboot.
  5. install Xcode.
海拔太高太耀眼 2024-11-20 06:41:57

这是一个 XCode 错误。

创建一个新的 .storyboard 并在打开 .xib 之前打开它将修复崩溃,至少是暂时的。

Its an XCode bug.

Creating a new .storyboard and opening it before opening .xib will fix the crash, at least temporarily.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文