我正在使用这个堆栈跟踪在iOS 8上收到很多崩溃报告:
Thread : Crashed: com.apple.mapdisplay.dispatch.tiledecodequeue 0 libGPUSupportMercury.dylib 0x2ce478fe gpus_ReturnNotPermittedKillClient + 9 1 libGPUSupportMercury.dylib 0x2ce483cb gpusSubmitDataBuffers + 110 2 libGPUSupportMercury.dylib 0x2ce48249 gldCreateContext + 208 3 GLEngine 0x28a4e93b gliCreateContextWithShared + 602 4 OpenGLES 0x28b2aab3 -[EAGLContext initWithAPI:properties:] + 406 5 OpenGLES 0x28b2a8ff -[EAGLContext initWithAPI:sharegroup:] + 114 6 VectorKit 0x30fb3e65 ggl::OESContext::OESContext(ggl::GLDevice*,std::__1::shared_ptr<ggl::OESSharegroup>) + 492 7 VectorKit 0x30fad45d ggl::GLDevice::vendLoader() + 204 8 VectorKit 0x30f885c5 -[VKRoadTile buildGglMeshesWithDevice:] + 2032 9 VectorKit 0x30f870c9 -[VKRoadTile initWithKey:modelTile:styleManager:sharedResources:contentScale:device:] + 84 10 VectorKit 0x30c3a893 -[VKRoadTileSource tileForData:downloadKey:sourceKey:] + 154 11 VectorKit 0x30c34bc5 __49-[VKTileSource decodeData:downloadKey:sourceKey:]_block_invoke + 84 12 libdispatch.dylib 0x33e917bb _dispatch_call_block_and_release + 10 13 libdispatch.dylib 0x33e98577 _dispatch_async_redirect_invoke + 550 14 libdispatch.dylib 0x33e9adab _dispatch_root_queue_drain + 866 15 libdispatch.dylib 0x33e9a9a9 _dispatch_worker_thread + 72 16 libsystem_pthread.dylib 0x33ff4e93 _pthread_body + 138 17 libsystem_pthread.dylib 0x33ff4e07 _pthread_start + 118
大多数情况发生在iOS 8.2.0,而应用程序在后台运行.
在背景中,除了setCenterCoordinate和setRegion之外,我确定没有对mapview执行任何操作.
根据Apple Q&A我知道我不应该在后台重新制作MKMapView.但是我在程序上尝试改变mapview的中心坐标和区域,但并没有崩溃.
解决方法
一旦您进入背景,您需要停止渲染到任何OpenGL ES Surface.
正如Apple在链接文章中所提到的,使用AppDelegate方法与NSNotificationCenter结合使用…
看看this answer参考…