显示地图时,iOS 6应用程序在EAGLContext中崩溃 [英] iOS 6 app crashes in EAGLContext when displaying maps

查看:478
本文介绍了显示地图时,iOS 6应用程序在EAGLContext中崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个使用OpenGL和 MKMapView 的应用。当我们切换到iOS 6时,只要我们在设置了我们自己的 EAGLContext后尝试显示地图,它就会开始在 [EAGLContext setCurrentContext:] 时崩溃,并且EXC_BAD_ACCESS code>。

We have an app that uses OpenGL and MKMapView. When we switched to iOS 6 it started crashing at [EAGLContext setCurrentContext:] with EXC_BAD_ACCESS whenever we tried to display a map after setting our own EAGLContext.

推荐答案

iOS 6地图是基于OpenGL的。如果你不打电话,你的应用会崩溃

iOS 6 maps are OpenGL based. Your app will crash if you don't call

[EAGLContext setCurrentContext:nil]

。我们通过将上面的调用放入我们类的与EAGLContext交互的dealloc方法来修复我们的错误。

after you have set your own EAGLContext. We fixed our bug by putting the above call into the dealloc method of our class that was interacting with EAGLContext.

这篇关于显示地图时,iOS 6应用程序在EAGLContext中崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆