Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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
like image 739
Het Kansara Avatar asked Nov 17 '20 02:11

Het Kansara


People also ask

How to fix Xcode crashing on Mac OS?

Go to this path on both the Xcode's you have, beta and 10.3: /Xcode.app/Contents/Developer/usr/lib and copy the file from the Xcode that is working to the one that is crashing. Hello, same issue here after installing Mac OS BIG sure. You can fix this by replacing the 'libMainThreadChecker.dylib' file with the one in the working Xcode.

Why is my code not working on Xcode?

If you run your app and you get some build errors, that means Xcode has detected that the syntax of your code is wrong. If Xcode is complaining that a specific identifier doesn’t exist, then check that all of your opening curly braces have corresponding closing curly braces.

How do I fix the thread checker error in Xcode?

You can fix this by replacing the 'libMainThreadChecker.dylib' file with the one in the working Xcode. Go to this path on both the Xcode's you have, beta and 10.3: /Xcode.app/Contents/Developer/usr/lib and copy the file from the Xcode that is working to the one that is crashing.

What's new in Xcode 11?

Xcode 11 supports the new Apple Development and Apple Distribution certificate types. These certificates support building, running, and distributing apps on any Apple platform. Preexisting iOS and macOS development and distribution certificates continue to work, however, new certificates you create in Xcode 11 use the new types.


3 Answers

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

like image 200
Zest Avatar answered Oct 22 '22 21:10

Zest


Faced the same issue after updating to Big Sur. Found a temporary workaround:

  1. Go to Xcode10.app/Contents/Developer/usr/lib
  2. 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.

like image 27
Yulian Baranetskyy Avatar answered Oct 22 '22 21:10

Yulian Baranetskyy


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.

like image 20
Hardik Bar Avatar answered Oct 22 '22 22:10

Hardik Bar