Xcode 12.2 启动时崩溃

Xcode 12.2 Crashes on launch

在尝试解决此问题时删除 ~/Library/Developer 之后 (https://github.com/xcpretty/xcode-install/issues/435)。

我无法启动 xcode。 我尝试手动和使用 xcpretty 卸载并重新安装 xcode。

我正在尝试启动 xcode 12.2,我目前是 运行 MacOS Catalina 10.15.7

当我启动 xcode 时,我看到一条错误消息指出

Xcode quit unexpectedly. Click Reopen to open the application again. Click Report to see more detailed information and send a report to apple. "

以下是错误报告中的信息

Process:               Xcode [24484]
Path:                  /Applications/Xcode.app/Contents/MacOS/Xcode
Identifier:            com.apple.dt.Xcode
Version:               12.4 (17801)
Build Info:            IDEFrameworks-17801000000000000~7 (12D4e)
App Item ID:           497799835
App External ID:       839994694
Code Type:             X86-64 (Native)
Parent Process:        ??? [1]
Responsible:           Xcode [24484]
User ID:               502

Date/Time:             2021-06-14 10:09:31.331 -0700
OS Version:            Mac OS X 10.15.7 (19H2)
Report Version:        12
Bridge OS Version:     5.2 (18P4347)
Anonymous UUID:        D6C1DFF4-7DB6-8ECB-43AC-F7CBB04C2AD5

Sleep/Wake UUID:       697D3CD9-6369-4728-97C6-7E37625B3BA0

Time Awake Since Boot: 46000 seconds
Time Since Wake:       5900 seconds

System Integrity Protection: enabled

Crashed Thread:        10  Dispatch queue: com.apple.CoreSimulator.SimServiceContext.profileQueue

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

Termination Reason:    DYLD, [0x9] <unknown>

Application Specific Information:
dyld: in dlopen()
/Applications/Xcode.app/Contents/PlugIns/IDEInterfaceBuilderKit.framework/IDEInterfaceBuilderKit
ProductBuildVersion: 12D4e

Dyld Error Message:
  can't resolve symbol _rosetta_is_current_process_translated in /Library/Developer/PrivateFrameworks/CoreSimulator.framework/Versions/A/CoreSimulator because dependent dylib #1 could not be loaded

Thread 0:: Dispatch queue: DVTPlugInExtensionFaultingLock
0   dyld                            0x000000010bf0afce __fcntl + 10
1   dyld                            0x000000010bf09644 fcntl + 171
2   dyld                            0x000000010bece4d5 ImageLoaderMachO::loadCodeSignature(linkedit_data_command const*, int, unsigned long long, ImageLoader::LinkContext const&) + 423
3   dyld                            0x000000010bed4414 ImageLoaderMachOCompressed::instantiateFromFile(char const*, int, unsigned char const*, unsigned long, unsigned long long, unsigned long long, stat const&, unsigned int, unsigned int, linkedit_data_command const*, encryption_info_command const*, ImageLoader::LinkContext const&) + 276
4   dyld                            0x000000010becd628 ImageLoaderMachO::instantiateFromFile(char const*, int, unsigned char const*, unsigned long, unsigned long long, unsigned long long, stat const&, ImageLoader::LinkContext const&) + 158
5   dyld                            0x000000010beb8ee5 dyld::loadPhase6(int, stat const&, char const*, dyld::LoadContext const&) + 728
6   dyld                            0x000000010bec0b41 dyld::loadPhase5(char const*, char const*, dyld::LoadContext const&, unsigned int&, std::__1::vector<char const*, std::__1::allocator<char const*> >*) + 1422
7   dyld                            0x000000010bec0551 dyld::loadPhase4(char const*, char const*, dyld::LoadContext const&, unsigned int&, std::__1::vector<char const*, std::__1::allocator<char const*> >*) + 185
...
   r8: 0x000070000fde18b0   r9: 0x0000000000000000  r10: 0x0000000000000014  r11: 0x0000000000000246
  r12: 0x0000000000000014  r13: 0x000070000fde1cb0  r14: 0x0000000000000009  r15: 0x0000000000000006
  rip: 0x000000010bf0aede  rfl: 0x0000000000000246  cr2: 0x000000011d4cd000
  
Logical CPU:     0
Error Code:      0x02000209
Trap Number:     133


Binary Images:
       0x100138000 -        0x10013bff7  com.apple.dt.Xcode (12.4 - 17801) <96564365-DC0B-397C-BF24-E152CBE2F30A> /Applications/Xcode.app/Contents/MacOS/Xcode
       0x100150000 -        0x10017ffff  com.apple.dt.DVTCocoaAdditionsKit (12.4 - 17800) <7706C0EC-638B-397F-8058-39405CC58BF7> /Applications/Xcode.app/Contents/SharedFrameworks/DVTCocoaAdditionsKit.framework/Versions/A/DVTCocoaAdditionsKit
       0x1001bc000 -        0x1007cbfff  com.apple.dt.DVTFoundation (12.4 - 17800) <139CC330-72B1-31EE-9545-286B9D959209> /Applications/Xcode.app/Contents/SharedFrameworks/DVTFoundation.framework/Versions/A/DVTFoundation
       0x100ae4000 -        0x100c7ffff  com.apple.dt.DVTKit (12.4 - 17800) <F8715548-9981-3524-8A8F-CA69C645F497> /Applications/Xcode.app/Contents/SharedFrameworks/DVTKit.framework/Versions/A/DVTKit
       0x100ddb000 -        0x101692fff  com.apple.dt.IDEFoundation (12.4 - 17801) <94BF4338-F3CA-3D81-87F1-7A50E6779ED1> /Applications/Xcode.app/Contents/Frameworks/IDEFoundation.framework/Versions/A/IDEFoundation
       0x101e9e000 -        0x102889ff7  com.apple.dt.IDEKit (12.4 - 17801) <1BA720BC-33B3-393E-A824-7F1A42394116> /Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/Versions/A/IDEKit
       0x103188000 -        0x103223fd3  com.apple.SymbolicationDT (12.4 - 64543.1) <81C083E6-CE69-362F-A4EB-B0595F268B89> /Applications/Xcode.app/Contents/SharedFrameworks/SymbolicationDT.framework/Versions/A/SymbolicationDT
       0x103296000 -        0x1032d5ffb  com.apple.DebugSymbols (195.1 - 195.1) <2026D91E-F119-3231-A274-F197ECADFA65> /Applications/Xcode.app/Contents/SharedFrameworks/DebugSymbolsDT.framework/Versions/A/DebugSymbolsDT
       0x103328000 -        0x1033e3ff7  com.apple.CoreSymbolicationDT (12.4 - 64543.1) <FBF19064-1D62-33CB-B60B-99D9CB5D2D8E> /Applications/Xcode.app/Contents/SharedFrameworks/CoreSymbolicationDT.framework/Versions/A/CoreSymbolicationDT
       0x10345c000 -        0x103487ffb  com.apple.dt.instruments.DTXConnectionServices (12.4 - 64543.2) <1A4AF5BE-8206-3877-9ECA-784A23BE2FCE> /Applications/Xcode.app/Contents/SharedFrameworks/DTXConnectionServices.framework/Versions/A/DTXConnectionServices
       0x1034b4000 -        0x10357bfff  com.apple.dt.instruments.DVTInstrumentsFoundation (12.4 - 64543.2) <41E65559-8110-3A37-A352-91BAF6FE0058> /Applications/Xcode.app/Contents/SharedFrameworks/DVTInstrumentsFoundation.framework/Versions/A/DVTInstrumentsFoundation
       0x10363c000 -        0x103643ff7  com.apple.MallocStackLogging (1.0 - 1) 

...

    0x7fff68123000 -     0x7fff68125fff  libsystem_secinit.dylib (62.100.2) <F80872AA-E1FD-3D7E-8729-467656EC6561> /usr/lib/system/libsystem_secinit.dylib
    0x7fff68126000 -     0x7fff6812dffb  libsystem_symptoms.dylib (1238.120.1) <5820A2AF-CE72-3AB3-ABCC-273A3419FB55> /usr/lib/system/libsystem_symptoms.dylib
    0x7fff6812e000 -     0x7fff68144ff2  libsystem_trace.dylib (1147.120) <04B47629-847B-3D74-8ABE-C05EF9DEEFE4> /usr/lib/system/libsystem_trace.dylib
    0x7fff68146000 -     0x7fff6814bff7  libunwind.dylib (35.4) <42B7B509-BAFE-365B-893A-72414C92F5BF> /usr/lib/system/libunwind.dylib
    0x7fff6814c000 -     0x7fff68181ffe  libxpc.dylib (1738.140.1) <3E243A41-030F-38E3-9FD2-7B38C66C35B1> /usr/lib/system/libxpc.dylib

External Modification Summary:
  Calls made by other processes targeting this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by all processes on this machine:
    task_for_pid: 113232
    thread_create: 0
    thread_set_state: 0

VM Region Summary:
ReadOnly portion of Libraries: Total=1.1G resident=0K(0%) swapped_out_or_unallocated=1.1G(100%)
Writable regions: Total=191.1M written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=191.1M(100%)
 
                                VIRTUAL   REGION 
REGION TYPE                        SIZE    COUNT (non-coalesced) 
===========                     =======  ======= 
Accelerate framework               256K        2 
Activity Tracing                   256K        1 
CG backing stores                 1232K        2 
CoreGraphics                         8K        1 
CoreImage                           24K        2 
CoreServices                        84K        1 
CoreUI image data                  116K        1 
Dispatch continuations            24.0M        1 
Foundation                           4K        1 
Kernel Alloc Once                    8K        1 
MALLOC                           146.9M       83 
MALLOC guard page                   32K        6 
Performance tool data                4K        1         not counted in TOTAL below
STACK GUARD                       56.1M       15 
Stack                             15.1M       15 
VM_ALLOCATE                        380K       15 
__DATA                            79.1M      639 
__DATA_CONST                      4679K      117 
__FONT_DATA                          4K        1 
__LINKEDIT                       475.8M      194 
__OBJC_RO                         32.3M        1 
__OBJC_RW                         1904K        1 
__TEXT                           648.7M      617 
__UNICODE                          564K        1 
mapped file                       58.8M       17 
shared memory                      644K       16 
===========                     =======  ======= 
TOTAL                              1.5G     1751 

Model: MacBookPro16,1, BootROM 1554.80.3.0.0 (iBridge: 18.16.14347.0.0,0), 6 processors, 6-Core Intel Core i7, 2.6 GHz, 16 GB, SMC 
Graphics: kHW_IntelUHDGraphics630Item, Intel UHD Graphics 630, spdisplays_builtin
Graphics: kHW_AMDRadeonPro5300MItem, AMD Radeon Pro 5300M, spdisplays_pcie_device, 4 GB
Memory Module: BANK 0/ChannelA-DIMM0, 8 GB, DDR4, 2667 MHz, Micron, 8ATF1G64HZ-2G6E1
Memory Module: BANK 2/ChannelB-DIMM0, 8 GB, DDR4, 2667 MHz, Micron, 8ATF1G64HZ-2G6E1
AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x7BF), wl0: Apr  7 2020 13:09:12 version 9.30.357.41.32.5.49 FWID 01-617711e7
Bluetooth: Version 7.0.6f7, 3 services, 27 devices, 1 incoming serial ports
Network Service: USB 10/100/1000 LAN, Ethernet, en7
Network Service: Wi-Fi, AirPort, en0
USB Device: USB3.0 Hub
USB Device: USB 10/100/1000 LAN
USB Device: USB3.1 Hub
USB Device: USB3.0 Hub
USB Device: USB 3.1 Bus
USB Device: USB2.0 Hub
USB Device: USB2.0 Hub
USB Device: USB 2.0 BILLBOARD
USB Device: USB 2.0 Hub
USB Device: USB Billboard Device
USB Device: USB2.1 Hub
USB Device: Apple T2 Bus
USB Device: Composite Device
USB Device: Touch Bar Backlight
USB Device: Touch Bar Display
USB Device: Apple Internal Keyboard / Trackpad
USB Device: Headset
USB Device: Ambient Light Sensor
USB Device: FaceTime HD Camera (Built-in)
USB Device: Apple T2 Controller
Thunderbolt Bus: MacBook Pro, Apple Inc., 55.3
Thunderbolt Bus: MacBook Pro, Apple Inc., 55.3

rm /Library/Developer~/Library/Developer 了吗?我发现罪魁祸首是 /Library/Developer/PrivateFrameworks/CoreSimulator.framework,如果您尝试使用 xcode-install 在 MacOS Catalina 中安装 Xcode 12.5,即使该版本需要 BigSur,它也会被安装。我能够通过删除它来解决问题,然后重新安装 Xcode 的正确版本,重新安装 CoreSimulator.framework.

的工作版本

您仍然收到此错误:

can't resolve symbol _rosetta_is_current_process_translated in /Library/Developer/PrivateFrameworks/CoreSimulator.framework/Versions/A/CoreSimulator

这似乎表明您仍然存在问题 CoreSimulator.framework