自iOS 9以来,VectorKit / OpenGL在MKMapView中崩溃

时间:2016-01-04 15:19:07

标签: ios objective-c opengl-es mapkit

我可以从Crashlytics看到我的一些应用用户遭遇以下崩溃。我自己从未见过这些,也不知道如何重现它们,因为它们在堆栈跟踪中没有我的代码。我已经读过OpenGL,当应用程序在后台时尝试更新表面时,可能会发生一些崩溃。不确定这是否是这种情况,因为在iOS 9之前没有发生崩溃。

我在地图上有几个注释,自定义MKAnnotationView派生视图,一些自定义叠加层和MKTileOverlay派生的平铺源。地图处理代码和叠加层是Objective-C,但我的应用程序也有一些Swift代码。

有没有人有任何想法可能是崩溃的原因?

1)

Thread : Crashed: com.apple.maps.geogl.renderQueue
0  VectorKit                      0x18c82a894 ___ZN3ggl10GLRenderer5frameEPNS_12RenderTargetEPNS_11RenderQueueE_block_invoke_2 + 876
1  VectorKit                      0x18c82a47c ___ZN3ggl10GLRenderer5frameEPNS_12RenderTargetEPNS_11RenderQueueE_block_invoke + 212
2  libdispatch.dylib              0x182625630 _dispatch_call_block_and_release + 24
3  libdispatch.dylib              0x1826255f0 _dispatch_client_callout + 16
4  libdispatch.dylib              0x182631634 _dispatch_queue_drain + 864

2)

Thread : Crashed: com.apple.mapdisplay.stylesheetLoadQueue
0  libdispatch.dylib              0x183ec2a90 dispatch_async + 76
1  libdispatch.dylib              0x183ec2a88 dispatch_async + 68
2  VectorKit                      0x18df501c4 std::__1::__function::__func<-[VKTileSetBackedTileSource setStyleManager:]::$_0, std::__1::allocator<-[VKTileSetBackedTileSource setStyleManager:]::$_0>, void (std::__1::shared_ptr<gss::StyleManager>, bool)>::operator()(std::__1::shared_ptr<gss::StyleManager>&&, bool&&) + 176
3  VectorKit                      0x18e11533c std::__1::__function::__func<gss::StyleManager::addFinishedDecodingGlobalPropertiesCallback(std::__1::function<void (std::__1::shared_ptr<gss::StyleManager>, bool)>)::$_0, std::__1::allocator<gss::StyleManager::addFinishedDecodingGlobalPropertiesCallback(std::__1::function<void (std::__1::shared_ptr<gss::StyleManager>, bool)>)::$_0>, void (bool)>::operator()(bool&&) + 88
4  VectorKit                      0x18e10c248 ___ZN3gss10StyleSheet43addFinishedDecodingGlobalPropertiesCallbackENSt3__18functionIFvbEEE_block_invoke + 56
5  libdispatch.dylib              0x183ec1630 _dispatch_call_block_and_release + 24
6  libdispatch.dylib              0x183ec15f0 _dispatch_client_callout + 16
7  libdispatch.dylib              0x183ecd634 _dispatch_queue_drain + 864
8  libdispatch.dylib              0x183ec50f4 _dispatch_queue_invoke + 464
9  libdispatch.dylib              0x183ecf504 _dispatch_root_queue_drain + 728
10 libdispatch.dylib              0x183ecf224 _dispatch_worker_thread3 + 112
11 libsystem_pthread.dylib        0x1840d5470 _pthread_wqthread + 1092
12 libsystem_pthread.dylib        0x1840d5020 start_wqthread + 4

3)

Thread : Fatal Exception: NSGenericException
0  CoreFoundation                 0x23f6a2eb __exceptionPreprocess
1  libobjc.A.dylib                0x23736dff objc_exception_throw
2  CoreFoundation                 0x23f69d6d -[NSException name]
3  VectorKit                      0x2c923af9 -[VKRasterOverlayTileSource _queueDraw:]
4  VectorKit                      0x2c5e74ad -[VKTileSource fetchTileForKey:]
5  VectorKit                      0x2c7c512d -[VKTileProvider dirtyTilesFromTileSource:]
6  libdispatch.dylib              0x23b07dd7 _dispatch_call_block_and_release
7  libdispatch.dylib              0x23b07dc3 _dispatch_client_callout
8  libdispatch.dylib              0x23b0c671 _dispatch_main_queue_callback_4CF
9  CoreFoundation                 0x23f2cfc5 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__
10 CoreFoundation                 0x23f2b4bf __CFRunLoopRun
11 CoreFoundation                 0x23e7dbb9 CFRunLoopRunSpecific
12 CoreFoundation                 0x23e7d9ad CFRunLoopRunInMode
13 GraphicsServices               0x250f7af9 GSEventRunModal
14 UIKit                          0x28169fb5 UIApplicationMain
15 MyApp                          0x252d44 main (main.swift:12)
16 libdispatch.dylib              0x23b30873 (Missing)

1 个答案:

答案 0 :(得分:0)

  1. 我的应用中的类似崩溃日志如下。从线程名称“ com.apple.maps.geogl.renderQueue”开始,我想这与MapKit框架的使用有关。

  2. 我在技术质量检查中找到了“ gpus_ReturnNotPermittedKillClient”: “移至后台时如何修复OpenGL ES应用程序崩溃” https://developer.apple.com/library/archive/qa/qa1766/_index.html

崩溃:com.apple.maps.geogl.renderQueue EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000000000000001

0  libGPUSupportMercury.dylib     0x190a45f08 gpus_ReturnNotPermittedKillClient
1  libGPUSupportMercury.dylib     0x190a46ec4 gpusSubmitDataBuffers
2  VectorKit                      0x18c7d1a0c ___ZN3ggl10GLRenderer5frameEPNS_12RenderTargetEPNS_11RenderQueueE_block_invoke + 212
3  libdispatch.dylib              0x181ec94bc _dispatch_call_block_and_release + 24
4  libdispatch.dylib              0x181ec947c _dispatch_client_callout + 16
5  libdispatch.dylib              0x181ed54c0 _dispatch_queue_drain + 864
6  libdispatch.dylib              0x181eccf80 _dispatch_queue_invoke + 464
7  libdispatch.dylib              0x181ed7390 _dispatch_root_queue_drain + 728
8  libdispatch.dylib              0x181ed9934 _dispatch_worker_thread + 124
9  libsystem_pthread.dylib        0x1820e3b28 _pthread_body + 156
10 libsystem_pthread.dylib        0x1820e3a8c _pthread_body + 154
11 libsystem_pthread.dylib        0x1820e1028 thread_start + 4