XCode 4.2.1 Crashes on Lion 10.7.2 on Launch

2020-07-18 03:00发布

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.

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.

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.

I bought this system so I can program in Xcode. What would you do if you were me?


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

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:

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

However, three additional bits of information:

  1. The Problem Details in the Problem Report when XCode crashes appears to be basically the same as the Problem Details reported above.

  2. The version of XCode that gets installed is XCode 4.2.1 Build 4D502, if that matters.

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

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.

7条回答
一纸荒年 Trace。
2楼-- · 2020-07-18 03:43

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.

查看更多
▲ chillily
3楼-- · 2020-07-18 03:44

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.

查看更多
时光不老,我们不散
4楼-- · 2020-07-18 03:47

I did a Google search and found there are a number of reports of people having crashes exactly like you described it.

Here's a potential fix as described by Andreas Schuderer on this Apple discussion thread:

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.

查看更多
我想做一个坏孩纸
5楼-- · 2020-07-18 03:47

None of the above worked for me. XCode crashed on the Summary page for projects.

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.

查看更多
Summer. ? 凉城
6楼-- · 2020-07-18 03:52
  1. Download the iPhone Configuration Utility... http://support.apple.com/kb/DL1465
  2. Install, start, quit the utility.
  3. Xcode should now start correctly.
查看更多
甜甜的少女心
7楼-- · 2020-07-18 03:52

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.

查看更多
登录 后发表回答