XCode 4.2.1 在发布时在 Lion 10.7.2 上崩溃
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/8343866/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
XCode 4.2.1 Crashes on Lion 10.7.2 on Launch
提问by Clint Laskowski
This week I bought my first Mac in about 10 years (yeah!). It's a used Mac Pro (2x2GHz Dual-Core Xeon with 2GB RAM). It has a fresh install of Mac OS X Lion 10.7.2. I've only installed OmniOutlner Pro, Textmate, and Ruby RVM.
本周我买了我大约 10 年来的第一台 Mac(是的!)。这是一台二手 Mac Pro(2x2GHz Dual-Core Xeon with 2GB RAM)。它全新安装了 Mac OS X Lion 10.7.2。我只安装了 OmniOutlner Pro、Textmate 和 Ruby RVM。
I've also downloaded and installed Xcode 4.2.1 from the App Store. At first, Xcode worked fine (only launched to see if it worked). Then, the next day I launched Xcode to start using it and it crashed immediately upon launch. Since then, I've tried many things to try to correct the problem: rebooting, reinstalling, redownloading and reinstalling, deleting and reinstalling, deleting iTunes and reinstalling (an early Stack Overflow answer suggested this), and more. Nothing seems to help. Sometimes I can get as far as clicking on a menu item in XCode (while the crash message is being displayed), but that's it.
我还从 App Store 下载并安装了 Xcode 4.2.1。起初,Xcode 运行良好(仅启动以查看它是否有效)。然后,第二天我启动 Xcode 开始使用它,但它在启动时立即崩溃。从那时起,我尝试了很多方法来尝试纠正问题:重新启动、重新安装、重新下载和重新安装、删除和重新安装、删除 iTunes 并重新安装(早期 Stack Overflow 的回答建议了这一点)等等。似乎没有任何帮助。有时我可以点击 XCode 中的菜单项(在显示崩溃消息时),但仅此而已。
Everything else seems to work perfect on this machine, so I doubt it's the hardware. I do not have the OS X install DVD.
这台机器上的其他一切似乎都很完美,所以我怀疑是硬件问题。我没有 OS X 安装 DVD。
I bought this system so I can program in Xcode. What would you do if you were me?
我买了这个系统,所以我可以在 Xcode 中编程。如果你是我,你会怎么做?
UPDTE-1: Here are the first lines from the Problem Details and System Configuration report (in general it seems most of these I have looked at for this problem seem to be talking about the IDE Navigator Log):
UPDTE-1:以下是问题详细信息和系统配置报告中的第一行(一般来说,我针对此问题查看的大部分内容似乎都在谈论 IDE 导航器日志):
Process: Xcode [17619]
Path: /Developer/Applications/Xcode.app/Contents/MacOS/Xcode
Identifier: com.apple.dt.Xcode
Version: 4.2.1 (834)
Build Info: IDEApplication-834000000000000~2
Code Type: X86-64 (Native)
Parent Process: launchd [118]
Date/Time: 2011-12-01 14:33:14.664 -0600
OS Version: Mac OS X 10.7.2 (11C74)
Report Version: 9
Interval Since Last Report: 72258 sec
Crashes Since Last Report: 5
Per-App Interval Since Last Report: 719 sec
Per-App Crashes Since Last Report: 5
Anonymous UUID: 1D22E753-40F6-4035-B53A-236881ED2A58
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Application Specific Information:
ProductBuildVersion: 4D502
Encountered multiple assertions. First assertion was: ASSERTION FAILURE in /SourceCache/IDELogNavigator/IDELogNavigator-820/IDELogNavigator.m:582
Details: (self.rootNavigableItem) should not be nil.
Object: <IDELogNavigator: 0x4018f6420>
Method: -revertStateWithDictionary:
Thread: <NSThread: 0x40010a260>{name = (null), num = 1}
Hints:
0: Replacement view is installing: <IDELogNavigator: 0x4018f6420 representing: <DVTExtension 0x400d33120: Log Navigator (Xcode.IDEKit.Navigator.Logs) v0.1>>
Backtrace:
0 0x00000001055c4366 -[IDEAssertionHandler handleFailureInMethod:object:fileName:lineNumber:messageFormat:arguments:] (in IDEKit)
1 0x0000000104c3d1a4 _DVTAssertionFailureHandler (in DVTFoundation)
2 0x000000010ad43cb1 -[IDELogNavigator revertStateWithDictionary:] (in IDELogNavigator)
3 0x0000000104bffe5b -[DVTStateToken _pullStateFromDictionary:] (in DVTFoundation)
4 0x0000000104bffc12 -[DVTStateToken pullStateFromRepository] (in DVTFoundation)
5 0x000000010550f33d -[IDENavigatorArea replacementView:didInstallViewController:] (in IDEKit)
6 0x0000000104df75f1 __42-[DVTReplacementView _setupViewController]_block_invoke_0 (in DVTKit)
7 0x0000000104c00f4e DVTInvokeWithFailureHint (in DVTFoundation)
8 0x0000000104df7473 -[DVTReplacementView _setupViewController] (in DVTKit)
9 0x0000000104df7345 -[DVTReplacementView installedViewController] (in DVTKit)
UPDATE-2:Bummer. I tried the approach referenced by Michael Dautermann below, but it didn't work. Here's what I typed in Terminal:
UPDATE-2:无赖。我尝试了下面 Michael Dautermann 引用的方法,但没有奏效。这是我在终端中输入的内容:
sudo tmutil disablelocal
sudo /Developer/Library/uninstall-devtools --mode=all
sudo /Developer-old/Library/uninstall-devtools --mode=all
sudo /Developer-old-1/Library/uninstall-devtools --mode=all
sudo tmutil enablelocal
At this point, the /Developer, /Developer-old, and /Developer-old-1 folders were deleted. I then emptied the trash and reinstalled XCode. Everything seemed to be going fine, but when I launched XCode, it immediately crashed again :-(
此时,/Developer、/Developer-old 和/Developer-old-1 文件夹被删除。然后我清空了垃圾箱并重新安装了 XCode。一切似乎都很顺利,但是当我启动 XCode 时,它立即再次崩溃:-(
However, three additional bits of information:
但是,还有三个额外的信息:
The Problem Details in the Problem Report when XCode crashes appears to be basically the same as the Problem Details reported above.
The version of XCode that gets installed is XCode 4.2.1 Build 4D502, if that matters.
I've now noticed that if I hit "Continue" in the Internal Error crash dialog, about 15 times, XCode becomes usable to the point of exploring the menus, etc., and only seems to bring up the Internal Error crash dialog again if I try to quit.
XCode 崩溃时问题报告中的问题详细信息似乎与上面报告的问题详细信息基本相同。
如果重要的话,安装的 XCode 版本是 XCode 4.2.1 Build 4D502。
我现在注意到,如果我在“内部错误”崩溃对话框中点击“继续”,大约 15 次,XCode 就可以用于浏览菜单等,并且如果出现以下情况,似乎只会再次显示“内部错误”崩溃对话框我试着戒烟。
If anyone has any other ideas, I'm open to trying them. I'm starting to wonder if I have a hardware problem somewhere or if I should downgrade to Snow Leopard and XCode 3.
如果有人有任何其他想法,我愿意尝试。我开始怀疑我是否在某个地方有硬件问题,或者我是否应该降级到 Snow Leopard 和 XCode 3。
回答by Dwayne
- Download the iPhone Configuration Utility... http://support.apple.com/kb/DL1465
- Install, start, quit the utility.
- Xcode should now start correctly.
- 下载 iPhone 配置实用程序... http://support.apple.com/kb/DL1465
- 安装、启动、退出实用程序。
- Xcode 现在应该可以正确启动了。
回答by JimK
My Xcode installation crashed on startup as described above. I downloaded and installed the iPhone Configuration Utility (ver3.4) and ran the utility. Xcode has launched and worked ever since running the iPhone Configuration Utility.
如上所述,我的 Xcode 安装在启动时崩溃。我下载并安装了 iPhone 配置实用程序 (ver3.4) 并运行了该实用程序。自从运行 iPhone 配置实用程序以来,Xcode 就已经启动并运行了。
回答by cjibo
The uninstall process does not cover the user Profile of your account. After uninstalling you should also remove ~/Library/Developer/Xcode. The easiest way to test this is to create a new user account and see if Xcode will open.
卸载过程不包括您帐户的用户配置文件。卸载后,您还应该删除 ~/Library/Developer/Xcode。测试这个最简单的方法是创建一个新的用户帐户,看看 Xcode 是否会打开。
回答by MicahA
Try to once again uninstall XCode as described in Update-2; then download and install the iPhone Configuration Utility (ver 3.3 at the time of this post) (http://support.apple.com/kb/dl851). Run iPhone Configuration Utility (found in the Applications/Utilities folder). I did not have to do anything with new configurations/devices/etc - only start the application. Then launch XCode; mine then started working correctly.
尝试再次卸载 XCode,如 Update-2 中所述;然后下载并安装 iPhone 配置实用程序(本文发布时为 3.3 版)(http://support.apple.com/kb/dl851)。运行 iPhone 配置实用程序(在 Applications/Utilities 文件夹中找到)。我不必对新配置/设备/等做任何事情 - 只需启动应用程序。然后启动XCode;我的然后开始正常工作。
回答by Michael Dautermann
I did a Google search and found there are a number of reportsof people having crashes exactly like you described it.
我做了谷歌搜索,发现也有一些报告的有崩溃的人完全像你描述它。
Here's a potential fix as described by Andreas Schuderer on this Apple discussion thread:
这是 Andreas Schuderer在此 Apple 讨论主题上描述的潜在修复:
I had the same problem and typed in Terminal:
sudo tmutil disablelocal
sudo /Developer/Library/uninstall-devtools --mode=all
sudo /Developer-3.2.2/Library/uninstall-devtools --mode=all
sudo tmutil enablelocal
Then I deleted the folders "Developer" and "Developer-3.2.2".
Then I reinstalled xcode using the installer on the launchpad. Now it works.
P.S.: The first and last line disable and re-enable local snapshots (a feature of time machine). I had the problem that the mtmd proces claimed a whole core and caused my macbook pro to heat up enourmously. The tmutil commands fixed this. The third line was necessary because xcode installer had made a backup of my previous xcode version. Leave this line out if not applicable.
我遇到了同样的问题并在终端中输入:
sudo tmutil disablelocal
sudo /Developer/Library/uninstall-devtools --mode=all
sudo /Developer-3.2.2/Library/uninstall-devtools --mode=all
sudo tmutil enablelocal
然后我删除了文件夹“Developer”和“Developer-3.2.2”。
然后我使用启动板上的安装程序重新安装了 xcode。现在它起作用了。
PS:第一行和最后一行禁用和重新启用本地快照(时间机器的一个功能)。我遇到的问题是 mtmd 进程占用了整个核心并导致我的 macbook pro 过热。tmutil 命令修复了这个问题。第三行是必要的,因为 xcode 安装程序已经备份了我以前的 xcode 版本。如果不适用,请保留此行。
回答by Alena
Here is how I fixed mine:
这是我修复我的方法:
Go -> Home -> Autosave Information -> all xcode related files send to trash
Finder -> empty trash
Apple -> restart
去 -> 主页 -> 自动保存信息 -> 所有与 xcode 相关的文件都发送到垃圾箱
Finder -> 清空垃圾箱
苹果 -> 重启
回答by James Skidmore
None of the above worked for me. XCode crashed on the Summary page for projects.
以上都不适合我。XCode 在项目的“摘要”页面上崩溃。
The problem stemmed from an entry in my Info.plist file. I had three particular entries: Icon
, Icon files
, and Icon files (iOS 5)
. I removed the last one, since it was empty, and that solved the problem.
问题源于我的 Info.plist 文件中的一个条目。我有三个具体的条目:Icon
,Icon files
,和Icon files (iOS 5)
。我删除了最后一个,因为它是空的,这解决了问题。