Xcode 13.1 keeps crashing. All I do is click on a file and it crashes. Some files open fine, but if I click on particular files XCode will crash %100 of the time. There is nothing special about the files, just plain swift files ~300 lines.
This is making Xcode 13.1 unusable
See crash log below.
Details:
2019 MacBook Pro 16", Big Sur, 64GB ram
Here my is a history of Xcode 13
Uninstalled Xcode 12 using Parallels uninstaller app
Installed Xcode 13
Xcode crashes on opening files, tried several rounds of uninstalling & installing.
Reformated HD and did fresh install of Big Sur.
Installed Xcode 13
Same thing, Xcode crashes on opening files.
Gave up, started using AppCode w/out any issues
Uninstalled Xcode 13 using Parallels uninstaller app
Installed Xcode 13.1rc
Same thing, Xcode crashes opening files.
Went back to AppCode
Tried Xcode again (not a reinstall, just ran it again) and it worked without any crashes.
Used Xcode 13.1rc without any issues for about 5 days.
Suddenly Xcode started crashing when opening files. (no changes to system or code)
Uninstalled Xcode 13.1rc with Parallels uninstaller
Installed Xcode 13.1
Same issues, crashes consistently :(
Anyone have any workarounds?
Crash Log
Process: Xcode [1934]
Path: /Applications/Xcode.app/Contents/MacOS/Xcode
Identifier: com.apple.dt.Xcode
Version: 13.1 (19466)
Build Info: IDEFrameworks-19466000000000000~20 (13A1030d)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Xcode [1934]
User ID: 501
Date/Time: 2021-10-28 10:50:36.620 -0700
OS Version: macOS 11.6 (20G165)
Report Version: 12
Bridge OS Version: 5.5 (18P4759a)
Anonymous UUID: 0DFE01C0-3603-9A46-AC40-7F64E7D702E0
Time Awake Since Boot: 730 seconds
System Integrity Protection: enabled
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_INSTRUCTION (SIGILL)
Exception Codes: 0x0000000000000001, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Termination Signal: Illegal instruction: 4
Termination Reason: Namespace SIGNAL, Code 0x4
Terminating Process: exc handler [1934]
Application Specific Information:
ProductBuildVersion: 13A1030d
Crashing on exception: -[__NSCFString substringWithRange:]: Range {16527, 6} out of bounds; string length 5512
Application Specific Backtrace 1:
0 CoreFoundation 0x00007fff205a71db __exceptionPreprocess + 242
1 DVTFoundation 0x0000000101ac7fdd DVTFailureHintExceptionPreprocessor + 446
2 libobjc.A.dylib 0x00007fff202e0d92 objc_exception_throw + 48
3 CoreFoundation 0x00007fff2065de0a _CFThrowFormattedException + 202
4 CoreFoundation 0x00007fff2051bce0 -[NSConstantDictionary objectForKey:] + 0
5 SourceModel 0x000000013980e854 -[SMSourceModel nameOfItem:nameRanges:scopeRange:] + 934
6 SymbolCacheSupport 0x0000000139c3096b $s18SymbolCacheSupport0A5TableC7element3for2inAC7ElementVSgSo17SMSourceModelItemC_So0iJ0CtF + 107
7 SymbolCacheSupport 0x0000000139b9dda1
...