XCode 4.2.1 Crashes on Lion 10.7.2 on Launch - xcode

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

Download the iPhone Configuration Utility... http://support.apple.com/kb/DL1465
Install, start, quit the utility.
Xcode should now start correctly.

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.

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.

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.

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.

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.

Here is how I fixed mine:
Go -> Home -> Autosave Information -> all xcode related files send to trash
Finder -> empty trash
Apple -> restart

Related

NetBeans 8.2 won't re-install on Mac OSX Sierra 10.13 with JDK 1.8

I was running NetBeans 8.2. shut it down and moved the project I was working on. When I tried to start NetBeans again, it failed to start. After multiple attempts, I finally gave up, deleted it and tried to re-install the same version and now the installer won't even start. Any suggestions?
NetBeans 8.2 (javaee version, also tried the all version with the same results)
Mac OSX Sierra 10.13.2
JDK 1.8.0_152 (I know about the JDK 1.9 issues)
I won't include the entire dump, but the details of message to "send to Apple" include:
Application Specific Information:
HIToolbox: could not get FSRef for theme file at path '/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Resources/Extras2.rsrc' (errno=2, No such file or directory)
abort() called
However, that file does exist.
-rw-r--r-- 1 root wheel 5425538 Aug 30 23:23 /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Resources/Extras2.rsrc
I was working fine, moved the project directory I was working in, and things started failing. I did not install/uninstall/update or modify anything else in the mean time.
I was able to re-install after a reboot. No idea what the issue was, but it has been resolved. Apologies for posting before I tried the newbie fix-all solution.

Xcode 9 crash during uploading app to App Store

In my project the Xcode 9 crashes during uploading to App Store (or exporting to disk, it does not matter). I have found that it may be caused by cocoapods or some kind of external frameworks bug, because on my other projects which do not use cocoapods this bug does not happen. However why I created post about it here on stackoverflow is the question if anybody has a temporary solution to solve this issue?
Unfortunately it is not known when it will be fixed by Apple or cocapods...so...every help would be welcomed.
I have already reported this bug to Apple with the (shortened) log below.
Process: Xcode [7494]
Path: /Applications/Xcode.app/Contents/MacOS/Xcode
Identifier: com.apple.dt.Xcode
Version: 9.0 (13247)
Build Info: IDEFrameworks-13247000000000000~26
App Item ID: 497799835
App External ID: 823595305
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Xcode [7494]
User ID: 501
Date/Time: 2017-09-20 20:04:30.103 +0200
OS Version: Mac OS X 10.12.6 (16G29)
Report Version: 12
Anonymous UUID: 9D0C9FF5-77EB-F94F-67E5-634E39EAE67B
Sleep/Wake UUID: 30F3DB44-C016-4799-AD07-A080AA633DE8
Time Awake Since Boot: 14000 seconds
Time Since Wake: 1500 seconds
System Integrity Protection: enabled
Crashed Thread: 14 Dispatch queue: ConcurrentQueue: -[IDEDistributionPackagingStepViewController viewDidInstall]_block_invoke
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x000007fcb5ab5718
Exception Note: EXC_CORPSE_NOTIFY
Termination Signal: Segmentation fault: 11
Termination Reason: Namespace SIGNAL, Code 0xb
Terminating Process: exc handler [0]
This post was also posted on Apple Developer Forums.
After struggling with Xcode 9 for many days and having tried so many things icluding some mentioned here. I ended up
Download and install Xcode 8.3.3 ( Always keep the older version, lesson for life )
Archive the app with Xcode 9
Open Xcode 8.3.3, open Organizer and submit the app
This works. Good luck.
Update: Xcode 9.0.1 and Xcode 9.1 beta doesn't fix the issue.
I just solved the problem.
I have the same problem with Xcode Version 9.0.1 (9A1004).
First of all, check your problem is exactly same as mine.
To do this, open Terminal and put 'xattr' command and Enter.
If you can see kinda 'Permission denied' error message, fortunately you are just same as mine.
Now you can solve the problem by putting this one line command.
sudo chown -R $USER:$(id -g) /Library/Python/2.7/site-packages/protobuf-3.2.0-py2.7.egg/EGG-INFO/
so you can do 'Upload to Appstore' or 'Export IPA'.

Xcode Server setup failed

I'm trying to install Xcode Server, and getting the following error msg (after chooseing Xcode in the "choose Xcode" button) :
Xcode Server setup failed (starting api server) Try clicking Xcode and
selecting a newer versino of Xcode
Machine:
Mac Mini (mid 2011), OS X Yosemite, 2.3GHz Intel Core i5, 4GB 1333MHz DDR3
Server:
Version 5.0.4 (15S2259)
Xcode:
Version 7.0 (7A220)
I have tried installing and deleting all components involved several times, but with no success.xc
Any help would be appreciated.
[Update]
Bug was submitted to Apple bug report, it's status is now closed.
This one bit me during a server upgrade. Moving to El Capitan and Server 5.1.5.
Xcode refused to work telling me I needed to upgrade to the latest versions of Xcode and Server, which I was already using, error message as above.
The only way around it was to run
sudo xcrun xcscontrol --reset
this solved the problem.
HOWEVER!
Make sure you backup before you run it as it will get rid of everything associated with the Xcode server, including any repositories. Check in /Library/Developer/XcodeServer/ for anything you need to save.

Xcode 7 Beta WON'T INSTALL

I've been trying to install the Xcode 7 Beta 3 from Apple for hours and it just won't run on Yosemite 10.10.3. I download and run the installer, and everything works fine, but when I try to open Xcode beta I get a window that lasts for 30 minutes that says "Verifying" and then when it closes sometimes I get a window that says the Xcode beta was downloaded from the internet and it wants to know if I still want to open it. I click "Open" and nothing happens!!! According to task manager, Xcode beta is not responding. I've tried to reverify it 6 times, and even deleted and reinstalled xcode 7 beta from Apple. I'm going to put the El Capitan public beta on my external hard drive and see if xcode 7 will run on that. Though, is there anyway I can get Xcode 7 Beta 3 to run on Yosemite 10.10.3? I have a mid-2009 MacBook Pro, 2.66GHz Intel Core 2 Duo, 4 GB RAM, 256GB SSD.
Ran into the same issue with Xcode 7 beta 4. According to this blog post you just need to quarantine it to disable the Gate Keeper check.
cd /Applications
xattr -d com.apple.quarantine Xcode-beta.app
open Xcode-beta.app
assuming your install folder is /Applications
Update:
This command may not fix everything that needs to disable Gate Keeper. For maximum efficiency, use the recursive flag to make sure to get everything (including simulators) packaged in the app.
sudo xattr -dr com.apple.quarantine Xcode-beta.app
Note: you need sudo since some of the files are protected.
For whatever reason when I added the the xcode beta to my external drive, I opened the one in my external hard drive and now it works just fine. Maybe there's a bug that makes sure that there can't be two versions of Xcode on the same drive?
I have both XCode 6.4 ans XCode 7 installed on the internal drive of my macbook OSX 10.10.3 and it works...

Xcode 6.4 on OSX 10.11 (El Capitan) beta 2 / beta 3

I am trying to run Xcode 6.4 on El Capitan and I can run with the instructions on this post.
But I am looking for a way to run it without any external program as I ran before with OSX 10.10 (Yosemite).
I found this post that point to this instructions but it does not work. These are the instructions
Open this file /System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/Exception.plist
Find lines with name xcode in them (http://i.imgur.com/tcKWLhz.png)
Edit value HardDisabled from YES to NO
Save and reboot
1.a) If you can't save because file says it's locked then enable
rootless mode (sudo nvram boot-args="kext-dev-mode=1 rootless 0" or
sudo nvram boot-args="kext-dev-mode=1 rootless=0") and reboot.
1.b) If you still have problem, copy Exceptions.plist to Desktop (or
wherever else) and edit it them.
1.c) Save it and them remove
Exceptions.plist in System (sudo rm -rf
/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/Exceptions.plist)
1.d) Copy file from Desktop (or wherever else) to
/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources and
reboot.
I couldn't edit the Exceptions.plist file with the instructions above, but after a lot of tries I found the way to edit it.
Here you can find the instructions to edit it.
After all of this, I still receiving the message
You can't open the application "XCode.app" because it is not supported
on this type of Mac
when I try to run Xcode 6.4 from Finder
SOLUTION 1
The only thing I didn't do was to reinstall XCode 6.4 after the changes. I reinstalled it and it works!
SOLUTION 2
Dave Wood provided another solution to avoid to reinstall XCode. This is is post and as he posted in his answer the script is here
Xcode 6.4 runs out-of-the-box on:
El Capitan Beta 4 (build 15A226f)
El Capitan Beta 5 (build 15A235d)
El Capitan Beta 7 (build 15A263e)
Xcode 6.4 fails to open on:
El Capitan Beta 6 (build 15A244d) - Workaround here
cd /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib
sudo mv dyld_sim dyld_sim.orig
There are two places in Exceptions.plist which list Xcode. The one you don't have listed is:
<key>com.apple.Xcode</key>
<array>
<dict>
<key>AppStoreIdentifier</key>
<string>497799835</string>
<key>AppStoreUpdateIsFree</key>
<true/>
<key>HardDisabled</key>
<false/>
<key>HighVersion</key>
<string>5085.0</string>
</dict>
</array>
It is necessary to re-install Xcode afterwards.
In addition to the original first answer if you dont want to reinstall xcode again because of slow internet connection you can just copy xcode to desktop delete the one in application folder (Assuming you did all the required steps above except reinstalling). And move back xcode to application folder(while copying to desktop itself if you did above step right you will notice the cut icon will dissapear after copying)
User lembacon here found the solution:
cd /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform
cd Developer/SDKs/iPhoneSimulator.sdk/usr/lib
sudo mv dyld_sim dyld_sim.orig
The reason is that the internal implementation of
_NSGetExecutablePath has been updated (where the Kernel is
involved), and the host dyld has also been updated to track this
change. The dyld_sim, however, has not yet been updated. So the
problem is that _NSGetExecutablePath will return a path that
contains a executable_path= part which causes that the
CFBundleGetMainBundle() always returns NULL. This workaround
simply forces the simulator to use the host dyld.
I confirm that this solution is working with Xcode 6.4.

Resources