xCode 15.2 - repeated crashes when typing in editor

Hello, For around 3 month now, my xCode crashes repeatedly after every keystroke in some files. At first it started for a few repeated crashes and then it could stop crashing for an hour or two. Now it just immediately crashing when typing.

The project compiles just fine, but when i try to write something it crashes. reopen xcode, press a key in the editor, crashes again.

It looks like it start crashing after finishing "Indexing files" step. I work on 1 main project and only it crashes, other / small projects works just fine.

I've tried:

  1. Cleaning derived data folder/ Build folder.
  2. Reinstalling xCode.
  3. Deleting xCode preferences.
  4. Totally removed all symbols from SymbolCache.
  5. Removed all 3rd patry libs.
  6. Copied all the files to a new xcodeproj.
  7. Various other attempts.
  8. Disabled AutoComplete
  9. Disabled Source Control

Here's the crash log. I wish someone could help with this as i can't progress at all on my work.

Looks like "SymbolCacheSupport" is having infinite loop.

Cheers for any hint!

Translated Report (Full Report Below)

Process: Xcode [3763] Path: /Applications/Xcode.app/Contents/MacOS/Xcode Identifier: com.apple.dt.Xcode Version: 15.2 (22503) Build Info: IDEApplication-22503000000000000~3 (15C500b) App Item ID: 497799835 App External ID: 862131722 Code Type: ARM-64 (Native) Parent Process: launchd [1] User ID: 501

Date/Time: 2024-02-09 08:45:16.2443 +0200 OS Version: macOS 14.3.1 (23D60) Report Version: 12 Anonymous UUID: 27D26FCB-948A-1A6E-8564-5C74267CD7EB

Time Awake Since Boot: 920 seconds

System Integrity Protection: enabled

Notes: Extracting libpas PGM metadata failed.




Exception Type:        EXC_BAD_ACCESS (SIGBUS)

Exception Codes:       KERN_PROTECTION_FAILURE at 0x0000000173017fa0

Exception Codes:       0x0000000000000002, 0x0000000173017fa0



Thread 7 Crashed:: 

0   libsystem_malloc.dylib        	       0x1858bdbc4 tiny_malloc_from_free_list + 8

1   libsystem_malloc.dylib        	       0x1858bd53c tiny_malloc_should_clear + 288

2   libsystem_malloc.dylib        	       0x1858bc2c8 szone_malloc_should_clear + 92

3   CoreFoundation                	       0x185b09c44 _CFRuntimeCreateInstance + 448

4   CoreFoundation                	       0x185b09338 __CFStringCreateImmutableFunnel3 + 1932

5   CoreFoundation                	       0x185b6fc60 -[__NSCFString substringWithRange:] + 164

6   SourceModel                   	       0x12060b190 -[SMSourceModel textOfItem:] + 148

7   SymbolCacheSupport            	       0x123cde4e8 SwiftContext.processIdentifier(at:in:preferClass:declarationsKind:handleLocal:handleGenericParam:handleClosureArg:handleTypeCast:handleMetaType:handleIDsBeforeFiltering:handlePrevTypes:handleFailedFilter:handleMatches:) + 4208

8   SymbolCacheSupport            	       0x123cd60f0 SwiftContext.typesForIdentifierExpression(at:in:) + 868

9   SymbolCacheSupport            	       0x123cd4950 SwiftContext.typesForExpressionEnding(at:in:) + 1604

10  SymbolCacheSupport            	       0x123cd49f8 SwiftContext.typesForExpressionEnding(at:in:) + 1772

11  SymbolCacheSupport            	       0x123ceb948 SwiftContext.typesForParenExpression(at:in:) + 1060

12  SymbolCacheSupport            	       0x123cd493c SwiftContext.typesForExpressionEnding(at:in:) + 1584

13  SymbolCacheSupport            	       0x123d0452c closure #1 in SwiftContext.parsedTypes(of:in:canCache:) + 296

14  SymbolCacheSupport            	       0x123d040d4 SwiftContext.parsedTypes(of:in:canCache:) + 1124

15  SymbolCacheSupport            	       0x123cfc3f8 SwiftContext.findTypesForFunctionOrContainedElement(_:prevID:id:item:sourceModel:idsToTypes:) + 1080

16  SymbolCacheSupport            	       0x123cfb934 SwiftContext.typesForMatch(_:item:sourceModel:idsToTypes:) + 2252

17  SymbolCacheSupport            	       0x123cfae64 SwiftContext.typesForMatches(_:item:sourceModel:idsToTypes:) + 748

18  SymbolCacheSupport            	       0x123cd9d10 handleMatches #1 (matches:item:sourceModel:idsToTypes:) in SwiftContext.typesForIdentifierExpression(at:in:) + 104

19  SymbolCacheSupport            	       0x123ce1080 SwiftContext.processIdentifier(at:in:preferClass:declarationsKind:handleLocal:handleGenericParam:handleClosureArg:handleTypeCast:handleMetaType:handleIDsBeforeFiltering:handlePrevTypes:handleFailedFilter:handleMatches:) + 15368

20  SymbolCacheSupport            	       0x123cd60f0 SwiftContext.typesForIdentifierExpression(at:in:) + 868

21  SymbolCacheSupport            	       0x123cd4950 SwiftContext.typesForExpressionEnding(at:in:) + 1604

22  SymbolCacheSupport            	       0x123cecb7c SwiftContext.typesForParenExpression(at:in:) + 5720

23  SymbolCacheSupport            	       0x123cd493c SwiftContext.typesForExpressionEnding(at:in:) + 1584

24  SymbolCacheSupport            	       0x123d0452c closure #1 in SwiftContext.parsedTypes(of:in:canCache:) + 296

25  SymbolCacheSupport            	       0x123d040d4 SwiftContext.parsedTypes(of:in:canCache:) + 1124

26  SymbolCacheSupport            	       0x123cfc3f8 SwiftContext.findTypesForFunctionOrContainedElement(_:prevID:id:item:sourceModel:idsToTypes:) + 1080

27  SymbolCacheSupport            	       0x123cfb934 SwiftContext.typesForMatch(_:item:sourceModel:idsToTypes:) + 2252

28  SymbolCacheSupport            	       0x123cfae64 SwiftContext.typesForMatches(_:item:sourceModel:idsToTypes:) + 748

29  SymbolCacheSupport            	       0x123cd9d10 handleMatches #1 (matches:item:sourceModel:idsToTypes:) in SwiftContext.typesForIdentifierExpression(at:in:) + 104

30  SymbolCacheSupport            	       0x123ce1080 SwiftContext.processIdentifier(at:in:preferClass:declarationsKind:handleLocal:handleGenericParam:handleClosureArg:handleTypeCast:handleMetaType:handleIDsBeforeFiltering:handlePrevTypes:handleFailedFilter:handleMatches:) + 15368

31  SymbolCacheSupport            	       0x123cd60f0 SwiftContext.typesForIdentifierExpression(at:in:) + 868

32  SymbolCacheSupport            	       0x123cd4950 SwiftContext.typesForExpressionEnding(at:in:) + 1604

33  SymbolCacheSupport            	       0x123cecb7c SwiftContext.typesForParenExpression(at:in:) + 5720

34  SymbolCacheSupport            	       0x123cd493c 

Exactly same issue here. Nothing works. XCode 15.2 Sonoma 14.0.

Same issue here, Xcode 16.1.0, Sequoia 15.1.1.

xCode 15.2 - repeated crashes when typing in editor
 
 
Q