Xcode 11.6 crashes after Source Control commit with more than one Editor open

0



My development was essentially stopped because of this Xcode problem. Whenever I did a Source Control commit, the next time that I opened the project what opens in the Project Navigator is not the whole project but just one line: the name of the project. I could get around this by going to Source Tree and unchecking the UserState.xstate file. Then the project opened ok, but if I Build, Xcode immediately crashed with the same crash every time. Sometimes I could get past this by closing the project, deleting the DerivedData file, quitting and restarting Xcode. I noticed that this causes Xcode to re-index. I submitted a bug report to Apple but have not heard anything. I have tried going into the xcode.project package and deleting the file, but that doesn't work either. I even tried rebooting the Mac but that did not solve the problem either. 

However, it looks like I solved the problem by doing Xcode>Editor>Show Editor Only. What led me to this was the crashlog, which shows a crash in the IDEEditor:

Process:               Xcode [4453]

Path:                  /Applications/Xcode.app/Contents/MacOS/Xcode

Identifier:            com.apple.dt.Xcode

Version:               11.6 (16141)

Build Info:            IDEFrameworks-16141000000000000~2 (11E708)

App Item ID:           497799835

App External ID:       836655024

Code Type:             X86-64 (Native)

Parent Process:        ??? [1]

Responsible:           Xcode [4453]

User ID:               503



Date/Time:             2020-07-22 13:40:00.643 -0500

OS Version:            Mac OS X 10.15.4 (19E287)

Report Version:        12

Anonymous UUID:        79A51667-E346-704F-A7E9-60A204A762E4





Time Awake Since Boot: 4300 seconds



System Integrity Protection: enabled



Crashed Thread:        0  Dispatch queue: com.apple.main-thread



Exception Type:        EXCCRASH (SIGABRT)

Exception Codes:       0x0000000000000000, 0x0000000000000000

Exception Note:        EXC
CORPSENOTIFY



Application Specific Information:

ProductBuildVersion: 11E708

ASSERTION FAILURE in /Library/Caches/com.apple.xbs/Sources/IDEFrameworks/IDEFrameworks-16141/IDEKit/Behaviors/Alerts/ShowEditorAlert/IDEShowEditorAlert.m:143

Details:  Assertion failed: [editorArea
canAddEditorAreaSplitAfterEditorAreaSplit:lastActiveEditorAreaSplit layout:IDEEditorMultipleSplitRelativeLayoutDefault]

Object:   <IDEShowEditorAlert>

Method:   +
createEditorAreaSplitForEditorArea:lastActiveEditorAreaSplit:

Thread:   <NSThread: 0x7fb634c0df60>{number = 1, name = main}

Open FDs: 53/9472

Hints: 
```