Open Monkey-Sun opened 2 years ago
重新编辑一下,麻烦大佬空了帮忙看下
能否将 UIView + VAP.m里hwd_renderVideoRun方法的 dispatch_sync(dispatch_get_main_queue() 换成 async的方式?我看堆栈报错是前面sync住线程1, 后面[commandBuffer commit]后,又往thread1 提交一个同步任务到thread-1 导致卡死。
dispatch_sync(dispatch_get_main_queue(), ^{ nextFrame = [self hwd_displayNext]; });
能否将 UIView + VAP.m里hwd_renderVideoRun方法的 dispatch_sync(dispatch_get_main_queue() 换成 async的方式?我看堆栈报错是前面sync住线程1, 后面[commandBuffer commit]后,又往thread1 提交一个同步任务到thread-1 导致卡死。
dispatch_sync(dispatch_get_main_queue(), ^{ nextFrame = [self hwd_displayNext]; });
不可以,这里需要同步的方式拿到nextFrame,后面要使用该对象的值。另外这里堆栈的线程thread1是系统线程,和同步的这个线程不是同一个。这里应该不是死锁问题,具体是啥原因,目前不太清楚。
(void)hwd_renderVideoRun {
static NSTimeInterval durationForWaitingFrame = 16/1000.0; static NSTimeInterval minimumDurationForLoop = 1/1000.0; block NSTimeInterval lastRenderingInterval = 0; block NSTimeInterval lastRenderingDuration = 0;
dispatch_async(self.vap_renderQueue, ^{ if ([[NSThread currentThread] isMainThread]) { [self hwd_renderVideoRun]; return; } // 原代码逻辑 }
self.vap_renderQueue 是个串行队列,只是保证任务是串行执行的,但是调度的线程是任意线程。如果调度到了主线程,然后sync操作先把主线程锁住,后续commit后再sync 主线程,就SIGSTOP了。 这样尝试修复一下是否合理,如果当前线程是主线程,再走一次aync,直到async到非主线程,再执行后续操作。因为sync了子线程,不影响后续sync到主线程。
我自己模拟了死锁。
self.lock = [NSLock new]; [self.lock lock]; dispatch_aync(dispatch_get_main_queue(), ^{ [self.lock lock]; });
这个是会触发SIGSTOP 的。
有没有完整的日志文件,有的话可以贴一下
(lldb) bt all
__semwait_signal + 8 frame ---1: 0x00000001b0f3d7bc libsystem_c.dylib
nanosleep + 216
frame ---2: 0x00000001b0f3d68c libsystem_c.dylibusleep + 68 frame ---3: 0x0000000110c2eb70 libMTLCapture.dylib
_lldb_unnamedsymbol2227$$libMTLCapture.dylib + 44
frame ---4: 0x0000000110c2c97c libMTLCapture.dylib`lldb_unnamed_symbol2180$$libMTLCapture.dylib + 276
frame ---5: 0x0000000110c2ce3c libMTLCapture.dylib___lldb_unnamed_symbol2182$$libMTLCapture.dylib + 428 frame ---6: 0x0000000110c2af18 libMTLCapture.dylib
_lldb_unnamed_symbol2127$$libMTLCapture.dylib + 104
frame ---7: 0x0000000121dbd5f0 libdispatch.dylib_dispatch_client_callout + 20 frame ---8: 0x0000000121dcdd50 libdispatch.dylib
_dispatch_sync_invoke_and_complete_recurse + 184
frame ---9: 0x0000000110c2ada0 libMTLCapture.dylib___lldb_unnamed_symbol2124$$libMTLCapture.dylib + 608 frame ---10: 0x0000000110c2d9b4 libMTLCapture.dylib
_lldb_unnamed_symbol2206$$libMTLCapture.dylib + 236
frame ---11: 0x0000000110bf90ac libMTLCapture.dylib___lldb_unnamed_symbol992$$libMTLCapture.dylib + 1056 frame ---12: 0x0000000110c0f3b4 libMTLCapture.dylib
_lldb_unnamedsymbol1417$$libMTLCapture.dylib + 116
frame ---13: 0x0000000110bdf6a4 libMTLCapture.dylib`lldb_unnamed_symbol676$$libMTLCapture.dylib + 260
frame ---14: 0x0000000110bdf584 libMTLCapture.dylib`___lldb_unnamed_symbol675$$libMTLCapture.dylib + 168
-[QGHWDMetalRenderer renderPixelBuffer:metalLayer:](self=0x0000000281a5d880, _cmd="renderPixelBuffer:metalLayer:", pixelBuffer=0x00000002807a8fa0, layer=0x0000000283233c80) at QGHWDMetalRenderer.m:285:5 frame ---16: 0x00000001050cf84c MyApp
-[QGHWDMetalView display:](self=0x000000015b1ff550, _cmd="display:", pixelBuffer=0x00000002807a8fa0) at QGHWDMetalView.m:113:5
frame ---17: 0x00000001050f4604 MyApp-[UIView(self=0x0000000122a6ad60, _cmd="hwd_displayNext") hwd_displayNext] at UIView+VAP.m:439:9 frame ---18: 0x00000001050f422c MyApp
33-[UIView(.block_descriptor=0x000000016dfee808) hwd_renderVideoRun]_block_invoke.282 at UIView+VAP.m:393:33
frame ---19: 0x0000000121dbd5f0 libdispatch.dylib_dispatch_client_callout + 20 frame ---20: 0x0000000121dcd99c libdispatch.dylib
_dispatch_async_and_wait_invoke + 220
frame ---21: 0x0000000121dbd5f0 libdispatch.dylib_dispatch_client_callout + 20 frame ---22: 0x0000000121dcc890 libdispatch.dylib
_dispatch_main_queue_callback_4CF + 1000
frame ---23: 0x00000001a7dbb1e4 CoreFoundation`CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE + 16
frame ---24: 0x00000001a7db53b4 CoreFoundation`CFRunLoopRun + 2508
frame ---25: 0x00000001a7db44bc CoreFoundationCFRunLoopRunSpecific + 600 frame ---26: 0x00000001be839820 GraphicsServices
GSEventRunModal + 164
frame ---27: 0x00000001aa758734 UIKitCore-[UIApplication _run] + 1072 frame ---28: 0x00000001aa75de10 UIKitCore
UIApplicationMain + 168
frame ---29: 0x00000001027723f4 MyAppmain(argc=1, argv=0x000000016d84b7e0) at main.m:15:16 frame ---30: 0x00000001a7a7be60 libdyld.dylib
start + 4
thread ---3, name = 'gputools.smt_poll.0x2836c07e0'
frame ---0: 0x00000001d3d67d30 libsystem_kernel.dylib__semwait_signal + 8 frame ---1: 0x00000001b0f3d7bc libsystem_c.dylib
nanosleep + 216
frame ---2: 0x00000001b0f3d68c libsystem_c.dylibusleep + 68 frame ---3: 0x0000000110c2e1e0 libMTLCapture.dylib
_lldb_unnamed_symbol2216$$libMTLCapture.dylib + 108
frame ---4: 0x00000001ef38eca8 libsystem_pthread.dylib_pthread_start + 320 thread ---8, name = 'com.apple.uikit.eventfetch-thread' frame ---0: 0x00000001d3d43dd0 libsystem_kernel.dylib
mach_msg_trap + 8
frame ---1: 0x00000001d3d43184 libsystem_kernel.dylibmach_msg + 76 frame ---2: 0x00000001a7dbacf8 CoreFoundation
CFRunLoopServiceMachPort + 380
frame ---3: 0x00000001a7db4ea8 CoreFoundation`CFRunLoopRun + 1216
frame ---4: 0x00000001a7db44bc CoreFoundationCFRunLoopRunSpecific + 600 frame ---5: 0x00000001a9031e30 Foundation
-[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 232
frame ---6: 0x00000001a9031d08 Foundation-[NSRunLoop(NSRunLoop) runUntilDate:] + 92 frame ---7: 0x00000001aa808e94 UIKitCore
-[UIEventFetcher threadMain] + 516
frame ---8: 0x00000001a919c0f0 Foundation__NSThread__start__ + 864 frame ---9: 0x00000001ef38eca8 libsystem_pthread.dylib
_pthread_start + 320
thread ---9
frame ---0: 0x00000001d3d6775c libsystem_kernel.dylib__psynch_cvwait + 8 frame ---1: 0x00000001ef392550 libsystem_pthread.dylib
_pthread_cond_wait + 1192
frame ---2: 0x00000001025e1294 MyApp-[YppMonitor run](self=0x00000002812d0000, _cmd="run") at YppMonitor.m:131:17 frame ---3: 0x00000001a919c0f0 Foundation
NSThreadstart + 864
frame ---4: 0x00000001ef38eca8 libsystem_pthread.dylib_pthread_start + 320 thread ---16, name = 'com.apple.NSURLConnectionLoader' frame ---0: 0x00000001d3d43dd0 libsystem_kernel.dylib
mach_msg_trap + 8
frame ---1: 0x00000001d3d43184 libsystem_kernel.dylibmach_msg + 76 frame ---2: 0x00000001a7dbacf8 CoreFoundation
CFRunLoopServiceMachPort + 380
frame ---3: 0x00000001a7db4ea8 CoreFoundation__CFRunLoopRun + 1216 frame ---4: 0x00000001a7db44bc CoreFoundation
CFRunLoopRunSpecific + 600
frame ---5: 0x00000001a866d050 CFNetwork`_lldb_unnamed_symbol11376$$CFNetwork + 572
frame ---6: 0x00000001a919c0f0 Foundation__NSThread__start__ + 864 frame ---7: 0x00000001ef38eca8 libsystem_pthread.dylib
_pthread_start + 320
thread ---17, name = 'AVAudioSession Notify Thread'
frame ---0: 0x00000001d3d43dd0 libsystem_kernel.dylibmach_msg_trap + 8 frame ---1: 0x00000001d3d43184 libsystem_kernel.dylib
mach_msg + 76
frame ---2: 0x00000001a7dbacf8 CoreFoundation__CFRunLoopServiceMachPort + 380 frame ---3: 0x00000001a7db4ea8 CoreFoundation
CFRunLoopRun + 1216
frame ---4: 0x00000001a7db44bc CoreFoundationCFRunLoopRunSpecific + 600 frame ---5: 0x00000001af6562ac AudioSession
GenericRunLoopThread::Entry(void) + 164
frame ---6: 0x00000001af658390 AudioSession`CAPThread::Entry(CAPThread) + 92
frame ---7: 0x00000001ef38eca8 libsystem_pthread.dylib_pthread_start + 320 thread ---18 frame ---0: 0x00000001d3d694e4 libsystem_kernel.dylib
kevent + 8
frame ---1: 0x00000001125bf8dc MercuryFrameworkboost::asio::detail::kqueue_reactor::run(long, boost::asio::detail::op_queue<boost::asio::detail::scheduler_operation>&) + 268 frame ---2: 0x00000001125bf6c8 MercuryFramework
boost::asio::detail::scheduler::do_run_one(boost::asio::detail::conditionally_enabled_mutex::scoped_lock&, boost::asio::detail::scheduler_thread_info&, boost::system::error_code const&) + 268
frame ---3: 0x00000001125bf3cc MercuryFrameworkboost::asio::detail::scheduler::run(boost::system::error_code&) + 236 frame ---4: 0x00000001125c02a0 MercuryFramework
void* std::1::thread_proxy<std::1::tuple<std::1::unique_ptr<std::1::thread_struct, std::__1::default_delete<std::1::thread_struct> >, IoService::Start()::$_0> >(void*) + 76
frame ---5: 0x00000001ef38eca8 libsystem_pthread.dylib_pthread_start + 320 thread ---19, name = 'com.autonavi.AMapLocationThread' frame ---0: 0x00000001d3d43dd0 libsystem_kernel.dylib
mach_msg_trap + 8
frame ---1: 0x00000001d3d43184 libsystem_kernel.dylibmach_msg + 76 frame ---2: 0x00000001a7dbacf8 CoreFoundation
CFRunLoopServiceMachPort + 380
frame ---3: 0x00000001a7db4ea8 CoreFoundation__CFRunLoopRun + 1216 frame ---4: 0x00000001a7db44bc CoreFoundation
CFRunLoopRunSpecific + 600
frame ---5: 0x00000001a9031e30 Foundation-[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 232 frame ---6: 0x00000001a906479c Foundation
-[NSRunLoop(NSRunLoop) run] + 92
frame ---7: 0x00000001078129bc MyApp+[AMapLocationCLMDelegate threadEntryPoint:] + 216 frame ---8: 0x00000001a919c0f0 Foundation
NSThreadstart + 864
frame ---9: 0x00000001ef38eca8 libsystem_pthread.dylib_pthread_start + 320 thread ---20, name = 'com.apple.CFSocket.private' frame ---0: 0x00000001d3d67c40 libsystem_kernel.dylib
select + 8
frame ---1: 0x00000001a7dc7688 CoreFoundation__CFSocketManager + 636 frame ---2: 0x00000001ef38eca8 libsystem_pthread.dylib
_pthread_start + 320
thread ---26, name = 'GTSDKThread'
frame ---0: 0x00000001d3d43dd0 libsystem_kernel.dylibmach_msg_trap + 8 frame ---1: 0x00000001d3d43184 libsystem_kernel.dylib
mach_msg + 76
frame ---2: 0x00000001a7dbacf8 CoreFoundation__CFRunLoopServiceMachPort + 380 frame ---3: 0x00000001a7db4ea8 CoreFoundation
CFRunLoopRun + 1216
frame ---4: 0x00000001a7db44bc CoreFoundationCFRunLoopRunSpecific + 600 frame ---5: 0x00000001a9031e30 Foundation
-[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 232
frame ---6: 0x0000000107a2b2b0 MyApp-[GTSThread main] + 228 frame ---7: 0x00000001a919c0f0 Foundation
NSThreadstart + 864
frame ---8: 0x00000001ef38eca8 libsystem_pthread.dylib_pthread_start + 320 thread ---30 frame ---0: 0x00000001d3d6775c libsystem_kernel.dylib
psynch_cvwait + 8
frame ---1: 0x00000001ef392550 libsystem_pthread.dylib_pthread_cond_wait + 1192 frame ---2: 0x0000000112a05e0c NIMSDK
nbase::ConditionVariable::TimedWait(nbase::TimeDelta const&) + 184
frame ---3: 0x0000000112a08608 NIMSDKnbase::WaitableEvent::WaitTimeout(nbase::TimeDelta const&) + 248 frame ---4: 0x0000000112a05b9c NIMSDK
nbase::DefaultMessagePump::Run(nbase::MessagePump::Delegate) + 176
frame ---5: 0x00000001129ff2c4 NIMSDKnbase::MessageLoop::Run() + 76 frame ---6: 0x0000000112a0be5c NIMSDK
nbase::FrameworkThread::Run() + 120
frame ---7: 0x0000000112a16958 NIMSDK`nbase::Thread::ThreadProcFunc(void) + 24
frame ---8: 0x00000001ef38eca8 libsystem_pthread.dylib_pthread_start + 320 thread ---31 frame ---0: 0x00000001d3d69c8c libsystem_kernel.dylib
poll + 8
frame ---1: 0x0000000112c940c4 NIMSDKpoll_dispatch + 188 frame ---2: 0x0000000112c8ccf0 NIMSDK
event_base_loop + 1040
frame ---3: 0x00000001129fe600 NIMSDKnbase::LibeventMessagePump::Run(nbase::MessagePump::Delegate*) + 336 frame ---4: 0x00000001129ff2c4 NIMSDK
nbase::MessageLoop::Run() + 76
frame ---5: 0x0000000112a0be5c NIMSDKnbase::FrameworkThread::Run() + 120 frame ---6: 0x0000000112a16958 NIMSDK
nbase::Thread::ThreadProcFunc(void*) + 24
frame ---7: 0x00000001ef38eca8 libsystem_pthread.dylib_pthread_start + 320 thread ---32, name = 'GtAsyncSocket-CFStream' frame ---0: 0x00000001d3d43dd0 libsystem_kernel.dylib
mach_msg_trap + 8
frame ---1: 0x00000001d3d43184 libsystem_kernel.dylibmach_msg + 76 frame ---2: 0x00000001a7dbacf8 CoreFoundation
CFRunLoopServiceMachPort + 380
frame ---3: 0x00000001a7db4ea8 CoreFoundation__CFRunLoopRun + 1216 frame ---4: 0x00000001a7db44bc CoreFoundation
CFRunLoopRunSpecific + 600
frame ---5: 0x00000001a9031e30 Foundation-[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 232 frame ---6: 0x00000001079def64 MyApp
+[GtAsyncSocket cfstreamThread] + 360
frame ---7: 0x00000001a919c0f0 Foundation__NSThread__start__ + 864 frame ---8: 0x00000001ef38eca8 libsystem_pthread.dylib
_pthread_start + 320
thread ---33, name = 'WCDB-checkpoint'
frame ---0: 0x00000001d3d6775c libsystem_kernel.dylib__psynch_cvwait + 8 frame ---1: 0x00000001ef392550 libsystem_pthread.dylib
_pthread_cond_wait + 1192
frame ---2: 0x00000001bbf56c8c libc++.1.dylibstd::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 28 frame ---3: 0x00000001052bae38 MyApp
WCDB::TimedQueue<std::1::basic_string<char, std::__1::char_traitsWCDB::Database::$_3::operator(this=0x0000000283485410)(std::__1::shared_ptr<WCDB::Handle>&, WCDB::Error&) const::'lambda'(WCDB::Handle*, int, void*)::operator()(WCDB::Handle*, int, void*) const::'lambda'()::operator()() const at database_config.cpp:214:43 frame ---5: 0x00000001052bacf4 MyApp
decltype(f=0x0000000283485410)(std::1::shared_ptrvoid std::__1::__thread_execute<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, WCDB::Database::$_3::operator()(std::__1::shared_ptr<WCDB::Handle>&, WCDB::Error&) const::'lambda'(WCDB::Handle*, int, void*)::operator()(WCDB::Handle*, int, void*) const::'lambda'()>(__t=size=2, (null)=__tuple_indices<> @ 0x000000016e9c6f7f)(std::__1::shared_ptr<WCDB::Handle>&, WCDB::Error&) const::'lambda'(WCDB::Handle*, int, void*)::operator()(WCDB::Handle*, int, void*) const::'lambda'()>&, std::__1::__tuple_indices<>) at thread:286:5 frame ---7: 0x00000001052ba4a4 MyApp
void std::1::thread_proxy<std::1::tuple<std::1::unique_ptr<std::1::thread_struct, std::__1::default_delete_pthread_start + 320 thread ---34, name = 'com.ibireme.webimage.request' frame ---0: 0x00000001d3d43dd0 libsystem_kernel.dylib
mach_msg_trap + 8
frame ---1: 0x00000001d3d43184 libsystem_kernel.dylibmach_msg + 76 frame ---2: 0x00000001a7dbacf8 CoreFoundation
CFRunLoopServiceMachPort + 380
frame ---3: 0x00000001a7db4ea8 CoreFoundation__CFRunLoopRun + 1216 frame ---4: 0x00000001a7db44bc CoreFoundation
CFRunLoopRunSpecific + 600
frame ---5: 0x00000001a9031e30 Foundation-[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 232 frame ---6: 0x00000001a906479c Foundation
-[NSRunLoop(NSRunLoop) run] + 92
frame ---7: 0x00000001026bbb70 MyApp+[YYWebImageOperation _networkThreadMain:](self=YYWebImageOperation, _cmd="_networkThreadMain:", object=0x0000000000000000) at YYWebImageOperation.m:200:9 frame ---8: 0x00000001a919c0f0 Foundation
NSThreadstart + 864
frame ---9: 0x00000001ef38eca8 libsystem_pthread.dylib_pthread_start + 320 thread ---37, name = 'AMapNetwork' frame ---0: 0x00000001d3d43dd0 libsystem_kernel.dylib
mach_msg_trap + 8
frame ---1: 0x00000001d3d43184 libsystem_kernel.dylibmach_msg + 76 frame ---2: 0x00000001a7dbacf8 CoreFoundation
CFRunLoopServiceMachPort + 380
frame ---3: 0x00000001a7db4ea8 CoreFoundation__CFRunLoopRun + 1216 frame ---4: 0x00000001a7db44bc CoreFoundation
CFRunLoopRunSpecific + 600
frame ---5: 0x00000001a9031e30 Foundation-[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 232 frame ---6: 0x00000001a906479c Foundation
-[NSRunLoop(NSRunLoop) run] + 92
frame ---7: 0x00000001077d3184 MyApp+[AMapNetworkOperation networkRequestThreadEntryPoint:] + 216 frame ---8: 0x00000001a919c0f0 Foundation
NSThreadstart + 864
frame ---9: 0x00000001ef38eca8 libsystem_pthread.dylib_pthread_start + 320 thread ---43, name = 'JavaScriptCore bmalloc scavenger' frame ---0: 0x00000001d3d6775c libsystem_kernel.dylib
psynch_cvwait + 8
frame ---1: 0x00000001ef392550 libsystem_pthread.dylib_pthread_cond_wait + 1192 frame ---2: 0x00000001bbf56c8c libc++.1.dylib
std::1::condition_variable::wait(std::__1::unique_lock<std::1::mutex>&) + 28
frame ---3: 0x00000001b1e5e188 JavaScriptCorevoid std::__1::condition_variable_any::wait<std::__1::unique_lock<bmalloc::Mutex> >(std::__1::unique_lock<bmalloc::Mutex>&) + 108 frame ---4: 0x00000001b1e62728 JavaScriptCore
bmalloc::Scavenger::threadRunLoop() + 196
frame ---5: 0x00000001b1e62364 JavaScriptCore`bmalloc::Scavenger::threadEntryPoint(bmalloc::Scavenger) + 16
frame ---6: 0x00000001b1e63828 JavaScriptCorevoid* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (*)(bmalloc::Scavenger*), bmalloc::Scavenger*> >(void*) + 48 frame ---7: 0x00000001ef38eca8 libsystem_pthread.dylib
_pthread_start + 320
thread ---46, queue = 'com.sonaroom.messageManager.timer'
frame ---0: 0x00000001d3d43dd0 libsystem_kernel.dylibmach_msg_trap + 8 frame ---1: 0x00000001d3d43184 libsystem_kernel.dylib
mach_msg + 76
frame ---2: 0x00000001a7dbacf8 CoreFoundation__CFRunLoopServiceMachPort + 380 frame ---3: 0x00000001a7db4ea8 CoreFoundation
CFRunLoopRun + 1216
frame ---4: 0x00000001a7db44bc CoreFoundationCFRunLoopRunSpecific + 600 frame ---5: 0x00000001a9031e30 Foundation
-[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 232
frame ---6: 0x00000001a906479c Foundation-[NSRunLoop(NSRunLoop) run] + 92 frame ---7: 0x000000010523bc00 MyApp
41-[SRRoomMessageManager startPollingTimer]_block_invoke(.block_descriptor=0x0000000283bec060) at SRRoomMessageManager.m:69:13
frame ---8: 0x0000000121dbbb68 libdispatch.dylib_dispatch_call_block_and_release + 32 frame ---9: 0x0000000121dbd5f0 libdispatch.dylib
_dispatch_client_callout + 20
frame ---10: 0x0000000121dc4fa8 libdispatch.dylib_dispatch_lane_serial_drain + 736 frame ---11: 0x0000000121dc5cb4 libdispatch.dylib
_dispatch_lane_invoke + 448
frame ---12: 0x0000000121dd1e38 libdispatch.dylib_dispatch_workloop_worker_thread + 1520 frame ---13: 0x00000001ef390908 libsystem_pthread.dylib
_pthread_wqthread + 276
thread ---52, name = 'mt'
frame ---0: 0x00000001d3d69c8c libsystem_kernel.dylibpoll + 8 frame ---1: 0x000000011b0d38f0 ZegoLiveRoom
_lldb_unnamedsymbol14672$$ZegoLiveRoom + 560
frame ---2: 0x000000011b0d7ab4 ZegoLiveRoom`lldb_unnamed_symbol14776$$ZegoLiveRoom + 384
frame ---3: 0x000000011b0d780c ZegoLiveRoom___lldb_unnamed_symbol14772$$ZegoLiveRoom + 20 frame ---4: 0x000000011b0dd180 ZegoLiveRoom
_lldb_unnamed_symbol14910$$ZegoLiveRoom + 48
frame ---5: 0x00000001ef38eca8 libsystem_pthread.dylib_pthread_start + 320 thread ---53, name = 'log' frame ---0: 0x00000001d3d69c8c libsystem_kernel.dylib
poll + 8
frame ---1: 0x000000011b0d38f0 ZegoLiveRoom`_lldb_unnamed_symbol14672$$ZegoLiveRoom + 560
frame ---2: 0x000000011b0d7ab4 ZegoLiveRoom___lldb_unnamed_symbol14776$$ZegoLiveRoom + 384 frame ---3: 0x000000011b0d780c ZegoLiveRoom
_lldb_unnamedsymbol14772$$ZegoLiveRoom + 20
frame ---4: 0x000000011b0dd180 ZegoLiveRoom`lldb_unnamed_symbol14910$$ZegoLiveRoom + 48
frame ---5: 0x00000001ef38eca8 libsystem_pthread.dylib_pthread_start + 320 thread ---54, name = 'hc' frame ---0: 0x00000001d3d69c8c libsystem_kernel.dylib
poll + 8
frame ---1: 0x000000011b0d38f0 ZegoLiveRoom___lldb_unnamed_symbol14672$$ZegoLiveRoom + 560 frame ---2: 0x000000011b0d7ab4 ZegoLiveRoom
_lldb_unnamedsymbol14776$$ZegoLiveRoom + 384
frame ---3: 0x000000011b0d780c ZegoLiveRoom`lldb_unnamed_symbol14772$$ZegoLiveRoom + 20
frame ---4: 0x000000011b0dd180 ZegoLiveRoom___lldb_unnamed_symbol14910$$ZegoLiveRoom + 48 frame ---5: 0x00000001ef38eca8 libsystem_pthread.dylib
_pthread_start + 320
thread ---55, name = 'net'
frame ---0: 0x00000001d3d69c8c libsystem_kernel.dylibpoll + 8 frame ---1: 0x000000011b0d38f0 ZegoLiveRoom
_lldb_unnamedsymbol14672$$ZegoLiveRoom + 560
frame ---2: 0x000000011b0d7ab4 ZegoLiveRoom`lldb_unnamed_symbol14776$$ZegoLiveRoom + 384
frame ---3: 0x000000011b0d780c ZegoLiveRoom___lldb_unnamed_symbol14772$$ZegoLiveRoom + 20 frame ---4: 0x000000011b0dd180 ZegoLiveRoom
_lldb_unnamed_symbol14910$$ZegoLiveRoom + 48
frame ---5: 0x00000001ef38eca8 libsystem_pthread.dylib_pthread_start + 320 thread ---59, name = 'dc' frame ---0: 0x00000001d3d69c8c libsystem_kernel.dylib
poll + 8
frame ---1: 0x000000011b0d38f0 ZegoLiveRoom`_lldb_unnamed_symbol14672$$ZegoLiveRoom + 560
frame ---2: 0x000000011b0d7ab4 ZegoLiveRoom___lldb_unnamed_symbol14776$$ZegoLiveRoom + 384 frame ---3: 0x000000011b0d780c ZegoLiveRoom
_lldb_unnamedsymbol14772$$ZegoLiveRoom + 20
frame ---4: 0x000000011b0dd180 ZegoLiveRoom`lldb_unnamed_symbol14910$$ZegoLiveRoom + 48
frame ---5: 0x00000001ef38eca8 libsystem_pthread.dylib_pthread_start + 320 thread ---61, name = 'ag' frame ---0: 0x00000001d3d69c8c libsystem_kernel.dylib
poll + 8
frame ---1: 0x000000011b0d38f0 ZegoLiveRoom___lldb_unnamed_symbol14672$$ZegoLiveRoom + 560 frame ---2: 0x000000011b0d7ab4 ZegoLiveRoom
_lldb_unnamedsymbol14776$$ZegoLiveRoom + 384
frame ---3: 0x000000011b0d780c ZegoLiveRoom`lldb_unnamed_symbol14772$$ZegoLiveRoom + 20
frame ---4: 0x000000011b0dd180 ZegoLiveRoom___lldb_unnamed_symbol14910$$ZegoLiveRoom + 48 frame ---5: 0x00000001ef38eca8 libsystem_pthread.dylib
_pthread_start + 320
thread ---65
frame ---0: 0x00000001d3d694e4 libsystem_kernel.dylibkevent + 8 frame ---1: 0x00000001125bf8dc MercuryFramework
boost::asio::detail::kqueue_reactor::run(long, boost::asio::detail::op_queueboost::asio::detail::scheduler::do_run_one(boost::asio::detail::conditionally_enabled_mutex::scoped_lock&, boost::asio::detail::scheduler_thread_info&, boost::system::error_code const&) + 268 frame ---3: 0x00000001125bf3cc MercuryFramework
boost::asio::detail::scheduler::run(boost::system::error_code&) + 236
frame ---4: 0x00000001125c02a0 MercuryFrameworkvoid* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, IoService::Start()::$_0> >(void*) + 76 frame ---5: 0x00000001ef38eca8 libsystem_pthread.dylib
_pthread_start + 320
thread ---66, name = 'adev'
frame ---0: 0x00000001d3d6775c libsystem_kernel.dylib__psynch_cvwait + 8 frame ---1: 0x00000001ef392550 libsystem_pthread.dylib
_pthread_cond_wait + 1192
frame ---2: 0x000000011b289af8 ZegoLiveRoom___lldb_unnamed_symbol23696$$ZegoLiveRoom + 188 frame ---3: 0x000000011b289c24 ZegoLiveRoom
_lldb_unnamed_symbol23698$$ZegoLiveRoom + 168
frame ---4: 0x00000001ef38eca8 libsystem_pthread.dylib_pthread_start + 320 thread ---67, name = 'adev' frame ---0: 0x00000001d3d6775c libsystem_kernel.dylib
psynch_cvwait + 8
frame ---1: 0x00000001ef392550 libsystem_pthread.dylib_pthread_cond_wait + 1192 frame ---2: 0x000000011b289af8 ZegoLiveRoom
_lldb_unnamedsymbol23696$$ZegoLiveRoom + 188
frame ---3: 0x000000011b289c24 ZegoLiveRoom`lldb_unnamed_symbol23698$$ZegoLiveRoom + 168
frame ---4: 0x00000001ef38eca8 libsystem_pthread.dylib_pthread_start + 320 thread ---68, name = 'cap_thread' frame ---0: 0x00000001d3d43e0c libsystem_kernel.dylib
semaphore_wait_trap + 8
frame ---1: 0x000000011b2a3414 ZegoLiveRoom___lldb_unnamed_symbol24220$$ZegoLiveRoom + 24 frame ---2: 0x000000011b299e68 ZegoLiveRoom
_lldb_unnamedsymbol24012$$ZegoLiveRoom + 32
frame ---3: 0x000000011b2a4038 ZegoLiveRoom`lldb_unnamed_symbol24242$$ZegoLiveRoom + 60
frame ---4: 0x000000011b2a3ec4 ZegoLiveRoom___lldb_unnamed_symbol24238$$ZegoLiveRoom + 60 frame ---5: 0x000000011b2a3fac ZegoLiveRoom
_lldb_unnamed_symbol24240$$ZegoLiveRoom + 168
frame ---6: 0x00000001ef38eca8 libsystem_pthread.dylib_pthread_start + 320 thread ---69 frame ---0: 0x00000001d3d43dd0 libsystem_kernel.dylib
mach_msg_trap + 8
frame ---1: 0x00000001d3d43184 libsystem_kernel.dylibmach_msg + 76 frame ---2: 0x00000001a7dbacf8 CoreFoundation
CFRunLoopServiceMachPort + 380
frame ---3: 0x00000001a7db4ea8 CoreFoundation`CFRunLoopRun + 1216
frame ---4: 0x00000001a7db44bc CoreFoundationCFRunLoopRunSpecific + 600 frame ---5: 0x00000001a9031e30 Foundation
-[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 232
frame ---6: 0x00000001a906479c Foundation-[NSRunLoop(NSRunLoop) run] + 92 frame ---7: 0x000000011b30fc6c ZegoLiveRoom
_lldb_unnamed_symbol26424$$ZegoLiveRoom + 324
frame ---8: 0x00000001a919c0f0 Foundation__NSThread__start__ + 864 frame ---9: 0x00000001ef38eca8 libsystem_pthread.dylib
_pthread_start + 320
thread ---70, name = 'audio-dev-cap-guard'
frame ---0: 0x00000001d3d43e24 libsystem_kernel.dylibsemaphore_timedwait_trap + 8 frame ---1: 0x000000011b2a40bc ZegoLiveRoom
_lldb_unnamedsymbol24243$$ZegoLiveRoom + 84
frame ---2: 0x000000011b299804 ZegoLiveRoom`lldb_unnamed_symbol23998$$ZegoLiveRoom + 56
frame ---3: 0x000000011b2a4038 ZegoLiveRoom___lldb_unnamed_symbol24242$$ZegoLiveRoom + 60 frame ---4: 0x000000011b2a3ec4 ZegoLiveRoom
_lldb_unnamedsymbol24238$$ZegoLiveRoom + 60
frame ---5: 0x000000011b2a3fac ZegoLiveRoom`lldb_unnamed_symbol24240$$ZegoLiveRoom + 168
frame ---6: 0x00000001ef38eca8 libsystem_pthread.dylib_pthread_start + 320 thread ---71 frame ---0: 0x00000001d3d69c8c libsystem_kernel.dylib
poll + 8
frame ---1: 0x0000000112c940c4 NIMSDKpoll_dispatch + 188 frame ---2: 0x0000000112c8ccf0 NIMSDK
event_base_loop + 1040
frame ---3: 0x00000001129fe600 NIMSDKnbase::LibeventMessagePump::Run(nbase::MessagePump::Delegate*) + 336 frame ---4: 0x00000001129ff2c4 NIMSDK
nbase::MessageLoop::Run() + 76
frame ---5: 0x0000000112a0be5c NIMSDKnbase::FrameworkThread::Run() + 120 frame ---6: 0x0000000112a16958 NIMSDK
nbase::Thread::ThreadProcFunc(void) + 24
frame ---7: 0x00000001ef38eca8 libsystem_pthread.dylib_pthread_start + 320 thread ---73 frame ---0: 0x00000001d3d6775c libsystem_kernel.dylib
psynch_cvwait + 8
frame ---1: 0x00000001ef392550 libsystem_pthread.dylib_pthread_cond_wait + 1192 frame ---2: 0x00000001bbf56c8c libc++.1.dylib
std::__1::condition_variable::wait(std::1::unique_lock___lldb_unnamed_symbol15991$$ZegoLiveRoom + 116 frame ---4: 0x000000011b12da3c ZegoLiveRoom
_lldb_unnamedsymbol15990$$ZegoLiveRoom + 12
frame ---5: 0x000000011b12db38 ZegoLiveRoom`lldb_unnamed_symbol15992$$ZegoLiveRoom + 44
frame ---6: 0x00000001ef38eca8 libsystem_pthread.dylib_pthread_start + 320 thread ---74, name = 'AURemoteIO::IOThread' frame ---0: 0x00000001d3d43dd0 libsystem_kernel.dylib
mach_msg_trap + 8
frame ---1: 0x00000001d3d43184 libsystem_kernel.dylibmach_msg + 76 frame ---2: 0x00000001d7b1ef60 libEmbeddedSystemAUs.dylib
void_pthread_start + 320 thread ---76, name = 'WebThread' frame ---0: 0x00000001d3d43dd0 libsystem_kernel.dylib
mach_msg_trap + 8
frame ---1: 0x00000001d3d43184 libsystem_kernel.dylibmach_msg + 76 frame ---2: 0x00000001a7dbacf8 CoreFoundation
CFRunLoopServiceMachPort + 380
frame ---3: 0x00000001a7db4ea8 CoreFoundation__CFRunLoopRun + 1216 frame ---4: 0x00000001a7db44bc CoreFoundation
CFRunLoopRunSpecific + 600
frame ---5: 0x00000001b514f8d0 WebCoreRunWebThread(void*) + 656 frame ---6: 0x00000001ef38eca8 libsystem_pthread.dylib
_pthread_start + 320
thread ---596, name = 'rtmp-play-tcp'
frame ---0: 0x00000001d3d69c8c libsystemkernel.dylibpoll + 8 frame ---1: 0x000000011b257590 ZegoLiveRoom
lldb_unnamed_symbol22824$$ZegoLiveRoom + 284
frame ---2: 0x000000011b256fa4 ZegoLiveRoom___lldb_unnamed_symbol22813$$ZegoLiveRoom + 104 frame ---3: 0x000000011b2a4038 ZegoLiveRoom
_lldb_unnamedsymbol24242$$ZegoLiveRoom + 60
frame ---4: 0x000000011b2a3ec4 ZegoLiveRoom`lldb_unnamed_symbol24238$$ZegoLiveRoom + 60
frame ---5: 0x000000011b2a3fac ZegoLiveRoom___lldb_unnamed_symbol24240$$ZegoLiveRoom + 168 frame ---6: 0x00000001ef38eca8 libsystem_pthread.dylib
_pthread_start + 320
thread ---597, name = 'dec_thread'
frame ---0: 0x00000001d3d43e0c libsystem_kernel.dylibsemaphore_wait_trap + 8 frame ---1: 0x000000011b2a3414 ZegoLiveRoom
_lldb_unnamedsymbol24220$$ZegoLiveRoom + 24
frame ---2: 0x000000011b2a3ee4 ZegoLiveRoom`lldb_unnamed_symbol24238$$ZegoLiveRoom + 92
frame ---3: 0x000000011b2a3fac ZegoLiveRoom___lldb_unnamed_symbol24240$$ZegoLiveRoom + 168 frame ---4: 0x00000001ef38eca8 libsystem_pthread.dylib
_pthread_start + 320
thread ---826, queue = 'com.qgame.vap.render'
frame ---0: 0x00000001d3d683d0 libsystem_kernel.dylib__ulock_wait + 8 frame ---1: 0x0000000121dbe11c libdispatch.dylib
_dlock_wait + 56
frame ---2: 0x0000000121dbdec8 libdispatch.dylib_dispatch_thread_event_wait_slow + 56 frame ---3: 0x0000000121dcdba4 libdispatch.dylib
DISPATCH_WAIT_FOR_QUEUE + 368
frame ---4: 0x0000000121dcd51c libdispatch.dylib_dispatch_sync_f_slow + 184 frame ---5: 0x00000001050f3fa4 MyApp
33-[UIView(.block_descriptor=0x0000000282828800) hwd_renderVideoRun]_block_invoke at UIView+VAP.m:392:17
frame ---6: 0x0000000121dbbb68 libdispatch.dylib_dispatch_call_block_and_release + 32 frame ---7: 0x0000000121dbd5f0 libdispatch.dylib
_dispatch_client_callout + 20
frame ---8: 0x0000000121dc4fa8 libdispatch.dylib_dispatch_lane_serial_drain + 736 frame ---9: 0x0000000121dc5cb4 libdispatch.dylib
_dispatch_lane_invoke + 448
frame ---10: 0x0000000121dd1e38 libdispatch.dylib_dispatch_workloop_worker_thread + 1520 frame ---11: 0x00000001ef390908 libsystem_pthread.dylib
_pthread_wqthread + 276
thread ---827
frame ---0: 0x00000001ef397774 libsystem_pthread.dylibstart_wqthread thread ---830 frame ---0: 0x00000001d3d685bc libsystem_kernel.dylib
workq_kernreturn + 8
thread ---832
frame ---0: 0x00000001ef397774 libsystem_pthread.dylibstart_wqthread thread ---833 frame ---0: 0x00000001ef397774 libsystem_pthread.dylib
start_wqthread
thread ---836
frame ---0: 0x0000000000000000
(lldb) 卡死后,点暂停再bt all的堆栈。
有没有完整的日志文件,有的话可以贴一下
大佬,有联系方式吗?红包奉上。看了好久没找到根因,头大
卡死后,点暂停再bt all的堆栈。
这个堆栈没有看到主线程的情况,你可以参考https://zhuanlan.zhihu.com/p/347468346 这里看一下'com.qgame.vap.render'这个线程unlock_wait是等的哪一个对象,另外可以分析一下主线程又是什么情况。
你这里是很好复现么?是使用vap demo也可以复现?如果是的话,可以提供一下素材等,我这边调试看一下。
有没有完整的日志文件,有的话可以贴一下
大佬,有联系方式吗?红包奉上。看了好久没找到根因,头大
你可以加一下vap的qq讨论群,719738292
https://video.hellobixin.com/video/d6fd8ff7c84f43d78cdda3d968b9e441.mp4
不是vap的demo,在工程里面。不易复现,线上又个用户反馈了一次,我自己试了很多遍才触发一次。
好的我加下群,谢谢。
https://video.hellobixin.com/video/d6fd8ff7c84f43d78cdda3d968b9e441.mp4
不是vap的demo,在工程里面。不易复现,线上又个用户反馈了一次,我自己试了很多遍才触发一次。
好的我加下群,谢谢。
你这边出现的卡死,确定是主线程卡死了么?还是说vap特效画面停留在最后一帧。加群后可@斌儿
https://video.hellobixin.com/video/d6fd8ff7c84f43d78cdda3d968b9e441.mp4 不是vap的demo,在工程里面。不易复现,线上又个用户反馈了一次,我自己试了很多遍才触发一次。 好的我加下群,谢谢。
你这边出现的卡死,确定是主线程卡死了么?还是说vap特效画面停留在最后一帧。加群后可@斌儿
好的,已加群并at相关大神。谢谢哈。我看堆栈就是主线程卡住了。
@Monkey-Sun @wubiner 可有最新进展?
@Monkey-Sun @wubiner 可有最新进展?
当时提供的信息不能表明是vap导致的主线程卡死,所以没有结论。如果你有类似的crash,可贴附件信息。
Thread 0 name: com.qgame.vap.decode (cpu_usage: 0.00%)
libsystem_kernel.dylib _psynch_cvwait (in libsystem_kernel.dylib)
libsystem_pthread.dylib pthread_cond_wait$VARIANT$mp (in libsystem_pthread.dylib)
CoreMedia _WaitOnCondition (in CoreMedia)
CoreMedia _FigSemaphoreWaitRelative (in CoreMedia)
VideoToolbox _VTDecompressionSessionRemote_WaitForAsynchronousFrames (in VideoToolbox)
Baiduxxx -[QGMP4FrameHWDecoder _onInputEnd] (in Baiduxxx:60)
Baiduxxx _33-[QGMP4FrameHWDecoder onInputEnd]_block_invoke (in Baiduxxx:32)
libdispatch.dylib dispatch_client_callout (in libdispatch.dylib)
libdispatch.dylib dispatch_lane_barrier_sync_invoke_andcomplete (in libdispatch.dylib)
Baiduxxx -[QGMP4FrameHWDecoder onInputEnd] (in Baiduxxx:152)
CoreFoundation CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER (in CoreFoundation)
CoreFoundation __CFXRegistrationPost_block_invoke (in CoreFoundation)
CoreFoundation CFXRegistrationPost (in CoreFoundation)
CoreFoundation CFXNotificationPost (in CoreFoundation)
Foundation -[NSNotificationCenter postNotificationName:object:userInfo:] (in Foundation)
UIKitCore -[UIApplication _deactivateForReason:notify:] (in UIKitCore)
UIKitCore -[_UISceneLifecycleMultiplexer _performBlock:withApplicationOfDeactivationReasons:fromReasons:] (in UIKitCore)
UIKitCore -[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:] (in UIKitCore)
UIKitCore -[_UISceneLifecycleMultiplexer uiScene:transitionedFromState:withTransitionContext:] (in UIKitCore)
UIKitCore _186-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]_block_invoke (in UIKitCore)
UIKitCore +[BSAnimationSettings(UIKit) tryAnimatingWithSettings:actions:completion:] (in UIKitCore)
UIKitCore __UISceneSettingsDiffActionPerformChangesWithTransitionContext (in UIKitCore)
UIKitCore -[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:] (in UIKitCore)
UIKitCore 64-[UIScene scene:didUpdateWithDiff:transitionContext:completion:]_block_invoke (in UIKitCore)
UIKitCore -[UIScene _emitSceneSettingsUpdateResponseForCompletion:afterSceneUpdateWork:] (in UIKitCore)
UIKitCore -[UIScene scene:didUpdateWithDiff:transitionContext:completion:] (in UIKitCore)
UIKitCore -[UIApplicationSceneClientAgent scene:handleEvent:withCompletion:] (in UIKitCore)
FrontBoardServices -[FBSScene updater:didUpdateSettings:withDiff:transitionContext:completion:] (in FrontBoardServices)
FrontBoardServices _94-[FBSWorkspaceScenesClient _queue_updateScene:withSettings:diff:transitionContext:completion:]_block_invoke_2 (in FrontBoardServices)
FrontBoardServices -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] (in FrontBoardServices)
FrontBoardServices _94-[FBSWorkspaceScenesClient _queue_updateScene:withSettings:diff:transitionContext:completion:]_block_invoke (in FrontBoardServices)
libdispatch.dylib dispatch_client_callout (in libdispatch.dylib)
libdispatch.dylib dispatch_block_invokedirect$VARIANT$mp (in libdispatch.dylib)
FrontBoardServices FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK (in FrontBoardServices)
FrontBoardServices -[FBSSerialQueue _targetQueue_performNextIfPossible] (in FrontBoardServices)
FrontBoardServices -[FBSSerialQueue performNextFromRunLoopSource] (in FrontBoardServices)
CoreFoundation CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION_ (in CoreFoundation)
CoreFoundation CFRunLoopDoSource0 (in CoreFoundation)
CoreFoundation CFRunLoopDoSources0 (in CoreFoundation)
CoreFoundation CFRunLoopRun (in CoreFoundation)
CoreFoundation _CFRunLoopRunSpecific (in CoreFoundation)
GraphicsServices _GSEventRunModal (in GraphicsServices)
UIKitCore -[UIApplication _run] (in UIKitCore)
UIKitCore _UIApplicationMain (in UIKitCore)
Baiduxxx main (in Bai'du:main.m:13)
libdyld.dylib _start (in libdyld.dylib)
Thread 10000 name: Obtained stacks of main thread when main thread was stuck after 9.00s
libsystem_kernel.dylib _psynch_cvwait (in libsystem_kernel.dylib)
libsystem_pthread.dylib pthread_cond_wait$VARIANT$mp (in libsystem_pthread.dylib)
CoreMedia _WaitOnCondition (in CoreMedia)
CoreMedia _FigSemaphoreWaitRelative (in CoreMedia)
VideoToolbox _VTDecompressionSessionRemote_WaitForAsynchronousFrames (in VideoToolbox)
Baiduxxx -[QGMP4FrameHWDecoder _onInputEnd] (in Baiduxxx:60)
Baiduxxx _33-[QGMP4FrameHWDecoder onInputEnd]_block_invoke (in Baiduxxxx'x'x:32)
libdispatch.dylib dispatch_client_callout (in libdispatch.dylib)
libdispatch.dylib dispatch_lane_barrier_sync_invoke_andcomplete (in libdispatch.dylib)
Baiduxxx -[QGMP4FrameHWDecoder onInputEnd] (in Baiduxxx:152)
CoreFoundation CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER (in CoreFoundation)
CoreFoundation __CFXRegistrationPost_block_invoke (in CoreFoundation)
CoreFoundation CFXRegistrationPost (in CoreFoundation)
CoreFoundation CFXNotificationPost (in CoreFoundation)
Foundation -[NSNotificationCenter postNotificationName:object:userInfo:] (in Foundation)
UIKitCore -[UIApplication _deactivateForReason:notify:] (in UIKitCore)
UIKitCore -[_UISceneLifecycleMultiplexer _performBlock:withApplicationOfDeactivationReasons:fromReasons:] (in UIKitCore)
UIKitCore -[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:] (in UIKitCore)
UIKitCore -[_UISceneLifecycleMultiplexer uiScene:transitionedFromState:withTransitionContext:] (in UIKitCore)
UIKitCore _186-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]_block_invoke (in UIKitCore)
UIKitCore +[BSAnimationSettings(UIKit) tryAnimatingWithSettings:actions:completion:] (in UIKitCore)
UIKitCore __UISceneSettingsDiffActionPerformChangesWithTransitionContext (in UIKitCore)
UIKitCore -[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:] (in UIKitCore)
UIKitCore 64-[UIScene scene:didUpdateWithDiff:transitionContext:completion:]_block_invoke (in UIKitCore)
UIKitCore -[UIScene _emitSceneSettingsUpdateResponseForCompletion:afterSceneUpdateWork:] (in UIKitCore)
UIKitCore -[UIScene scene:didUpdateWithDiff:transitionContext:completion:] (in UIKitCore)
UIKitCore -[UIApplicationSceneClientAgent scene:handleEvent:withCompletion:] (in UIKitCore)
FrontBoardServices -[FBSScene updater:didUpdateSettings:withDiff:transitionContext:completion:] (in FrontBoardServices)
FrontBoardServices _94-[FBSWorkspaceScenesClient _queue_updateScene:withSettings:diff:transitionContext:completion:]_block_invoke_2 (in FrontBoardServices)
FrontBoardServices -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] (in FrontBoardServices)
FrontBoardServices _94-[FBSWorkspaceScenesClient _queue_updateScene:withSettings:diff:transitionContext:completion:]_block_invoke (in FrontBoardServices)
libdispatch.dylib dispatch_client_callout (in libdispatch.dylib)
libdispatch.dylib dispatch_block_invokedirect$VARIANT$mp (in libdispatch.dylib)
FrontBoardServices FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK (in FrontBoardServices)
FrontBoardServices -[FBSSerialQueue _targetQueue_performNextIfPossible] (in FrontBoardServices)
FrontBoardServices -[FBSSerialQueue performNextFromRunLoopSource] (in FrontBoardServices)
CoreFoundation CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION_ (in CoreFoundation)
CoreFoundation CFRunLoopDoSource0 (in CoreFoundation)
CoreFoundation CFRunLoopDoSources0 (in CoreFoundation)
CoreFoundation CFRunLoopRun (in CoreFoundation)
CoreFoundation _CFRunLoopRunSpecific (in CoreFoundation)
GraphicsServices _GSEventRunModal (in GraphicsServices)
UIKitCore -[UIApplication _run] (in UIKitCore)
UIKitCore _UIApplicationMain (in UIKitCore)
Baiduxxx main (in Baiduxxx:main.m:13)
libdyld.dylib _start (in libdyld.dylib)
Thread 1 name: com.heimdallr.runloop.observer (cpu_usage: 0.00%)
Baiduxxx writeMainFile(HMDRunloopMonitorInfo) (in Baiduxxx:HMDWatchDog.mm:699)
Baiduxxx timeoutDuration(HMDRunloopMonitorInfo) (in Baiduxxx:HMDWatchDog.mm:462)
Baiduxxx HMDMainRunloopMonitor::runMonitor() (in Baiduxxx:HMDMainRunloopMonitor.mm:439)
Baiduxxx DISPATCH_IS_CALLING_block_invoke (in Baiduxxx:HMDCrashAsyncStackTrace.m:174)
libdispatch.dylib dispatch_call_block_and_release (in libdispatch.dylib)
libdispatch.dylib dispatch_client_callout (in libdispatch.dylib)
libdispatch.dylib dispatch_lane_serial_drain$VARIANT$mp (in libdispatch.dylib)
libdispatch.dylib dispatch_lane_invoke$VARIANT$mp (in libdispatch.dylib)
libdispatch.dylib dispatch_workloop_worker_thread (in libdispatch.dylib)
libsystem_pthread.dylib pthread_wqthread (in libsystem_pthread.dylib)
libsystem_pthread.dylib _start_wqthread (in libsystem_pthread.dylib)
Thread 2 name: null (cpu_usage: 0.00%)
libsystem_kernel.dylib ___psynch_cvwait (in libsystem_kernel.dylib)
libsystem_pthread.dylib pthread_cond_wait$VARIANT$mp (in libsystem_pthread.dylib)
libc++.1.dylib std::1::condition_variable::wait(std::__1::unique_lock<std::1::mutex>&) (in libc++.1.dylib)
Baiduxxx FixedThreadPool::FixedThreadPool(unsigned long)::{lambda()#1}::operator()() const (in Baiduxxx:thread_pool.h:28)
Baiduxxx std::1::invoke<FixedThreadPool::FixedThreadPool(unsigned long)::{lambda()#1}, >(FixedThreadPool::FixedThreadPool(unsigned long)::{lambda()#1}&&, &&) (in Baiduxxx:type_traits:3747)
Baiduxxx std::1::thread_execute<std::1::unique_ptr<std::1::thread_struct, std::1::default_delete
最近监控到卡顿问题频发,@Monkey-Sun @wubiner 看看这个日志是否能确定呢
@Monkey-Sun 请问你有解决这个问题吗?我这边也遇到了相同的问题。
com.qgame.vap.render 0 libsystem_kernel.dylib semwait_signal + 8 1 libsystem_c.dylib nanosleep + 220 2 Foundation +[NSThread sleepForTimeInterval:] + 160 3 QGVAPlayer 33-[UIView(VAP) hwd_renderVideoRun]_block_invoke + 380 4 libdispatch.dylib _dispatch_call_block_and_release + 32 5 libdispatch.dylib _dispatch_client_callout + 20 6 libdispatch.dylib _dispatch_lane_serial_drain + 748 7 libdispatch.dylib _dispatch_lane_invoke + 380 8 libdispatch.dylib _dispatch_root_queue_drain_deferred_wlh + 288 9 libdispatch.dylib _dispatch_workloop_worker_thread + 404 10 libsystem_pthread.dylib _pthread_wqthread + 288 11 libsystem_pthread.dylib start_wqthread + 8
__semwait_signal + 8 frame ---1: 0x00000001b0f3d7bc libsystem_c.dylib
nanosleep + 216 frame ---2: 0x00000001b0f3d68c libsystem_c.dylibusleep + 68 frame ---3: 0x0000000110c2eb70 libMTLCapture.dylib
_lldb_unnamedsymbol2227$$libMTLCapture.dylib + 44 frame ---4: 0x0000000110c2c97c libMTLCapture.dylib`lldb_unnamed_symbol2180$$libMTLCapture.dylib + 276 frame ---5: 0x0000000110c2ce3c libMTLCapture.dylib___lldb_unnamed_symbol2182$$libMTLCapture.dylib + 428 frame ---6: 0x0000000110c2af18 libMTLCapture.dylib
_lldb_unnamed_symbol2127$$libMTLCapture.dylib + 104 frame ---7: 0x0000000121dbd5f0 libdispatch.dylib_dispatch_client_callout + 20 frame ---8: 0x0000000121dcdd50 libdispatch.dylib
_dispatch_sync_invoke_and_complete_recurse + 184 frame ---9: 0x0000000110c2ada0 libMTLCapture.dylib___lldb_unnamed_symbol2124$$libMTLCapture.dylib + 608 frame ---10: 0x0000000110c2d9b4 libMTLCapture.dylib
_lldb_unnamed_symbol2206$$libMTLCapture.dylib + 236 frame ---11: 0x0000000110bf90ac libMTLCapture.dylib___lldb_unnamed_symbol992$$libMTLCapture.dylib + 1056 frame ---12: 0x0000000110c0f3b4 libMTLCapture.dylib
_lldb_unnamedsymbol1417$$libMTLCapture.dylib + 116 frame ---13: 0x0000000110bdf6a4 libMTLCapture.dylib`lldb_unnamed_symbol676$$libMTLCapture.dylib + 260 frame ---14: 0x0000000110bdf584 libMTLCapture.dylib`___lldb_unnamed_symbol675$$libMTLCapture.dylib + 168-[QGHWDMetalRenderer renderPixelBuffer:metalLayer:](self=0x0000000281a5d880, _cmd="renderPixelBuffer:metalLayer:", pixelBuffer=0x00000002807a8fa0, layer=0x0000000283233c80) at QGHWDMetalRenderer.m:285:5 frame ---16: 0x00000001050cf84c MyApp
-[QGHWDMetalView display:](self=0x000000015b1ff550, _cmd="display:", pixelBuffer=0x00000002807a8fa0) at QGHWDMetalView.m:113:5 frame ---17: 0x00000001050f4604 MyApp-[UIView(self=0x0000000122a6ad60, _cmd="hwd_displayNext") hwd_displayNext] at UIView+VAP.m:439:9 frame ---18: 0x00000001050f422c MyApp
33-[UIView(.block_descriptor=0x000000016dfee808) hwd_renderVideoRun]_block_invoke.282 at UIView+VAP.m:393:33 frame ---19: 0x0000000121dbd5f0 libdispatch.dylib_dispatch_client_callout + 20 frame ---20: 0x0000000121dcd99c libdispatch.dylib
_dispatch_async_and_wait_invoke + 220 frame ---21: 0x0000000121dbd5f0 libdispatch.dylib_dispatch_client_callout + 20 frame ---22: 0x0000000121dcc890 libdispatch.dylib
_dispatch_main_queue_callback_4CF + 1000 frame ---23: 0x00000001a7dbb1e4 CoreFoundation`CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE + 16 frame ---24: 0x00000001a7db53b4 CoreFoundation`CFRunLoopRun + 2508 frame ---25: 0x00000001a7db44bc CoreFoundationCFRunLoopRunSpecific + 600 frame ---26: 0x00000001be839820 GraphicsServices
GSEventRunModal + 164 frame ---27: 0x00000001aa758734 UIKitCore-[UIApplication _run] + 1072 frame ---28: 0x00000001aa75de10 UIKitCore
UIApplicationMain + 168 frame ---29: 0x00000001027723f4 MyAppmain(argc=1, argv=0x000000016d84b7e0) at main.m:15:16 frame ---30: 0x00000001a7a7be60 libdyld.dylib
start + 4