Xcode 16 Crash when opening existing Project

HI, I've updated to Xcode 16 (via App Store Update). When opening my project, Xcode crashes during the "Resolving Package Graph" phase. When opening other projects without dependencies, there is no crash. The same project opens in Xcode 15 without a problem.

What can I do to solve this?

I'm using a M1 Mac mini.

BR, Holger

-------------------------------------
Translated Report (Full Report Below)
-------------------------------------

Process:               Xcode [31068]
Path:                  /Applications/Xcode.app/Contents/MacOS/Xcode
Identifier:            com.apple.dt.Xcode
Version:               16.0 (23051)
Build Info:            IDEApplication-23051000000000000~2 (16A242d)
App Item ID:           497799835
App External ID:       869020508
Code Type:             ARM-64 (Native)
Parent Process:        launchd [1]
User ID:               501

Date/Time:             2024-09-17 14:54:37.6473 +0200
OS Version:            macOS 14.5 (23F5059e)
Report Version:        12
Anonymous UUID:        AF4F3464-F5C0-CFBD-4CDF-6D21A8B8CEDC

Sleep/Wake UUID:       0688C7F5-AE00-4295-ADA6-7224A11963EA

Time Awake Since Boot: 18000 seconds
Time Since Wake:       211 seconds

System Integrity Protection: enabled

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

Exception Type:        EXC_CRASH (SIGABRT)
Exception Codes:       0x0000000000000000, 0x0000000000000000

Termination Reason:    Namespace SIGNAL, Code 6 Abort trap: 6
Terminating Process:   Xcode [31068]

Application Specific Information:
abort() called


Application Specific Signatures:
NSInvalidArgumentException

Application Specific Backtrace 0:
0   CoreFoundation                      0x000000018180b31c __exceptionPreprocess + 176
1   DVTFoundation                       0x0000000104a945cc DVTFailureHintExceptionPreprocessor + 388
2   libobjc.A.dylib                     0x00000001812f2788 objc_exception_throw + 60
3   CoreFoundation                      0x00000001818fea0c -[__NSCFString characterAtIndex:].cold.1 + 0
4   CoreFoundation                      0x00000001817f0f44 -[NSMutableArray insertObjects:atIndexes:] + 1020
5   IDEFoundation                       0x000000010cfe6c84 __50-[IDEGroup insertGroupSubitems:atIndexes:context:]_block_invoke + 1084
6   DVTFoundation                       0x0000000104ba3798 -[DVTModelObjectGraph performBlockCoalescingModelChanges:] + 60
7   IDEFoundation                       0x000000010cfe67a8 -[IDEGroup insertGroupSubitems:atIndexes:context:] + 248
8   DVTFoundation                       0x0000000104b6267c -[NSMutableArray(DVTFoundationClassAdditions) dvt_sortedInsertOfObjects:withComparator:] + 184
9   IDESwiftPackageCore                 0x0000000306ac8620 $s19IDESwiftPackageCore23IDESPMWorkspaceDelegateC32registerDependencyFileReferences33_033DB97E8C2A552F3158921835EE9F98LL_27modelGraphSynchronizerTokenySayAA0abgH9ReferenceO010dependencyU0_AC16RegistrationModeAELLO012registrationX0tG_AC05ModelrsT0AELLVtFTf4ndn_n + 760
10  IDESwiftPackageCore                 0x0000000306acb728 $s19IDESwiftPackageCore23IDESPMWorkspaceDelegateC27dependencyPackagesDidUpdate33_033DB97E8C2A552F3158921835EE9F98LL8packages14graphHasErrors25revalidatedFilePathCaches27modelGraphSynchronizerTokenySay7SwiftPM10SPMPackageCG_Sb13DVTFoundation11AffirmativeOAC05ModelZ17SynchronizerTokenAELLVtFTf4nnndn_n + 356
11  IDESwiftPackageCore                 0x0000000306ac3640 $s19IDESwiftPackageCore23IDESPMWorkspaceDelegateC27packageGraphDidFinishAction_8duration6resulty7SwiftPM12SPMWorkspaceC0bgJ0O_SdAG0oebgJ16ResolutionResultOtYaFyAC05ModelG17SynchronizerToken33_033DB97E8C2A552F3158921835EE9F98LLVXEfU_ + 484
12  IDESwiftPackageCore                 0x0000000306ac70dc $s19IDESwiftPackageCore23IDESPMWorkspaceDelegateC38disableWorkspaceContentSynchronization33_033DB97E8C2A552F3158921835EE9F98LL6duringyyAC27ModelGraphSynchronizerTokenAELLVXE_tFyyXEfU_TA + 20
13  DVTFoundation                       0x0000000104d75b50 $sSo19DVTModelObjectGraphC13DVTFoundationE34performBlockCoalescingModelChangesyxxyXElFyyXEfU_ + 104
14  DVTFoundation                       0x0000000104d3ce00 $sSDySSSo8NSObjectCGIgo_ACIego_TR + 20
15  DVTFoundation                       0x0000000104d75868 $sIeg_IyB_TR + 20
16  DVTFoundation                       0x0000000104ba3878 __58-[DVTModelObjectGraph performBlockCoalescingModelChanges:]_block_invoke + 104
17  DVTFoundation                       0x0000000104b9d324 -[DVTModelGraphTransactionScope performTransaction:] + 60
18  DVTFoundation                       0x0000000104ba37f0 -[DVTModelObjectGraph performBlockCoalescingModelChanges:] + 148
19  DVTFoundation                       0x0000000104d76308 $sSo19DVTModelObjectGraphC13DVTFoundationE34performBlockCoalescingModelChangesyxxyXElF + 344
20  IDESwiftPackageCore                 0x0000000306ab97f0 $s19IDESwiftPackageCore23IDESPMWorkspaceDelegateC38disableWorkspaceContentSynchronization33_033DB97E8C2A552F3158921835EE9F98LL6duringyyAC27ModelGraphSynchronizerTokenAELLVXE_tF + 444
21  IDESwiftPackageCore                 0x0000000306ac265c $s19IDESwiftPackageCore23IDESPMWorkspaceDelegateC27packageGraphDidFinishAction_8duration6resulty7SwiftPM12SPMWorkspaceC0bgJ0O_SdAG0oebgJ16ResolutionResultOtYaFTY4_ + 164
22  IDESwiftPackageCore                 0x0000000306a98191 $sIeAgH_ytIeAgHr_TRTATQ0_ + 1
23  SwiftPM                             0x000000031c735571 $s7SwiftPM12SPMWorkspaceC26packageGraphActionFinished33_918CA8CFEB8D3E06D2EEA2771EA5EA00LLyyAC07PackageE16ResolutionResultAELLVYaFTQ1_ + 1
24  SwiftPM                             0x000000031c734e8d $s7SwiftPM12SPMWorkspaceC46processPackageGraphActionsInBackgroundIfNeeded33_918CA8CFEB8D3E06D2EEA2771EA5EA00LL010canProcessefG0yAC11AffirmativeO_tFyyYaYbcfU1_yyYacfU0_TQ1_ + 1
25  SwiftPM                             0x000000031c782dfd $s7SwiftPM33SPMWorkspaceOrchestrationDelegateP27packageGraphDidFinishAction_8duration6resultyAA0C0C07PackagegJ0O_SdAA0cemgJ16ResolutionResultOtYaFTjTQ0_ + 1
26  SwiftPM                             0x000000031c7f7c79 $sxIeAgHr_xs5Error_pIegHrzo_s8SendableRzs5NeverORs_r0_lTRyt_Tg5TQ0_ + 1
27  SwiftPM                             0x000000031c77f571 $sxIeAgHr_xs5Error_pIegHrzo_s8SendableRzs5NeverORs_r0_lTRyt_Tg5TATQ0_ + 1
28  libswift_Concurrency.dylib          0x00000002491de0f9 _ZL23completeTaskWithClosurePN5swift12AsyncContextEPNS_10SwiftErrorE + 1

I have the same problem. When I select a file, it crashes immediately on Xcode 16. I'm using an M1 MacBook Pro.

-------------------------------------
Translated Report (Full Report Below)
-------------------------------------

Process:               Xcode [5206]
Path:                  /Applications/Xcode.app/Contents/MacOS/Xcode
Identifier:            com.apple.dt.Xcode
Version:               16.0 (23051)
Build Info:            IDEApplication-23051000000000000~2 (16A242d)
App Item ID:           497799835
App External ID:       869020508
Code Type:             ARM-64 (Native)
Parent Process:        launchd [1]
User ID:               501

Date/Time:             2024-09-17 19:05:46.5076 +0300
OS Version:            macOS 15.0 (24A335)
Report Version:        12
Anonymous UUID:        70DB0691-B666-8124-AA3B-4368E0F11916

Sleep/Wake UUID:       B614D521-A18B-48B8-AA52-8015C048FEB9

Time Awake Since Boot: 7500 seconds
Time Since Wake:       525 seconds

System Integrity Protection: enabled

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

Exception Type:        EXC_CRASH (SIGABRT)
Exception Codes:       0x0000000000000000, 0x0000000000000000

Termination Reason:    Namespace SIGNAL, Code 6 Abort trap: 6
Terminating Process:   Xcode [5206]

Application Specific Information:
abort() called


Application Specific Signatures:
NSInvalidArgumentException

Application Specific Backtrace 0:
0   CoreFoundation                      0x0000000182fd4ec0 __exceptionPreprocess + 176
1   DVTFoundation                       0x0000000101ff85cc DVTFailureHintExceptionPreprocessor + 388
2   libobjc.A.dylib                     0x0000000182abacd8 objc_exception_throw + 88
3   CoreFoundation                      0x000000018308a5a4 -[NSObject(NSObject) __retain_OA] + 0
4   CoreFoundation                      0x0000000182f41140 ___forwarding___ + 1568
5   CoreFoundation                      0x0000000182f40a60 _CF_forwarding_prep_0 + 96
6   AssetCatalogFoundation              0x0000000133012a68 -[IBICAbstractCatalogItem(IBICManifestArchivistDelegate) manifestArchivist:applyPropertiesFromChildEntry:toChild:results:] + 1380
7   AssetCatalogFoundation              0x00000001330d33c8 -[IBICBundleIconSet manifestArchivist:applyPropertiesFromChildEntry:toChild:results:] + 112
8   AssetCatalogFoundation              0x000000013302de0c -[IBICAppIconSet manifestArchivist:applyPropertiesFromChildEntry:toChild:results:] + 240
9   AssetCatalogFoundation              0x0000000133010704 -[IBICManifestArchivist childFromChildEntry:results:] + 192
10  AssetCatalogFoundation              0x0000000133010890 __73-[IBICManifestArchivist childrenFromContentsJSONChildrenEntries:results:]_block_invoke + 152
11  AssetCatalogFoundation              0x00000001330ea668 IBWithObjectBufferResultingInArray + 72
12  AssetCatalogFoundation              0x00000001330107b4 -[IBICManifestArchivist childrenFromContentsJSONChildrenEntries:results:] + 128
13  AssetCatalogFoundation              0x00000001330110ec -[IBICManifestArchivist replaceChildrenFromFileSystemSnapshot:results:] + 456
14  AssetCatalogFoundation              0x000000013301c8fc -[IBICSlottedAsset replaceChildrenFromFileSystemSnapshot:results:] + 116
15  AssetCatalogFoundation              0x000000013301124c -[IBICManifestArchivist replaceChildrenFromFileSystemSnapshot:results:] + 808
16  AssetCatalogFoundation              0x000000013300ae54 -[IBICFolder replaceChildrenFromFileSystemSnapshot:results:] + 116
17  AssetCatalogFoundation              0x00000001330548e8 -[IBICAbstractCatalog replaceChildrenWithDiskContent:] + 140
18  AssetCatalogFoundation              0x00000001330418f0 -[IBICCatalogSynchronizer replaceCatalogWithContentsOfPathWhileItIsKnowThatSyncOperationsAreNotInflightAndAreDisabled:] + 140
19  AssetCatalogFoundation              0x00000001330416f0 -[IBICCatalogSynchronizer replaceCatalogWithContentsOfPath:] + 104
20  AssetCatalogFoundation              0x000000013303f380 +[IBICCatalogSynchronizer synchronizerTakingOwnershipForCatalog:atPath:] + 92
21  AssetCatalogFoundation              0x000000013303f3e8 +[IBICCatalogSynchronizer synchronizerForCatalogAtPath:] + 68
22  AssetCatalogKit                     0x000000013117db04 __69+[IBICCatalogMediaRepository retainedCatalogSynchronizerForFilePath:]_block_invoke + 52
23  AssetCatalogFoundation              0x000000013308a708 -[NSMutableDictionary(IBMutableDictionaryAdditions) ib_objectForKey:creatingIfNecessaryWithBlock:] + 100
24  AssetCatalogKit                     0x000000013117da60 +[IBICCatalogMediaRepository retainedCatalogSynchronizerForFilePath:] + 136
25  AssetCatalogKit                     0x000000013117f660 -[IBICCatalogMediaRepository _addSynchronizerForCatalogAtPath:] + 48
26  AssetCatalogKit                     0x000000013117f12c __104-[IBICCatalogMediaRepository fileReferenceObserverDidReportUpdatedAndAddedResourcesByPath:removedPaths:]_block_invoke + 544
27  AssetCatalogKit                     0x000000013117ecd8 -[IBICCatalogMediaRepository notifyObserversAfterPossiblyMutatingWithBlock:] + 88
28  AssetCatalogKit                     0x000000013117eed8 -[IBICCatalogMediaRepository fileReferenceObserverDidReportUpdatedAndAddedResourcesByPath:removedPaths:] + 132
29  IDEKit                              0x000000010606a210 __54-[IDEContainerContentsMediaRepository _startObserving]_block_invoke + 596

I solved the Xcode closing problem by deleting the AppIcon image set in the Asset catalog and adding it again.

My solution was: Downloading Xcode 15.4 - opening the project, removing the local dependencies, closing Xcode 15, opening the project in Xcode 16 and adding the dependencies again.

@.holger Thanks so much for reporting that. Is that the Xcode release version or any previous beta version, including the RC? What macOS version are you using? Would you be kind and file a bug report?

Don't forget to include the workaround you did to get it working again and the sysdiagnose. Once you open the bug report, please post the FB number here for my reference.

If you have any questions about filing a bug report, take a look at Bug Reporting: How and Why?

Xcode 16 Crash when opening existing Project
 
 
Q