Categories
Xcode

Xcode Crash – ASSERTION FAILURE

How to solve Xcode ASSERTION FAILURE Crash.

This is a fucking annoying Xcode crash which happens with any Xcode version. I’ve seen it on Xcode 11 to Xcode 11.3 (current version which I’m using).

Following is the snippet of crash log

Application Specific Information:
ProductBuildVersion: 11C29
ASSERTION FAILURE in /Library/Caches/com.apple.xbs/Sources/IDEFrameworks/IDEFrameworks-15712/IDEKit/Workspace/IDEWorkspaceDocument.m:3435
Details: selection failed. window: currentlySelectedTabbedWindow:
Object:
Method: -_restoreSelectedTabsByIdentifierFromStateSaving:
Thread: {number = 1, name = main}

The Solution

There is no official solution as such. Updating Xcode to latest version from Appstore or from Apple Developer Download page will not solve this issue, I’ve tried it all. Don’t waste your time in doing so.

Following are some of the methods which help me to launch Xcode again without causing crash.

Close Xcode before attempting following solution.

1. Delete DerivedData

Go to following directory and delete everything from this directory.

/Users/<username>/Library/Developer/Xcode/DerivedData/

Since this will be recurring problem, I suggest you add an alias in .bash_profile

 alias cleandd=’rm -rf /Users/<username>/Library/Developer/Xcode/DerivedData/*’

Replace <username> with your username on system.

2. Update pods

If you are using pods then update it and restart Xcode.

3. Delete xcuserdata

In your project right click on .xcworkspace file and select Show Package Contents then delete xcuserdata directory.

Repeat above for .xcodeproj.

Restart Xcode.

For me the most effective step is step 3.

One reply on “Xcode Crash – ASSERTION FAILURE”

I’ve been facing similar crash issue and I’ve tried many solutions but none worked. I tried your step 3 solution and it worked. Thanks for sharing. I was wondering if Apple will fix this issue eventually or not?

Leave a Reply

Your email address will not be published. Required fields are marked *