来自com.apple.xpc.activity.com.apple.cloudkit.scheduler.com.apple.coredata.cloudkit.activity.export的EXC_BAD_INSTRUCTION [英] EXC_BAD_INSTRUCTION from com.apple.xpc.activity.com.apple.cloudkit.scheduler.com.apple.coredata.cloudkit.activity.export

查看:134
本文介绍了来自com.apple.xpc.activity.com.apple.cloudkit.scheduler.com.apple.coredata.cloudkit.activity.export的EXC_BAD_INSTRUCTION的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个可以在iOS上正常运行的应用程序,但是当使用催化剂运行时,如果我在macOS上滑动到另一个虚拟桌面,然后滑回大约10次,它会间歇性地出现此崩溃.它通常发生在UICollectionViewController

I have an app that runs fine on iOS, but when running with catalyst, it gives me this crash intermittently if I swipe to another virtual Desktop on macOS, and then back, for about 10 times. It mostly happens on a UICollectionViewController

这是回溯:

(lldb) bt
* thread #5, queue = 'com.apple.xpc.activity.com.apple.cloudkit.scheduler.com.apple.coredata.cloudkit.activity.export', stop reason = EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)
  * frame #0: 0x00007fff68c373ae libxpc.dylib`___xpc_activity_dispatch_block_invoke.107.cold.3 + 19
    frame #1: 0x00007fff68c1ecdb libxpc.dylib`___xpc_activity_dispatch_block_invoke.107 + 746
    frame #2: 0x00000001010377b3 libdispatch.dylib`_dispatch_call_block_and_release + 12
    frame #3: 0x000000010103878f libdispatch.dylib`_dispatch_client_callout + 8
    frame #4: 0x000000010103fd31 libdispatch.dylib`_dispatch_lane_serial_drain + 777
    frame #5: 0x0000000101040ae8 libdispatch.dylib`_dispatch_lane_invoke + 438
    frame #6: 0x000000010104df2e libdispatch.dylib`_dispatch_workloop_worker_thread + 681
    frame #7: 0x00000001010c4053 libsystem_pthread.dylib`_pthread_wqthread + 290
    frame #8: 0x00000001010c3eb3 libsystem_pthread.dylib`start_wqthread + 15
(lldb) 

我尝试查看代码,添加打印语句,添加断点,注释掉某些部分等,试图找出代码的哪一部分导致了此问题,但到目前为止仍然失败.

I have tried reviewing the codes, adding print statements, adding breakpoints, commenting out certain parts etc, trying to figure out which part of my code causes this, but failed so far.

我正在使用iOS 13中的NSPersistentCloudKitContainer.堆栈跟踪是否指向其中的错误?

I am using NSPersistentCloudKitContainer from iOS 13. Does the stack trace points to a bug inside there?

推荐答案

我已经浪费了很多时间试图理解问题的根源,并希望这个答案对其他人有帮助.

I've wasted so much time trying to understand the source of the problem and hope that this answer helps many others.

这个问题似乎已经存在很长时间了,并且尚未得到解决或理解.但是我在评论中读到的一个重要提示: 仅当在Xcode中运行应用程序时才会发生崩溃.

This problems seems to persist now since a long time and has not been fixed, nor understood. But the big hint I've read in the comments: This crash happens only when the app is run from within Xcode.

另一个重要提示:您可以直接从Finder运行构建产品而不会崩溃.即使它是调试"版本.

Another important hint: You can can run your build product directly from Finder without crashing. Even if it is a "Debug" build.

基于此,我得出的结论是该问题与Debug执行环境有关,并且找到了解决方案:禁用此应用程序使用的Debug XPC服务"
此选项使用的调试代码中肯定存在一些错误.

Based on this, I've come to the conclusion that the problem is related to the Debug execution environment and I found the solution: Disable "Debug XPC services used by this application"
There must be some bug in the debugging code used by this option.

您可以在目标方案中找到此选项.

You can find this option in your targets scheme.

  1. 在窗口栏中单击您的目标
  2. 选择编辑方案..."
  3. 确保已选中运行",并取消选中调试此应用程序使用的XPC服务"的选中标记.

我希望这对大家有帮助!

I hope this helps everybody!

这篇关于来自com.apple.xpc.activity.com.apple.cloudkit.scheduler.com.apple.coredata.cloudkit.activity.export的EXC_BAD_INSTRUCTION的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆