我偶尔会遇到iOS 6 MapKit崩溃.无法真正重现它.是什么导致这个?
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x00000044
Crashed Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 IMGSGX543GLDriver 0x38f231b4 sgxTextureGetImageRowBytes(GLDTextureRec*, unsigned int, unsigned int) + 8
1 IMGSGX543GLDriver 0x38f23160 CalculateChunkPlaneSizes(GLDTextureRec*, int, unsigned int*, unsigned int*, unsigned int*, unsigned int*) + 104
2 IMGSGX543GLDriver 0x38f25906 sgxConfigureTexturePrivate(GLDTextureRec*) + 82
3 IMGSGX543GLDriver 0x38f24584 glrUpdateTexture + 616
4 libGPUSupportMercury.dylib 0x342c76b6 gldLoadFramebuffer + 102
5 GLEngine 0x31b50e52 gleUpdateDrawFramebufferState + 178
6 GLEngine 0x31b52556 gleDoDrawDispatchCoreES2 + 126
7 …Run Code Online (Sandbox Code Playgroud) 我们有一个使用OpenGL和的应用程序MKMapView.当我们切换到iOS 6时[EAGLContext setCurrentContext:],每当我们尝试在设置我们自己的地图后显示地图时,它就开始与EXC_BAD_ACCESS 崩溃EAGLContext.
在线进行一些调查,我注意到gpus_ReturnNotPermittedKillClient当应用程序背景化时触发OpenGL操作时会抛出.我目前正在开发一个涉及地图视图和叠加层的项目(使用Apple的Breadcrumb示例代码).这些操作是在主线程上执行的,但是当地图视图初始化或视图被推到屏幕上时,应用程序可能会变为背景.
我还使用位置服务通过GPS检索点,但除非我们在前台,否则我不会更新叠加层.
据我所知,自iOS 6以来,MKMapView现在是用OpenGL创建的吗?如果是这种情况,那么可以通过OpenGL绘制叠加层吗?这可以帮助解释为什么我一直在随机获得此错误.
我听说过的一些方法来取消所有的OpenGL操作,如调用glFinish()中applicationDidEnterBackground和applicationWillResignActive或使用[[CCDirector sharedDirector] pause].考虑到这一点,使用MKMapView/MKOverlayView消除任何OpenGL绘图的最佳解决方案是什么?
我在该领域有一个应用程序在前台崩溃.我在根视图控制器中有一个MKMapView.此根视图控制器在顶部显示模态视图控制器.当模态视图控制器被解除时,在调用其viewWillAppear方法之后,在根视图控制器中呈现MKMapView时,似乎发生了崩溃.这发生在ios7中.任何人都知道造成这种崩溃的原因是什么?崩溃发生在前台,并且与initWithFrame中偶尔出现的iOS 6 MKMapView崩溃不一样
堆栈跟踪:
Exception Type: SIGSEGV
Exception Codes: SEGV_ACCERR at 0x200000a0
Crashed Thread: 13
0 IMGSGX543GLDriver 0x2efadfd6 sgxBindCurrentTextures + 118
1 IMGSGX543GLDriver 0x2efaf143 sgxBeginRender + 399
2 IMGSGX543GLDriver 0x2efa75c3 glrClearCore + 235
3 IMGSGX543GLDriver 0x2efa73e5 glrClear + 193
4 GLEngine 0x323640c7 glClear_Exec + 395
5 VectorKit 0x37bf1531 -[VKMapModel drawScene:withContext:] + 125
6 VectorKit 0x37bf13f1 -[VKMapModel recursiveDrawScene:withContext:pass:] + 189
7 VectorKit 0x37bf12d5 -[VKModelObject recursiveDrawScene:withContext:pass:] + 237
8 VectorKit 0x37bf11e1 -[VKWorld drawScene:withContext:] + 45
9 VectorKit 0x37bf0a0d -[VKScreenCanvas _renderCore:] …Run Code Online (Sandbox Code Playgroud)