objective-c - 使用 PDFView 的意外出色背景 CATransaction
问题描述
再会,
我正在编写一个 macOS 应用程序,PDFKit PDFView
但我经常遇到Unexpected outstanding background CATransaction
快速滚动PDFView
SO上的大多数答案都指向在后台线程中更新UI,或在后台线程中更新绑定。但是我没有绑定或任何KVC
类。我已经删除了所有dispatch_async
调用,因此我的应用程序完全在主线程中运行,但仍然发生崩溃。
其他答案说这是操作系统中的错误。如果是这样,它是否已修复或何时修复(尽管我的机器无法运行最新的操作系统)或者同时解决了什么问题。
lldb
NSScreenUpdate
显示由于断言失败而中止调用的线程队列。
该线程的堆栈跟踪如下;
* thread #15, queue = 'NSScreenUpdate', stop reason = signal SIGABRT
* frame #0: 0x00007fff52390b66 libsystem_kernel.dylib`__pthread_kill + 10
frame #1: 0x0000000100abb0f0 libsystem_pthread.dylib`pthread_kill + 333
frame #2: 0x00007fff522ec1ae libsystem_c.dylib`abort + 127
frame #3: 0x00007fff3570af8e QuartzCore`CA::Transaction::assert_inactive() + 858
frame #4: 0x00007fff28224d12 AppKit`__42-[_NSScrollingConcurrentVBLMonitor resume]_block_invoke.131 + 228
frame #5: 0x0000000100a3bd8f libdispatch.dylib`_dispatch_client_callout + 8
frame #6: 0x0000000100a503d2 libdispatch.dylib`_dispatch_continuation_pop + 940
frame #7: 0x0000000100a3e48f libdispatch.dylib`_dispatch_source_invoke + 658
frame #8: 0x0000000100a5014f libdispatch.dylib`_dispatch_continuation_pop + 297
frame #9: 0x0000000100a4741a libdispatch.dylib`_dispatch_async_redirect_invoke + 738
frame #10: 0x0000000100a3dbea libdispatch.dylib`_dispatch_root_queue_drain + 723
frame #11: 0x0000000100a3d8c3 libdispatch.dylib`_dispatch_worker_thread3 + 116
frame #12: 0x0000000100ab816d libsystem_pthread.dylib`_pthread_wqthread + 1387
frame #13: 0x0000000100ab7bed libsystem_pthread.dylib`start_wqthread + 13
Program ended with exit code: 9
我无法在我的代码中看到任何引用这些符号的任何内容。我也尝试过CATransactionDisableActions
在PDFView
我试过Instruments
在它上面运行,但我找不到任何不寻常的地方。
即使在错误和堆栈跟踪中搜索重要词的混合也没有结果。
希望有人可以指出我解决此问题的下一步。
谢谢你(读到这里)
解决方案
推荐阅读
- git - 将主分支合并到功能分支 - 在多行中发现 TAB 致命
- docker - 如何创建一个可以运行 docker 容器的 Debian docker 容器?
- ruby-on-rails - 未找到 Rspec 命令
- python - 使用时间和numpy时使用Python API在外部C函数中出现Dymola Segfault
- ruby-on-rails - 在 URL 中自动使用模型属性生成路由
- reactjs - 将 props 传递给 material-ui 样式
- php - 使用 PHP 表单插入数据时忽略空输入
- angular - 用来自另一个界面的数据填充选择
- css - 如何使我的搜索框图标与我的搜索框输入对齐?
- javascript - 添加/删除类会导致输入内容消失