Xcode not working - how do I fix it? - xcode

I am getting this error:
Xcode was unexpectedly truncated.
Error detail:
Process: Xcode [638]
Path: /Applications/Xcode.app/Contents/MacOS/Xcode
Identifier: com.apple.dt.Xcode
Version: 9.0.1 (13249)
Build Info: IDEFrameworks-13249000000000000~2
App Item ID: 497799835
App External ID: 823984564
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Xcode [638]
User ID: 501
Date/Time: 2017-10-19 10:45:48.831 +0300
OS Version: Mac OS X 10.12.6 (16G29)
Report Version: 12
Anonymous UUID: FE2DA13F-B64C-DC82-FF55-0BE0D61794A9
Time Awake Since Boot: 940 seconds
System Integrity Protection: enabled
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY

To uninstall xcode just drag the xcode icon to the trash. Then you can reinstall it from the developers platform or through the regular download in the appstore.

i ran the package
/Applications/Xcode.app/Contents/Resources/Packages/XcodeSystemResources.pkg.
And the Xcode 9 started to work.

Related

XCode 10.2.1 crashes while trying to open (xcode quits unexpectedly while using the libMainThreadChecker.dylib plug-in)

When I try to open Xcode, it crashes unexpectedly and asks me to reopen. But reopening also gives me the same error. I have XCode 10.2.1 as well as XCode 11.7 installed.
Problem details and system configuration:
Process: Xcode [1607]
Path: /Applications/Xcode1.app/Contents/MacOS/Xcode
Identifier: com.apple.dt.Xcode
Version: 10.2.1 (14490.122)
Build Info: IDEFrameworks-14490122000000000~6 (10E1001)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Xcode [1607]
User ID: 501
PlugIn Path: /Applications/Xcode1.app/Contents/Developer/usr/lib/libMainThreadChecker.dylib
PlugIn Identifier: libMainThreadChecker.dylib
PlugIn Version: ??? (64490.34)
Date/Time: 2020-11-16 21:23:39.623 -0500
OS Version: macOS 11.0.1 (20B29)
Report Version: 12
Bridge OS Version: 5.0.1 (18P2561)
Anonymous UUID: 14ACF447-0D96-DDDB-DD2C-2FE0B3DB664D
Time Awake Since Boot: 4800 seconds
System Integrity Protection: enabled
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x00007fff237919b9
Exception Note: EXC_CORPSE_NOTIFY
Termination Signal: Bus error: 10
Termination Reason: Namespace SIGNAL, Code 0xa
Terminating Process: exc handler [1607]
VM Regions Near 0x7fff237919b9:
__TEXT 7fff22bf8000-7fff23600000 [ 10.0M] r-x/r-x SM=COW /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
--> __TEXT 7fff23600000-7fff23800000 [ 2048K] r-x/rwx SM=COW /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
Submap 7fff23800000-7fff40000000 [456.0M] r--/rwx SM=PRV process-only VM submap
Application-Specific Information:
/Applications/Xcode1.app/Contents/Developer/usr/lib/libMainThreadChecker.dylib
ProductBuildVersion: 10E1001
Faced the same issue on Big Sur update. Git stopped working as well. Fixed it by running following command in terminal.
defaults write com.apple.dt.Xcode DVTDisableMainThreadChecker 1
Original Answer Reference: https://developer.apple.com/forums/thread/651985?answerId=637934022#637934022
Faced the same issue after updating to Big Sur.
Found a temporary workaround:
Go to Xcode10.app/Contents/Developer/usr/lib
Rename the file libMainThreadChecker.dylib into anything else (I named it _libMainThreadChecker.dylib)
NOTE: If your project has "Main thread checker enabled" it may crash somewhere, so it's better to disable it.
This is a known issues
Currently there is one workaround for this.
You've to run the following command in the Terminal app to avoid crashes when starting Xcode:
defaults write com.apple.dt.Xcode DVTDisableMainThreadChecker 1
Now deactivate "Main Thread Checker" in your Xcode project: Edit
Scheme -> Run/Test -> Diagnostics -> Uncheck Main Thread Checker.

XCode 8.2 Crash on stop debug

I use XCode 8.2.1 to debug my app. Every time when click the stop debug button, The XCode will crash. This is the following crash info:
Process: Xcode [1478]
Path: /Applications/Xcode.app/Contents/MacOS/Xcode
Identifier: com.apple.dt.Xcode
Version: 8.2.1 (11766.1)
Build Info: IDEFrameworks-11766001000000000~5
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Xcode [1478]
User ID: 501
Date/Time: 2017-01-06 16:24:45.369 +0800
OS Version: Mac OS X 10.11.6 (15G1212)
Report Version: 11
Anonymous UUID: A7D6D50D-A3D3-32EF-A3FC-160E5195E461
Time Awake Since Boot: 3000 seconds
System Integrity Protection: enabled
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Does anyone has the same issue?
There was a race condition bug in lldb that was fixed very recently - should show up in the next official tools release - that could cause debugger shutdown crashes. Without seeing the crashed thread though, it's hard to tell whether it was likely one of these crashes.

Xcode will no longer open project

Xcode won't open a project workspace. It immediately quits and throws this error report. Everything was fine on my last commit. I'm not sure how go about finding the issue. It says Assertion failed: _numberOfTabsForLayout > 1 I don't have any type of tab bar in this project but I did close the project with multiple tabs open in the workspace.
Process: Xcode [8382]
Path: /Applications/Xcode.app/Contents/MacOS/Xcode
Identifier: com.apple.dt.Xcode
Version: 6.4 (7720)
Build Info: IDEFrameworks-7720000000000000~8
App Item ID: 497799835
App External ID: 812725084
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Xcode [8382]
User ID: 501
Date/Time: 2015-10-18 20:06:46.433 -0400
OS Version: Mac OS X 10.11 (15A284)
Report Version: 11
Anonymous UUID: 2C67D893-30CC-08A5-E12A-E03DD1BAEFBD
Sleep/Wake UUID: 844DC3EB-F2C2-496A-BEEB-C72AE1AFE3F9
Time Awake Since Boot: 48000 seconds
Time Since Wake: 5800 seconds
System Integrity Protection: enabled
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Application Specific Information:
ProductBuildVersion: 6E35b
ASSERTION FAILURE in /SourceCache/DVTFrameworks/DVTFrameworks-7714/DVTKit/Tabs/DVTScrollableTabBarView.m:1270
Details: Assertion failed: _numberOfTabsForLayout > 1
Object: <DVTScrollableTabBarView: 0x7fd3dfa81230>
Method: -_calculateStackingRegions
Thread: <NSThread: 0x7fd3da5207f0>{number = 1, name = main}
Hints: None
Backtrace:
0 0x0000000103b8cfda -[IDEAssertionHandler handleFailureInMethod:object:fileName:lineNumber:assertionSignature:messageFormat:arguments:] (in IDEKit)
Update: I figured out how to get it to open but not how to resolve the problem. If I disconnect my second monitor it will open and work just fine. I can reconnect the monitor once it's open and everything is fine. But each time I need to reopen the project I have to pull the HDMI cable out.

Xcode quit unexpectedly when opening my project

I tried to delete the 2 files in the projects package content and if I do that my project works but when I click on any file it quits again
log:
Process: Xcode [515]
Path: /Applications/Xcode.app/Contents/MacOS/Xcode
Identifier: com.apple.dt.Xcode
Version: 6.4 (7720)
Build Info: IDEFrameworks-7720000000000000~8
App Item ID: 497799835
App External ID: 812725084
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Xcode [515]
User ID: 501
Date/Time: 2015-08-04 12:34:07.199 +0300
OS Version: Mac OS X 10.10.4 (14E46)
Report Version: 11
Anonymous UUID: 93354AAB-2902-3F8B-27E6-05F9AFC1C64D
Time Awake Since Boot: 580 seconds
Crashed Thread: 14 Dispatch queue: IBPlatformToolRequestQueue.IBCocoaTouchFramework-EightAndLater
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Whenever this has happened to me, i keep Xcode closed and delete DerivedData folder. This is located at /Users/username/Library/Developer/Xcode/DerivedData
Deleting Derived data and clearing cache helps
you can clear derived data by pressing CMD+, in xcode and select locations then click the little gray arrow beneath Derived data and select the derived data folder and just select and trash
You can clear cache by pressing CMD+k

xcode crashes when I try to open any project

xcode crashes when I am trying to open any project (.xcodeproj) file. The crash report saying
Xcode quit unexpectedly while using the libJP2.dylib plug-in
Here is the more details
Process: Xcode [733]
Path: /Applications/Xcode.app/Contents/MacOS/Xcode
Identifier: com.apple.dt.Xcode
Version: 6.0.1 (6528)
Build Info: IDEFrameworks-6528000000000000~2
App Item ID: 497799835
App External ID: 712682811
Code Type: X86-64 (Native)
Parent Process: launchd [161]
Responsible: Xcode [733]
User ID: 506
PlugIn Path:
/System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libJP2.dylib
PlugIn Identifier: libJP2.dylib
PlugIn Version: ??? (1044)
Date/Time: 2015-05-08 10:34:45.103 +0530
OS Version: Mac OS X 10.9.5 (13F34)
Report Version: 11
Anonymous UUID: 57F21D56-D9B6-5A40-6209-07ECF66DD709
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (Code Signature Invalid)
Exception Codes: 0x0000000000000032, 0x00007fff764f5018
would anybody please help me ?

Resources