Xcode 11 在运行的 iPhone 13.1 应用程序上崩溃

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/58101444/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 11:02:17  来源:igfitidea点击:

Xcode 11 crashing on iPhone 13.1 app running

xcodeios13

提问by alxlives

I updated Xcode today (Xcode 11.0), and now it crashes every time I try running any project on my iPhone (iOS 13.1).

我今天更新了 Xcode(Xcode 11.0),现在每次我尝试在我的 iPhone(iOS 13.1)上运行任何项目时它都会崩溃。

Already tried:

已经尝试过:

  • Cleaning derived data
  • Cleaning library cache folder
  • Uninstalling xCode and downloading it again from the store
  • Restarting Mac
  • Restarting iPhone
  • Reconnecting iPhone trough itunes
  • 清洗派生数据
  • 清理库缓存文件夹
  • 卸载 xCode 并从商店重新下载
  • 重新启动 Mac
  • 重启 iPhone
  • 通过 iTunes 重新连接 iPhone

The odd thing is that the Xcode activity doesn't show the "installing app" phase, it goes straight to "Running app on device" and then crashes. Running on the simulator works without a problem.

奇怪的是 Xcode 活动没有显示“安装应用程序”阶段,它直接进入“在设备上运行应用程序”然后崩溃。在模拟器上运行没有问题。

Already searched on the Apple forums and sent the report to Apple, but maybe there is something I can do to solve te issue.

已经在 Apple 论坛上搜索并将报告发送给 Apple,但也许我可以做些什么来解决问题。

Error log:

错误日志:

Process:               Xcode [873]
Path:                  /Applications/Xcode.app/Contents/MacOS/Xcode
Identifier:            com.apple.dt.Xcode
Version:               11.0 (14936)
Build Info:            IDEFrameworks-14936000000000000~3
App Item ID:           497799835
App External ID:       832762837
Code Type:             X86-64 (Native)
Parent Process:        ??? [1]
Responsible:           Xcode [873]
User ID:               502

Date/Time:             2019-09-25 11:47:10.497 -0300
OS Version:            Mac OS X 10.14.6 (18G95)
Report Version:        12
Anonymous UUID:        XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX


Time Awake Since Boot: 550 seconds

System Integrity Protection: enabled

Crashed Thread:        16  Dispatch queue: Mutex to protect _hasPerformedWorkerAction

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

Application Specific Information:
com.apple.main-thread
ProductBuildVersion: 11A420a
UNCAUGHT EXCEPTION (NSInternalInconsistencyException): Invalid parameter not satisfying: aString != nil
UserInfo: (null)
Hints: 
  0: Calling block provided to DVTSyncPerformBlock() here:

  0   DVTSyncPerformBlock (in DVTFoundation)
  1   -[IDEExecutionRunnableTracker executionWantsHold:withError:] (in IDEFoundation)
  2   -[IDERunOperationWorker _startWithRetrying:] (in IDEFoundation)
  3   __44-[IDERunOperationWorker _startWithRetrying:]_block_invoke_3 (in IDEFoundation)
  4   __48-[DVTDispatchLock_Recursive performLockedBlock:]_block_invoke (in DVTFoundation)
  5   _dispatch_client_callout (in libdispatch.dylib)
  6   _dispatch_lane_barrier_sync_invoke_and_complete (in libdispatch.dylib)
  7   DVTDispatchBarrierSync (in DVTFoundation)
  8   -[DVTDispatchLock performLockedBlock:] (in DVTFoundation)
  9   -[DVTDispatchLock_Recursive performLockedBlock:] (in DVTFoundation)
 10   __44-[IDERunOperationWorker _startWithRetrying:]_block_invoke_2 (in IDEFoundation)
 11   __DVT_CALLING_CLIENT_BLOCK__ (in DVTFoundation)
 12   __DVTDispatchAfter_block_invoke (in DVTFoundation)
 13   _dispatch_client_callout (in libdispatch.dylib)
 14   _dispatch_continuation_pop (in libdispatch.dylib)
 15   _dispatch_source_invoke (in libdispatch.dylib)
 16   _dispatch_continuation_pop (in libdispatch.dylib)
 17   _dispatch_async_redirect_invoke (in libdispatch.dylib)
 18   _dispatch_root_queue_drain (in libdispatch.dylib)
 19   _dispatch_worker_thread2 (in libdispatch.dylib)
 20   _pthread_wqthread (in libsystem_pthread.dylib)
 21   start_wqthread (in libsystem_pthread.dylib)

Backtrace:
  0   __exceptionPreprocess (in CoreFoundation)
  1   DVTFailureHintExceptionPreprocessor (in DVTFoundation)
  2   objc_exception_throw (in libobjc.A.dylib)
...
...
...
    0x7fff63005000 -     0x7fff6300affb  libunwind.dylib (35.4) <24A97A67-F017-3CFC-B0D0-6BD0224B1336> /usr/lib/system/libunwind.dylib
    0x7fff6300b000 -     0x7fff6303afff  libxpc.dylib (1336.261.2) <7DEE2300-6D8E-3C00-9C63-E3E80D56B0C4> /usr/lib/system/libxpc.dylib

External Modification Summary:
  Calls made by other processes targeting this process:
    task_for_pid: 1
    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: 430
    thread_create: 0
    thread_set_state: 21

VM Region Summary:
ReadOnly portion of Libraries: Total=1.1G resident=0K(0%) swapped_out_or_unallocated=1.1G(100%)
Writable regions: Total=1.2G written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=1.2G(100%)

                                VIRTUAL   REGION 
REGION TYPE                        SIZE    COUNT (non-coalesced) 
===========                     =======  ======= 
Accelerate framework               640K        5 
Activity Tracing                   256K        1 
CG backing stores                 1160K        2 
CG image                          1296K       95 
CG raster data                      56K        6 
CoreAnimation                     25.8M      164 
CoreGraphics                         8K        1 
CoreImage                          776K       81 
CoreUI image data                 3000K       34 
CoreUI image file                  688K       14 
Dispatch continuations            8192K        1 
Foundation                         344K        5 
Image IO                            80K        5 
JS JIT generated code              1.0G        3 
Kernel Alloc Once                 1036K        2 
MALLOC                           136.4M      116 
MALLOC guard page                   48K       10 
Memory Tag 242                      12K        1 
Memory Tag 251                      64K        3 
Performance tool data             8208K        1         not counted in TOTAL below
SQLite page cache                  128K        2 
STACK GUARD                       56.1M       23 
Stack                             19.2M       23 
VM_ALLOCATE                        360K       24 
WebKit Malloc                     1144K        3 
__DATA                            94.4M      755 
__DATA_CONST                         8K        1 
__FONT_DATA                          4K        1 
__LINKEDIT                       357.4M      236 
__TEXT                           723.4M      680 
__UNICODE                          564K        1 
libnetwork                        1152K        4 
mapped file                      169.2M      230 
shared memory                      676K       15 
===========                     =======  ======= 
TOTAL                              2.6G     2547 

Model: MacBookPro12,1, BootROM 186.0.0.0.0, 2 processors, Intel Core i5, 2,9 GHz, 8 GB, SMC 2.28f7
Graphics: kHW_IntelIris6100Item, Intel Iris Graphics 6100, spdisplays_builtin
Memory Module: BANK 0/DIMM0, 4 GB, DDR3, 1867 MHz, 0x80AD, 0x483943434E4E4E424C54424C41522D4E5544
Memory Module: BANK 1/DIMM0, 4 GB, DDR3, 1867 MHz, 0x80AD, 0x483943434E4E4E424C54424C41522D4E5544
AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x133), Broadcom BCM43xx 1.0 (7.77.61.2 AirPortDriverBrcmNIC-1305.8)
Bluetooth: Version 6.0.14d3, 3 services, 27 devices, 1 incoming serial ports
Network Service: Wi-Fi, AirPort, en0
Serial ATA Device: APPLE SSD SM0512G, 500,28 GB
USB Device: USB 3.0 Bus
USB Device: Bluetooth USB Host Controller
USB Device: iPhone
Thunderbolt Bus: MacBook Pro, Apple Inc., 27.1

回答by alxlives

So, I found that inside this folder:

所以,我发现在这个文件夹中:

~/Library/Developer/Xcode/iOS DeviceSupport

Xcode creates cache folders for all the physical devices symbols it paired.

Xcode 为其配对的所有物理设备符号创建缓存文件夹。

This folder remains even if you uninstall Xcode, and the cache is reused even when you install other versions of the software.

即使您卸载 Xcode,该文件夹也会保留,即使您安装其他版本的软件,缓存也会被重用。

Deleting the folders content made Xcode download the symbols again, run prepare debug support for the devicephase and reset the device connection, solving the problem.

删除文件夹内容使Xcode重新下载符号,运行prepare debug support for the device阶段并重置设备连接,解决问题。

回答by Kehlin Swain

According to @alxlives 'Deleting the folders content made Xcode download the symbols again, run prepare debug support for the device phase and reset the device connection, solving the problem.' This solution solved the problem for me. Here is a terminal command to remove all contents inside of the folder.

根据@alxlives '删除文件夹内容使Xcode再次下载符号,运行准备调试支持设备阶段并重置设备连接,解决问题。' 这个解决方案为我解决了这个问题。这是一个终端命令,用于删除文件夹内的所有内容。

rm -r ~/Library/Developer/Xcode/iOS\ DeviceSupport/

This commands remove all files that are located inside of the Device Support folderl.

此命令删除位于设备支持文件夹内的所有文件。

回答by Chris J

I was having this issue with Xcode 11.1 and an iPhone XR running iOS 13.2.3 (iPad running that OS version was fine). The accepted answer didn't work for me. Upgrading to Xcode 11.2.1 fixed it.

我在 Xcode 11.1 和运行 iOS 13.2.3 的 iPhone XR 上遇到了这个问题(运行该操作系统版本的 iPad 很好)。接受的答案对我不起作用。升级到 Xcode 11.2.1 修复了它。

回答by Harshil Kotecha

I was having the same crash on XCode 11.3 . I went on to "Show package contents" (right click on) of the ".xcworkspace"workspace directory and deleted "xcuserdata"folder. This resolved the crash for me.

我在 XCode 11.3 上遇到了同样的崩溃。我继续".xcworkspace"工作区目录和已删除"xcuserdata"文件夹的“显示包内容”(右键单击)。这为我解决了崩溃。

回答by user3877214

1.Go to Project Folder enter image description here

1.转到项目文件夹 在此处输入图片说明

2.Right-click on xcodeproj enter image description here

2.右键单击xcodeproj 在此处输入图片说明

3.Click Show package Content enter image description here

3.点击显示包内容 在此处输入图片说明

4.Delete xcuserdata directory enter image description here

4.删除xcuserdata目录 在此处输入图片说明