Xcode is crashing on startup. Any workarounds?

Hi,

When I open an existing project (following https://developer.apple.com/tutorials/swiftui/creating-and-combining-views) in Xcode, it crashes immediately with this "(tabController) should not be nil." error:

Code Block
(tabController) should not be nil.
Process: Xcode [11567]
Path: /Applications/Xcode.app/Contents/MacOS/Xcode
Identifier: com.apple.dt.Xcode
Version: 12.3 (17715)
Build Info: IDEFrameworks-17715000000000000~8 (12C33)
App Item ID:
App External ID:
Code Type: ARM-64 (Native)
Parent Process: ??? [1]
Responsible: Xcode [11567]
User ID: 501
Date/Time: 2020-12-19 01:09:44.783 +1100
OS Version: macOS 11.1 (20C69)
Report Version: 12
Anonymous UUID:
Sleep/Wake UUID:
Time Awake Since Boot: 40000 seconds
Time Since Wake: 310 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: 12C33
ASSERTION FAILURE in /Library/Caches/com.apple.xbs/Sources/IDEFrameworks/IDEFrameworks-17715/IDEKit/Workspace/IDEWorkspaceDocument.m:3270
Details: (tabController) should not be nil.
Object: <IDEWorkspaceDocument: 0x11d5fdb20>
Method: -commitStateToDictionary:
Thread: <NSThread: 0x140628ff0>{number = 1, name = main}
Open FDs: 38/7168
Hints:
Backtrace:
0 -[IDEAssertionHandler handleFailureInMethod:object:fileName:lineNumber:assertionSignature:messageFormat:arguments:] (in IDEKit)
1 _DVTAssertionHandler (in DVTFoundation)
2 _DVTAssertionFailureHandler (in DVTFoundation)
3 -[IDEWorkspaceDocument showWindows] (in IDEKit)
4 -[DVTStateToken _copyStatefulObjectState] (in DVTFoundation)
5 -[DVTStateToken pushStateToRepositoryAndReturnError:] (in DVTFoundation)
6 -[DVTStateRepository _updateStateIfNeeded] (in DVTFoundation)
7 -[DVTStateRepository collectStateFromRegisteredObjects] (in DVTFoundation)
8 -[IDEWorkspaceDocument writeStateData] (in IDEKit)
9 28-[IDEWorkspaceDocument init]_block_invoke (in IDEKit)
10 -[DVTDelayedInvocation runBlock:] (in DVTFoundation)
11 NSFireDelayedPerform (in Foundation)
12 CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION (in CoreFoundation)
13 CFRunLoopDoTimer (in CoreFoundation)
14 CFRunLoopDoTimers (in CoreFoundation)
15 __CFRunLoopRun (in CoreFoundation)
16 CFRunLoopRunSpecific (in CoreFoundation)
17 RunCurrentEventLoopInMode (in HIToolbox)
18 ReceiveNextEventCommon (in HIToolbox)
19 _BlockUntilNextEventMatchingListInModeWithFilter (in HIToolbox)
20 _DPSNextEvent (in AppKit)
21 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] (in AppKit)
22 -[DVTApplication nextEventMatchingMask:untilDate:inMode:dequeue:] (in DVTKit)
23 -[NSApplication run] (in AppKit)
24 NSApplicationMain (in AppKit)
25 start (in libdyld.dylib)
abort() called
Application Specific Signatures:
((tabController)) != nil


Are there any workarounds?

I'm getting the same error in one of my projects. A workaround for me is to open a different project, and then File -> Open Recent, so I'm not dead in the water, but this is disconcerting, to say the least.

UPDATE: Fixed mine - upon further inspection, there was a warning for me to upgrade my Xcode configuration. Things look better now!
It seems you have updated XCode recently.

When does the crash occurs ? On opening the project ? At run time ?

If you can open the project, open the Issue Navigator.
You will probably see a warning to update to new settings.
Do it.
It happens on startup, before the project is opened so I can't use the Issue Navigator.
@Mcorey can you let me know what steps you performed to update Xcode configuration?
Got the same problem.

Code Block Process: Xcode [667]
Path: /Applications/Xcode.app/Contents/MacOS/Xcode
Identifier: Xcode
Version: 12.3 (17715)
Build Info: IDEFrameworks-17715000000000000~8 (12C33)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Xcode [667]
User ID: 501
Date/Time: 2020-12-22 19:20:55.163 +0800
OS Version: Mac OS X 10.15.7 (19H114)
Report Version: 12
Anonymous UUID: 51CFAD95-2744-E6C9-F640-20B13531F49F
Time Awake Since Boot: 80 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: 12C33
ASSERTION FAILURE in /Library/Caches/com.apple.xbs/Sources/IDEFrameworks/IDEFrameworks-17715/IDEKit/Workspace/IDEWorkspaceDocument.m:3270
Details: (tabController) should not be nil.
Object: <IDEWorkspaceDocument: 0x7ffcd2158910>
Method: -commitStateToDictionary:
Thread: <NSThread: 0x7ffcce905a00>{number = 1, name = main}
Open FDs: 42/9472
Hints:
Backtrace:
0 -[IDEAssertionHandler handleFailureInMethod:object:fileName:lineNumber:assertionSignature:messageFormat:arguments:] (in IDEKit)
1 _DVTAssertionHandler (in DVTFoundation)
2 _DVTAssertionFailureHandler (in DVTFoundation)
3 -[IDEWorkspaceDocument commitStateToDictionary:] (in IDEKit)
4 -[DVTStateToken _copyStatefulObjectState] (in DVTFoundation)
5 -[DVTStateToken pushStateToRepositoryAndReturnError:] (in DVTFoundation)
6 -[DVTStateRepository _updateStateIfNeeded] (in DVTFoundation)
7 -[DVTStateRepository collectStateFromRegisteredObjects] (in DVTFoundation)
8 -[IDEWorkspaceDocument writeStateData] (in IDEKit)
9 28-[IDEWorkspaceDocument init]_block_invoke (in IDEKit)
10 -[DVTDelayedInvocation runBlock:] (in DVTFoundation)
11 NSFireDelayedPerform (in Foundation)
12 CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION (in CoreFoundation)
13 CFRunLoopDoTimer (in CoreFoundation)
14 CFRunLoopDoTimers (in CoreFoundation)
15 CFRunLoopRun (in CoreFoundation)
16 CFRunLoopRunSpecific (in CoreFoundation)
17 RunCurrentEventLoopInMode (in HIToolbox)
18 ReceiveNextEventCommon (in HIToolbox)
19 _BlockUntilNextEventMatchingListInModeWithFilter (in HIToolbox)
20 _DPSNextEvent (in AppKit)
21 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] (in AppKit)
22 -[DVTApplication nextEventMatchingMask:untilDate:inMode:dequeue:] (in DVTKit)
23 -[NSApplication run] (in AppKit)
24 NSApplicationMain (in AppKit)
25 start (in libdyld.dylib)
abort() called
Application Specific Signatures:
((tabController)) != nil
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x00007fff7355b33a pthread_kill + 10
1 libsystem_pthread.dylib 0x00007fff73617e60 pthread_kill + 430
2 libsystem_c.dylib 0x00007fff734e2808 abort + 120
3 com.apple.dt.IDEKit 0x000000010ba3f9e2 +[IDEAssertionHandler _handleAssertionWithLogString:assertionSignature:assertionReason:extraBacktrace:] + 1275
4 com.apple.dt.IDEKit 0x000000010ba3fee8 -[IDEAssertionHandler handleFailureInMethod:object:fileName:lineNumber:assertionSignature:messageFormat:arguments:] + 1068
5 com.apple.dt.DVTFoundation 0x00000001090d428b _DVTAssertionHandler + 476
6 com.apple.dt.DVTFoundation 0x00000001090d448e _DVTAssertionFailureHandler + 306
7 com.apple.dt.IDEKit 0x000000010b95aeca -[IDEWorkspaceDocument commitStateToDictionary:] + 2146
8 com.apple.dt.DVTFoundation 0x0000000108f728a1 -[DVTStateToken _copyStatefulObjectState] + 143
9 com.apple.dt.DVTFoundation 0x0000000108f72aba -[DVTStateToken pushStateToRepositoryAndReturnError:] + 77
10 com.apple.dt.DVTFoundation 0x000000010900e2d7 -[DVTStateRepository _updateStateIfNeeded] + 352
11 com.apple.dt.DVTFoundation 0x000000010900f2a6 -[DVTStateRepository collectStateFromRegisteredObjects] + 79
12 com.apple.dt.IDEKit 0x000000010b95864a -[IDEWorkspaceDocument writeStateData] + 511
13 com.apple.dt.IDEKit 0x000000010b944939 28-[IDEWorkspaceDocument init]_block_invoke + 180
14 com.apple.dt.DVTFoundation 0x0000000108e96e05 -[DVTDelayedInvocation runBlock:] + 860
15 com.apple.Foundation 0x00007fff3ba386f2 NSFireDelayedPerform + 415
16 com.apple.CoreFoundation 0x00007fff3937e7f9 CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION + 20
17 com.apple.CoreFoundation 0x00007fff3937e35f CFRunLoopDoTimer + 859
18 com.apple.CoreFoundation 0x00007fff3937de47 CFRunLoopDoTimers + 322
19 com.apple.CoreFoundation 0x00007fff39362bea __CFRunLoopRun + 1871
20 com.apple.CoreFoundation 0x00007fff39361e3e CFRunLoopRunSpecific + 462
21 com.apple.HIToolbox 0x00007fff37f8eabd RunCurrentEventLoopInMode + 292
22 com.apple.HIToolbox 0x00007fff37f8e7d5 ReceiveNextEventCommon + 584
23 com.apple.HIToolbox 0x00007fff37f8e579 _BlockUntilNextEventMatchingListInModeWithFilter + 64
24 com.apple.AppKit 0x00007fff365d4039 _DPSNextEvent + 883
25 com.apple.AppKit 0x00007fff365d2880 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1352
26 com.apple.dt.DVTKit 0x000000010979cd07 -[DVTApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 421
27 com.apple.AppKit 0x00007fff365c458e -[NSApplication run] + 658
28 com.apple.AppKit 0x00007fff36596396 NSApplicationMain + 777
29 libdyld.dylib 0x00007fff73413cc9 start + 1


Same here. I use M1 Mac Mini and Xcode was running fine a week ago. Now it's dead. I can't open any project. It quits immediately with (tabController) should not be nil.. I reported this to Apple.
This is ridiculous.
Now I'm reinstalling it, maybe this will help.

It didn't.

Code Block
Process: Xcode [11611]
Path: /Applications/Xcode.app/Contents/MacOS/Xcode
Identifier: com.apple.dt.Xcode
Version: 12.3 (17715)
Build Info: IDEFrameworks-17715000000000000~8 (12C33)
...
Code Type: ARM-64 (Native)
Parent Process: ??? [1]
Responsible: Xcode [11611]
Date/Time: 2020-12-30 13:04:12.813 +0100
OS Version: macOS 11.1 (20C69)
Report Version: 12
Anonymous UUID: ...
Time Awake Since Boot: 20000 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: 12C33
ASSERTION FAILURE in /Library/Caches/com.apple.xbs/Sources/IDEFrameworks/IDEFrameworks-17715/IDEKit/Workspace/IDEWorkspaceDocument.m:3270
Details: (tabController) should not be nil.
Object: <IDEWorkspaceDocument: 0x117aca270>
Method: -commitStateToDictionary:
Thread: <NSThread: 0x14c628fe0>{number = 1, name = main}
Open FDs: 34/7168

I downloaded the project and opened both in Xcode 12.2 and Xcode 12.3 without problem.

MacOS Catalina 10.15.7. That's the only difference I see with @SunsetBoulevard (11.1)
I'm getting the same error in one of my projects.
A workaround for me is to:
  1. Open a different project

  2. File -> Open Recent

  3. Clean build folder

  4. Close Xcode

  5. Delete DerivedData content for the project

  6. Open the project as usual

  7. Clean build folder once again

  8. Go!




I managed to get Xcode working, finally. What I did was:
  • Reinstalled Xcode and restarted mac.

  • Opened some other xcode-related file (a sample from the Internet)

  • It crashed.

  • I clicked "Reopen" and before it crashed again I went to File > Open Recent > Clear menu.

  • For whatever reason, it didn't crash so I was able to select my project and now it works fine...

Atom editor, full of plugins, a few years ago on old Ubuntu was more stable than this.
For me only the following helped: Deleting all xcuserdata folders inside the project and workspace bundles.
Same problem with nil TabController even after trashing and reinstalling Xcode from App Store - Version: 12.3 (17715). but crashing without opening anything, Solution was to open a random single file(it was a swift file but probably not significant) It crashed, Reopened it and, while Xcode was loading, I was able to get to File/Open Recent/Clear Menu... and cleared it and was then ok. I assume there was some corruption in the default previous project that it was opening (but I couldn't figure out which that might be . Couldn't find any xcodeproject or similar file mentioned in the crash or system logs
A previous attempt to Quit Xcode failed presenting a Cloning GitHub project dialog that was hung and wouldn't cancel so had had to Force Quit it, presumably corrupting some file.
Seems like Xcode should recognize repeated failures to launch without user interaction and offer to ignore opening the default/previous project
Same issues!
This works for me.
Open a file by Terminal firstly, like this open file.swift -a Xcode
And open the project by Terminal as well.
Yep. Clearly this is a major issue. I did find an apparent workaround: Open up the xcodeproj as a directory and delete xcworkspace. That appears to fix it.

Bug filed with Apple. Report this, folks: feedbackassistant.apple.com
I hit this problem on my 1-year-old Mac Mini which is running macOS Catalina version 10.15.7 (19H524). It happened after a system-crash, but probably more importantly after that system crash I upgraded Xcode to Version 12.4 (12D4e) via the Mac App store. The crash happened on my main userid (local to this Mac), but not on a different userid on this same Mac where I rarely run Xcode.

I tried several of the suggestions here. I emptied the "Open Recent" menu (and it was indeed empty the next time I ran Xcode), but Xcode still crashed. I tried using the open command to edit a source file in Xcode (this is something I do very often), and Xcode still crashed. I opened a few different source files this way, although none of them were for Swift source.

I also used the defaults command at the unix command line to delete many of the defaults which were set in domain com.apple.dt.Xcode. I didn't delete all of them because I didn't want to have to reset my configuration for Xcode. Removing those defaults-values did not stop the crashes.

I then downloaded the developer-example files of 'Swift Standard Library.playground' and 'Crustacean.playground'. I double-clicked on the SwiftStandardLibrary file, which caused Xcode to launch. That example playground did some of it's own initialization stuff, and once it was done Xcode was still running. I closed the playground, went to edit the files I normally edit with Xcode, and everything seems to be working fine. I have not had any crashes since then.

I am not 100% sure, but I'm pretty sure that I have never worked with a Xcode playground on this userid on this Mac. I'll also say that I use Xcode as an editor for my own source files. Which is to say, I am never using Xcode projects (not on this mac, at least. This mac is only used for me "working from home" on my full-time job, not for Mac development. That's why the Mac is 1-year old...). I have filed a bug report with via Feedback, and included some crash-dumps from when Xcode was crashing. So hopefully that will help Apple find and fix whatever the bug is.
I had the exact same issue.

Github clone got stuck on compressing. So I forced quit. After that no project would open for more than 5 seconds before crashing.

To fix I opened XCode, went to settings and deleted the github account settings.
Thanks @randomize66

I'm getting the same error in one of my projects. 
A workaround for me is to:
Open a different project
File -> Open Recent
Clean build folder
Close Xcode
Delete DerivedData content for the project
Open the project as usual
Clean build folder once again
Go!

I have figured the work around for this back in December already - in it I would open another Xcode project and then with the project window open, I would open the needed project with File -> Open Recent.

Here's a funny thing: today, that OTHER project has stopped opening too. Amazing.

Now I'm using a third, different project, and apparently I'm running out, but statistically, I'll lose access to all of them only by 2023. Amazing.

Thanks this worked for me. I opened another project and xcode did not crash.

UPDATE to my previous post. Reopening another post did allow xcode to open without crashing; however, my current project failed to open and did in fact crash xcode. This worked for me: deleted my project workspace, deleted my podfile.lock and Pods folder. You may also simply rename at the terminal with: > mv yourprojectfile.workspace to yourprojectfile.workspace.bak or any other name. Do the same for the folder.

reinstalled my pods via > pod install.
So the crash was due to my project. Before you go nuts trying to fix xcode, it may be a good idea to test if it an xcode problem or a project problem. So thanks for your tip: by opening another project, it led me to think this issue was my current project.

Xcode is crashing on startup. Any workarounds?
 
 
Q