gpt4 book ai didi

ios - GLKViewController 在几个小时后挂起

转载 作者:行者123 更新时间:2023-12-03 11:16:14 32 4
gpt4 key购买 nike

我的 iOS 应用程序使用 GLKViewController 来显示从本地网络上的外部相机流接收的数据。但是,几个小时后它挂起并且应用程序变得没有响应。如果我在调试器上暂停执行,我可以看到应用程序实际上正在运行(例如网络线程处于事件状态),但没有触发 Update 和 DrawInRect 方法,并且主线程似乎卡住了。

特别是,回溯线程会产生与 GPU 相关的线程相关的输出:


thread #1, queue = 'gputools.DYSharedMemoryTransport.0x102d00000.send', stop reason = instruction step over
* frame #0: 0x00000001f88c559c libsystem_c.dylib`nanosleep + 160
frame #1: 0x00000001f88c54a4 libsystem_c.dylib`usleep + 64
frame #2: 0x0000000102933780 GPUToolsCore`-[DYSharedMemoryTransport _waitEAGAIN] + 40
frame #3: 0x0000000102957510 GPUToolsCore`-[DYBaseStreamTransport _writeBuffers:] + 232
frame #4: 0x0000000102957b00 GPUToolsCore`-[DYBaseStreamTransport _sendMessage:error:] + 508
frame #5: 0x0000000102946064 GPUToolsCore`__63-[DYTransport send:inReplyTo:error:replyQueue:timeout:handler:]_block_invoke.223 + 116
frame #6: 0x0000000102314de4 libdispatch.dylib`_dispatch_client_callout + 16
frame #7: 0x0000000102323d18 libdispatch.dylib`_dispatch_sync_invoke_and_complete_recurse + 132
frame #8: 0x0000000102945e38 GPUToolsCore`-[DYTransport send:inReplyTo:error:replyQueue:timeout:handler:] + 644
frame #9: 0x0000000102932530 GPUToolsCore`-[DYSharedMemoryTransport send:inReplyTo:error:replyQueue:timeout:handler:] + 252
frame #10: 0x00000001024a5120 libglInterpose.dylib`handle_frame_boundary + 472
frame #11: 0x00000001026917a0 libglInterpose.dylib`_EAGLContext_PresentInterposeCommon(EAGLContext*, unsigned int, unsigned long, double, bool () block_pointer) + 988
frame #12: 0x000000010268f074 libglInterpose.dylib`EAGLContext_presentRenderbuffer(EAGLContext*, objc_selector*, unsigned long) + 80
frame #13: 0x0000000205f8192c GLKit`-[GLKView _display:] + 308
frame #14: 0x0000000205f82b08 GLKit`-[GLKViewController _updateAndDraw] + 520
frame #15: 0x000000010293d66c GPUToolsCore`-[DYDisplayLinkInterposer forwardDisplayLinkCallback:] + 176
frame #16: 0x00000001fd270574 QuartzCore`CA::Display::DisplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long) + 828
frame #17: 0x00000001f901a58c IOKit`IODispatchCalloutFromCFMessage + 488
frame #18: 0x00000001f8d223e4 CoreFoundation`__CFMachPortPerform + 188
frame #19: 0x00000001f8d49c30 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 56
frame #20: 0x00000001f8d4937c CoreFoundation`__CFRunLoopDoSource1 + 440
frame #21: 0x00000001f8d44134 CoreFoundation`__CFRunLoopRun + 2140
frame #22: 0x00000001f8d435b8 CoreFoundation`CFRunLoopRunSpecific + 436
frame #23: 0x00000001fafb7584 GraphicsServices`GSEventRunModal + 100
frame #24: 0x0000000225383558 UIKitCore`UIApplicationMain + 212
frame #25: 0x0000000100471798 KiberField`main(argc=1, argv=0x000000016f9f7780) at main.m:14:16
frame #26: 0x00000001f8803b94 libdyld.dylib`start + 4


thread #2, name = 'gputools.smt_poll.0x281b4a8a0'
frame #0: 0x00000001f8950428 libsystem_kernel.dylib`__semwait_signal + 8
frame #1: 0x00000001f88c55d0 libsystem_c.dylib`nanosleep + 212
frame #2: 0x00000001f88c54a4 libsystem_c.dylib`usleep + 64
frame #3: 0x0000000102932df4 GPUToolsCore`smt_poll_thread_entry(void*) + 136
frame #4: 0x00000001f89d42fc libsystem_pthread.dylib`_pthread_body + 128
frame #5: 0x00000001f89d425c libsystem_pthread.dylib`_pthread_start + 48
frame #6: 0x00000001f89d7d08 libsystem_pthread.dylib`thread_start + 4


thread #3, name = 'gputools.smt_poll.0x281b58ce0'
frame #0: 0x00000001f8950428 libsystem_kernel.dylib`__semwait_signal + 8
frame #1: 0x00000001f88c55d0 libsystem_c.dylib`nanosleep + 212
frame #2: 0x00000001f88c54a4 libsystem_c.dylib`usleep + 64
frame #3: 0x0000000102932df4 GPUToolsCore`smt_poll_thread_entry(void*) + 136
frame #4: 0x00000001f89d42fc libsystem_pthread.dylib`_pthread_body + 128
frame #5: 0x00000001f89d425c libsystem_pthread.dylib`_pthread_start + 48
frame #6: 0x00000001f89d7d08 libsystem_pthread.dylib`thread_start + 4

我的问题是:什么可能阻塞线程?
或者,我可以通过在另一个线程中检查超时计时器来检测此死锁:有没有办法解除图形线程的阻塞(例如手动调用 Update 或其他任何方法)?

最佳答案

我也遇到了这个问题。我在webrtc中使用'RTCEAGLVideoView'来显示视频图像。主线程似乎不再获得cpu时间了!这可能是iPadOS 13中的错误吗?

关于ios - GLKViewController 在几个小时后挂起,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58215087/

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com