googlevr / gvr-ios-sdk

Google VR SDK for iOS
http://developers.google.com/vr/ios/
Other
645 stars 191 forks source link

ion::gfx::Renderer::ResourceManager::AddResource - Crash #275

Closed keakalamudo closed 6 years ago

keakalamudo commented 6 years ago

Hi @sanjayc77 , team,

We are seeing a lot of crashes on ion::gfx::Renderer::ResourceManager::AddResource / com.google.cardboard.RenderThread. We are not too sure what is causing this.

5. Crashed: com.google.cardboard.RenderThread

0 project-vr 0x1004af26c CLSProcessRecordAllThreads + 129188 1 project-vr 0x1004af26c CLSProcessRecordAllThreads + 129188 2 project-vr 0x1004af128 CLSProcessRecordAllThreads + 128864 3 project-vr 0x10049e9e0 CLSHandler + 61464 4 project-vr 0x1004ad084 CLSExceptionRecord_block_invoke + 120508 5 libdispatch.dylib 0x18443e9a0 _dispatch_client_callout + 16 6 libdispatch.dylib 0x18444bee0 _dispatch_barrier_sync_f_invoke + 84 7 project-vr 0x1004acb18 CLSExceptionRecord + 119120 8 project-vr 0x1004ac6f8 CLSTerminateHandler() + 118064 9 libc++abi.dylib 0x183fd75d4 std::terminate(void ()()) + 16 10 libc++abi.dylib 0x183fd6ef8 __cxxabiv1::exception_cleanup_func(_Unwind_Reason_Code, _Unwind_Exception) + 134 11 libc++.1.dylib 0x183fb11bc std::1::throw_system_error(int, char const) + 88 12 project-vr 0x1003ea2b8 ion::gfx::Renderer::ResourceManager::AddResource(ion::gfx::Renderer::ResourceManager::Resource) + 111260 13 project-vr 0x1003f002c ion::gfx::Renderer::HolderToResource::ResourceType ion::gfx::Renderer::ResourceManager::CreateResource(ion::gfx::ShaderInputRegistry const, ion::gfx::Renderer::ResourceBinder, long, unsigned int) + 135184 14 project-vr 0x1003db888 ion::gfx::Renderer::HolderToResource::ResourceType ion::gfx::Renderer::ResourceManager::GetResource(ion::gfx::ShaderInputRegistry const, ion::gfx::Renderer::ResourceBinder, unsigned int) + 51308 15 project-vr 0x1003dd260 ion::gfx::Renderer::ResourceBinder::PushUniforms(ion::gfx::Node const, ion::base::AllocVector const&) + 57924 16 project-vr 0x1003dc598 ion::gfx::Renderer::ResourceBinder::DrawNode(ion::gfx::Node const&, ion::gfx::GraphicsManager) + 54652 17 project-vr 0x1003dbd54 ion::gfx::Renderer::ResourceBinder::DrawScene(ion::base::SharedPtr const&, std::__1::bitset<35ul> const&, ion::gfx::ShaderProgram*) + 52536 18 project-vr 0x1003dbb70 ion::gfx::Renderer::DrawScene(ion::base::SharedPtr const&) + 52052 19 project-vr 0x1002b5ee8 vr::WidgetRenderer::RenderFrame() + 45560 20 project-vr 0x1000dacd0 -[GVRWidgetView nativeRenderFrame] + 4296338640 21 project-vr 0x1000dc554 -[GVRWidgetView render:] + 4296344916 22 project-vr 0x1000d2848 -[GVRWeakRenderTarget render:] + 4296304712 23 project-vr 0x1000d3918 -[GVRRenderLoop updateWithDisplayLink:] + 4296309016 24 QuartzCore 0x1887995dc CA::Display::DisplayLinkItem::dispatch(unsigned long long) + 44 25 QuartzCore 0x18879948c CA::Display::DisplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long) + 436 26 IOKit 0x1857f3b9c IODispatchCalloutFromCFMessage + 372 27 CoreFoundation 0x18551d960 CFMachPortPerform + 180 28 CoreFoundation 0x185535ae4 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION + 56 29 CoreFoundation 0x185535284 CFRunLoopDoSource1 + 436 30 CoreFoundation 0x185532d98 CFRunLoopRun + 1752 31 CoreFoundation 0x185462da4 CFRunLoopRunSpecific + 424 32 CoreFoundation 0x1854af9c0 CFRunLoopRun + 112 33 Foundation 0x18607b318 NSThreadstart + 996 34 libsystem_pthread.dylib 0x18464968c _pthread_body + 240 35 libsystem_pthread.dylib 0x18464959c _pthread_body + 282 36 libsystem_pthread.dylib 0x184646cb4 thread_start + 4

--

0. com.apple.main-thread

0 libsystem_kernel.dylib 0x184563224 mach_msg_trap + 8 1 libsystem_kernel.dylib 0x18456309c mach_msg + 72 2 libdispatch.dylib 0x184454ee4 _dispatch_mach_send_and_wait_for_reply + 540 3 libdispatch.dylib 0x1844552e8 dispatch_mach_send_with_result_and_wait_for_reply + 56 4 libxpc.dylib 0x18467cedc xpc_connection_send_message_with_reply_sync + 196 5 Security 0x1859a0e44 securityd_message_with_reply_sync + 200 6 Security 0x1859a1114 securityd_send_sync_and_do + 80 7 Security 0x1859c6c88 SecItemCopyMatching_block_invoke_2 + 212 8 Security 0x1859c8730 SecItemAuthDoQuery_block_invoke + 304 9 Security 0x1859c578c SecItemAuthDo + 1116 10 Security 0x1859c6424 SecItemAuthDoQuery + 492 11 Security 0x1859c6ba8 SecItemCopyMatching_block_invoke + 116 12 Security 0x1859c4c3c SecOSStatusWith + 52 13 Security 0x1859c6aec SecItemCopyMatching + 396 14 project-vr 0x10055748c -[FIRInstanceIDAuthKeychain itemsMatchingService:account:accessGroup:error:] + 817860 15 project-vr 0x10055767c -[FIRInstanceIDAuthKeychain itemForService:account:accessGroup:error:] + 818356 16 project-vr 0x100565bd0 -[FIRInstanceIDTokenStore tokenInfoWithAuthorizedEntity:scope:] + 877064 17 project-vr 0x10055fc18 -[FIRInstanceIDStore tokenInfoWithAuthorizedEntity:scope:] + 852560 18 project-vr 0x10056348c -[FIRInstanceIDTokenManager cachedTokenInfoWithAuthorizedEntity:scope:] + 867012 19 project-vr 0x100552a44 65-[FIRInstanceID tokenWithAuthorizedEntity:scope:options:handler:]_block_invoke.83 + 798844 20 project-vr 0x1005587e4 -[FIRInstanceIDAuthService notifyCheckinHandlersWithCheckin:error:] + 822812 21 project-vr 0x1005582dc -[FIRInstanceIDAuthService fetchCheckinInfoWithHandler:] + 821524 22 project-vr 0x100552738 -[FIRInstanceID tokenWithAuthorizedEntity:scope:options:handler:] + 798064 23 project-vr 0x1005550f8 -[FIRInstanceID defaultTokenWithHandler:] + 808752 24 project-vr 0x100555768 41-[FIRInstanceID defaultTokenWithHandler:]_block_invoke.272 + 810400 25 libdispatch.dylib 0x18443e9e0 _dispatch_call_block_and_release + 24 26 libdispatch.dylib 0x18443e9a0 _dispatch_client_callout + 16 27 libdispatch.dylib 0x1844435e8 _dispatch_main_queue_callback_4CF + 996 28 CoreFoundation 0x1855350c8 CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE + 12 29 CoreFoundation 0x185532ce4 CFRunLoopRun + 1572 30 CoreFoundation 0x185462da4 CFRunLoopRunSpecific + 424 31 GraphicsServices 0x186ecd074 GSEventRunModal + 100 32 UIKit 0x18b71dc9c UIApplicationMain + 208 33 project-vr 0x100095ac8 main (AppDelegate.swift:17) 34 libdyld.dylib 0x18447159c start + 4

1. com.apple.uikit.eventfetch-thread

0 libsystem_kernel.dylib 0x184563224 mach_msg_trap + 8 1 libsystem_kernel.dylib 0x18456309c mach_msg + 72 2 CoreFoundation 0x185534e90 CFRunLoopServiceMachPort + 192 3 CoreFoundation 0x185532ae4 CFRunLoopRun + 1060 4 CoreFoundation 0x185462da4 CFRunLoopRunSpecific + 424 5 Foundation 0x185f7ddb4 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 304 6 Foundation 0x185f9eb84 -[NSRunLoop(NSRunLoop) runUntilDate:] + 96 7 UIKit 0x18c0a7830 -[UIEventFetcher threadMain] + 136 8 Foundation 0x18607b318 NSThreadstart__ + 996 9 libsystem_pthread.dylib 0x18464968c _pthread_body + 240 10 libsystem_pthread.dylib 0x18464959c _pthread_body + 282 11 libsystem_pthread.dylib 0x184646cb4 thread_start + 4

2. com.apple.NSURLConnectionLoader

0 libsystem_kernel.dylib 0x184563224 mach_msg_trap + 8 1 libsystem_kernel.dylib 0x18456309c mach_msg + 72 2 CoreFoundation 0x185534e90 CFRunLoopServiceMachPort + 192 3 CoreFoundation 0x185532ae4 CFRunLoopRun + 1060 4 CoreFoundation 0x185462da4 CFRunLoopRunSpecific + 424 5 CFNetwork 0x185c6fdf4 +[NSURLConnection(Loader) _resourceLoadLoop:] + 404 6 Foundation 0x18607b318 NSThreadstart__ + 996 7 libsystem_pthread.dylib 0x18464968c _pthread_body + 240 8 libsystem_pthread.dylib 0x18464959c _pthread_body + 282 9 libsystem_pthread.dylib 0x184646cb4 thread_start + 4

3. com.twitter.crashlytics.ios.MachExceptionServer

0 libsystem_kernel.dylib 0x184563224 mach_msg_trap + 8 1 libsystem_kernel.dylib 0x18456309c mach_msg + 72 2 project-vr 0x10049954c CLSMachExceptionServer + 39812 3 libsystem_pthread.dylib 0x18464968c _pthread_body + 240 4 libsystem_pthread.dylib 0x18464959c _pthread_body + 282 5 libsystem_pthread.dylib 0x184646cb4 thread_start + 4

4. AVAudioSession Notify Thread

0 libsystem_kernel.dylib 0x184563224 mach_msg_trap + 8 1 libsystem_kernel.dylib 0x18456309c mach_msg + 72 2 CoreFoundation 0x185534e90 CFRunLoopServiceMachPort + 192 3 CoreFoundation 0x185532ae4 CFRunLoopRun + 1060 4 CoreFoundation 0x185462da4 CFRunLoopRunSpecific + 424 5 AVFAudio 0x19f60d4f4 GenericRunLoopThread::Entry(void) + 164 6 AVFAudio 0x19f633814 CAPThread::Entry(CAPThread) + 84 7 libsystem_pthread.dylib 0x18464968c _pthread_body + 240 8 libsystem_pthread.dylib 0x18464959c _pthread_body + 282 9 libsystem_pthread.dylib 0x184646cb4 thread_start + 4

5. Crashed: com.google.cardboard.RenderThread

0 project-vr 0x1004af26c CLSProcessRecordAllThreads + 129188 1 project-vr 0x1004af26c CLSProcessRecordAllThreads + 129188 2 project-vr 0x1004af128 CLSProcessRecordAllThreads + 128864 3 project-vr 0x10049e9e0 CLSHandler + 61464 4 project-vr 0x1004ad084 CLSExceptionRecord_block_invoke + 120508 5 libdispatch.dylib 0x18443e9a0 _dispatch_client_callout + 16 6 libdispatch.dylib 0x18444bee0 _dispatch_barrier_sync_f_invoke + 84 7 project-vr 0x1004acb18 CLSExceptionRecord + 119120 8 project-vr 0x1004ac6f8 CLSTerminateHandler() + 118064 9 libc++abi.dylib 0x183fd75d4 std::terminate(void ()()) + 16 10 libc++abi.dylib 0x183fd6ef8 __cxxabiv1::exception_cleanup_func(_Unwind_Reason_Code, _Unwind_Exception) + 134 11 libc++.1.dylib 0x183fb11bc std::1::throw_system_error(int, char const) + 88 12 project-vr 0x1003ea2b8 ion::gfx::Renderer::ResourceManager::AddResource(ion::gfx::Renderer::ResourceManager::Resource) + 111260 13 project-vr 0x1003f002c ion::gfx::Renderer::HolderToResource::ResourceType ion::gfx::Renderer::ResourceManager::CreateResource(ion::gfx::ShaderInputRegistry const, ion::gfx::Renderer::ResourceBinder, long, unsigned int) + 135184 14 project-vr 0x1003db888 ion::gfx::Renderer::HolderToResource::ResourceType ion::gfx::Renderer::ResourceManager::GetResource(ion::gfx::ShaderInputRegistry const, ion::gfx::Renderer::ResourceBinder, unsigned int) + 51308 15 project-vr 0x1003dd260 ion::gfx::Renderer::ResourceBinder::PushUniforms(ion::gfx::Node const, ion::base::AllocVector const&) + 57924 16 project-vr 0x1003dc598 ion::gfx::Renderer::ResourceBinder::DrawNode(ion::gfx::Node const&, ion::gfx::GraphicsManager) + 54652 17 project-vr 0x1003dbd54 ion::gfx::Renderer::ResourceBinder::DrawScene(ion::base::SharedPtr const&, std::__1::bitset<35ul> const&, ion::gfx::ShaderProgram*) + 52536 18 project-vr 0x1003dbb70 ion::gfx::Renderer::DrawScene(ion::base::SharedPtr const&) + 52052 19 project-vr 0x1002b5ee8 vr::WidgetRenderer::RenderFrame() + 45560 20 project-vr 0x1000dacd0 -[GVRWidgetView nativeRenderFrame] + 4296338640 21 project-vr 0x1000dc554 -[GVRWidgetView render:] + 4296344916 22 project-vr 0x1000d2848 -[GVRWeakRenderTarget render:] + 4296304712 23 project-vr 0x1000d3918 -[GVRRenderLoop updateWithDisplayLink:] + 4296309016 24 QuartzCore 0x1887995dc CA::Display::DisplayLinkItem::dispatch(unsigned long long) + 44 25 QuartzCore 0x18879948c CA::Display::DisplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long) + 436 26 IOKit 0x1857f3b9c IODispatchCalloutFromCFMessage + 372 27 CoreFoundation 0x18551d960 CFMachPortPerform + 180 28 CoreFoundation 0x185535ae4 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION + 56 29 CoreFoundation 0x185535284 CFRunLoopDoSource1 + 436 30 CoreFoundation 0x185532d98 CFRunLoopRun + 1752 31 CoreFoundation 0x185462da4 CFRunLoopRunSpecific + 424 32 CoreFoundation 0x1854af9c0 CFRunLoopRun + 112 33 Foundation 0x18607b318 NSThreadstart + 996 34 libsystem_pthread.dylib 0x18464968c _pthread_body + 240 35 libsystem_pthread.dylib 0x18464959c _pthread_body + 282 36 libsystem_pthread.dylib 0x184646cb4 thread_start + 4

6. Thread

0 libsystem_kernel.dylib 0x184580e1c psynch_cvwait + 8 1 libsystem_pthread.dylib 0x184648814 _pthread_cond_wait + 640 2 libc++.1.dylib 0x183f71ac8 std::__1::condition_variable::wait(std::1::unique_lock&) + 56 3 libc++.1.dylib 0x183f7250c std::1::assoc_sub_state::sub_wait(std::__1::unique_lock<std::1::mutex>&) + 52 4 libc++.1.dylib 0x183f72584 std::1::assoc_sub_state::wait() + 52 5 project-vr 0x100333b8c gvr::ServerLogger::LogAsync() + 163472 6 project-vr 0x100465bc4 gvr::TaskLoop::Loop() + 1816 7 project-vr 0x100464ecc gvr::PlatformThread::ThreadMain(std::1::function<void ()>) + 2752 8 project-vr 0x100465534 void* std::1::__thread_proxy<std::1::tuple<std::1::bind<void (gvr::PlatformThread::*)(std::1::function<void ()>), gvr::PlatformThread, std::__1::function<void ()> > > >(void) + 136 9 libsystem_pthread.dylib 0x18464968c _pthread_body + 240 10 libsystem_pthread.dylib 0x18464959c _pthread_body + 282 11 libsystem_pthread.dylib 0x184646cb4 thread_start + 4

7. com.apple.CoreMotion.MotionThread

0 libsystem_kernel.dylib 0x184563224 mach_msg_trap + 8 1 libsystem_kernel.dylib 0x18456309c mach_msg + 72 2 CoreFoundation 0x185534e90 CFRunLoopServiceMachPort + 192 3 CoreFoundation 0x185532ae4 CFRunLoopRun + 1060 4 CoreFoundation 0x185462da4 CFRunLoopRunSpecific + 424 5 CoreFoundation 0x1854af9c0 CFRunLoopRun + 112 6 CoreMotion 0x18c5bbfdc (null) + 203104 7 libsystem_pthread.dylib 0x18464968c _pthread_body + 240 8 libsystem_pthread.dylib 0x18464959c _pthread_body + 282 9 libsystem_pthread.dylib 0x184646cb4 thread_start + 4

8. Thread

0 libsystem_kernel.dylib 0x184581a88 __workq_kernreturn + 8 1 libsystem_pthread.dylib 0x1846471a4 _pthread_wqthread + 1260 2 libsystem_pthread.dylib 0x184646cac start_wqthread + 4

9. Thread

0 libsystem_kernel.dylib 0x184581a88 __workq_kernreturn + 8 1 libsystem_pthread.dylib 0x184646fd0 _pthread_wqthread + 792 2 libsystem_pthread.dylib 0x184646cac start_wqthread + 4

10. Thread

0 libsystem_kernel.dylib 0x184581a88 __workq_kernreturn + 8 1 libsystem_pthread.dylib 0x1846471a4 _pthread_wqthread + 1260 2 libsystem_pthread.dylib 0x184646cac start_wqthread + 4

11. Thread

0 libsystem_pthread.dylib 0x184646ca8 start_wqthread + 126

12. Thread

0 libsystem_kernel.dylib 0x184581a88 __workq_kernreturn + 8 1 libsystem_pthread.dylib 0x1846471a4 _pthread_wqthread + 1260 2 libsystem_pthread.dylib 0x184646cac start_wqthread + 4

13. Thread

0 libsystem_kernel.dylib 0x184580e1c psynch_cvwait + 8 1 libsystem_pthread.dylib 0x184648814 _pthread_cond_wait + 640 2 libc++.1.dylib 0x183f71ac8 std::__1::condition_variable::wait(std::1::unique_lock&) + 56 3 project-vr 0x100465b54 gvr::TaskLoop::Loop() + 1704 4 project-vr 0x100464ecc gvr::PlatformThread::ThreadMain(std::1::function<void ()>) + 2752 5 project-vr 0x100465534 void* std::1::__thread_proxy<std::1::tuple<std::1::bind<void (gvr::PlatformThread::*)(std::1::function<void ()>), gvr::PlatformThread, std::__1::function<void ()> > > >(void) + 136 6 libsystem_pthread.dylib 0x18464968c _pthread_body + 240 7 libsystem_pthread.dylib 0x18464959c _pthread_body + 282 8 libsystem_pthread.dylib 0x184646cb4 thread_start + 4

sanjayc77 commented 6 years ago

You should consider GVRKit: https://github.com/googlevr/gvr-ios-sdk/tree/master/Samples/GVRKit (also available as CocoaPod). VRView and CardboardView are deprecated.

GVRKit provides similar functionality, see the Panorama and VideoWidgetView samples.