EXC_BAD_ACCESS使用gmaps sdk 1.9.0,Xcode 6.4,在8.3设备上运行 [英] EXC_BAD_ACCESS Using gmaps sdk 1.9.0, Xcode 6.4, running on 8.3 device

查看:131
本文介绍了EXC_BAD_ACCESS使用gmaps sdk 1.9.0,Xcode 6.4,在8.3设备上运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有2个项目使用谷歌地图sdk,他们目前在Appstore。

I have 2 projects working with google maps sdk, they are currently in the Appstore.

要记住的事情:


  • 通过cocoapods安装的Gmaps sdk版本1.9.0

  • Xcode版本6.4

  • 部署目标7.1

  • 设备:带有8.3.0的iPhone 4s

  • Gmaps sdk version 1.9.0 installed via cocoapods
  • Xcode version 6.4
  • Deployment target 7.1
  • Device: iPhone 4s with 8.3.0

今天我像往常一样打开Xcode第一个项目,试图在iPhone上编译和调试,我有时会在应用程序上获得 EXC_BAD_ACCESS(代码= 1 ...)崩溃,有时会获得 EXC_BAD_ACCESS(代码= EXC_ARM_DA_ALING ...),这里没有堆栈跟踪,但总是在main.m上:

Today I've opened Xcode as usual with the first project, tried to compile and debug on the iPhone and I sometimes get a EXC_BAD_ACCESS (code=1...) crash on the app and sometime get EXC_BAD_ACCESS (code=EXC_ARM_DA_ALING...), no stack trace in here, but always on main.m:

return UIApplicationMain(argc, argv, nil, NSStringFromClass([TGPAppDelegate class]));

看到第一个线程我发现这是错误与谷歌地图有关:

Seeing the first thread I've discovered that this is error is related to google maps:

尝试以下操作:


  • 更新吊舱(无效)

  • 用gmaps sdk页面上的示例代码替换了我的代码(不起作用)*

  • 我已阅读有关自动布局的内容,已禁用(无效)

  • Updating the pod (didn't work)
  • Replaced my code with the sample code on gmaps sdk page (didn't work)*
  • I have read something about auto layout, disabled (didn't work)

奇怪的是我也是:


  • 在iPhone 6中尝试使用8.4(DID工作)

  • 在iPhone 6中尝试使用8.3(DID工作)

这两个项目都处于早期测试状态,所以我没有如果有任何真正的用户有这个问题,但我担心一些用户将无法使用这些应用程序。

Both project are in an early beta state, so I don't if the are any real user have this problem but I'm worried that some users wont be able to use the apps because of this.

我找不到太多通知通过互联网,我甚至不知道在哪里看,有没有报道已知的错误?,其他任何人有同样的问题?

I couldn't find too much information over the internet and I don't even know where to look, is there any reported known error regarding this?, anyone else with the same issue?

这是我正在使用的示例代码:

Here is the sample code I'm using:

-(void)viewDidLoad {
  [super viewDidLoad];

  GMSCameraPosition *camera = [GMSCameraPosition cameraWithLatitude:37.80948
                                                          longitude:5.965699
                                                               zoom:2];

  GMSMapView *mapView = [GMSMapView mapWithFrame:CGRectZero camera:camera];

  self.view = mapView;
}

编辑1:

做更多的测试,发现只有在调试时才会出现问题(在运行应用程序时连接调试器),如果你从iPhone运行应用程序,然后将调试器连接到进程,一切运行正常,我的意思是,如果地图试图在连接调试器时渲染,那么你将获得exc_bad_access,那么调试器错误呢?我很困惑

Doing more tests, found out that the problem appears only when debugging (attaching the debugger when running the app), if you run the app from the iPhone and after that you attach the debugger to the process, everything runs ok, I mean, if the map tries to render when the debugger is attached then you will get the exc_bad_access, it's a debugger error then?, I'm confused

编辑2:

这回答在这里,谢谢戴夫

推荐答案

这个答案这不是我的,这在在这里回答,谢谢戴夫,我只是引用他,所以任何人都可以看到答案。

The answer to this is not mine, this in answered in here , thanks Dave, I' m just quoting him so anyone can see the answer.


我'我们问题的根源和解决方法:

I've found the root of the problem and have a workaround:

问题似乎是由XCode中的OpenGL ES帧捕获引发的;
我猜这个问题是在苹果公司将混合金币作为
的XCode 6.4 / iOS 8.3加入混合时开始的,这可能会对整个
帧捕获调试系统造成不利影响。

The problem seems to be triggered by OpenGL ES Frame Capture in XCode; I'm guessing this problem started when Apple added Metal to the mix as of XCode 6.4/iOS 8.3, perhaps somehow adversely affecting the entire frame capture debugging system.

解决方法:
编辑:我找到问题的根源并找到解决方法:

The workaround: I've found the root of the problem and have a workaround:

问题似乎是由XCode中的OpenGL ES帧捕获引发的;
我猜这个问题是在苹果公司将混合金币作为
的XCode 6.4 / iOS 8.3加入混合时开始的,这可能会对整个
帧捕获调试系统造成不利影响。

The problem seems to be triggered by OpenGL ES Frame Capture in XCode; I'm guessing this problem started when Apple added Metal to the mix as of XCode 6.4/iOS 8.3, perhaps somehow adversely affecting the entire frame capture debugging system.

解决方法:


  1. 在XCode中,转到产品>计划>编辑方案...

  2. 选择左侧的运行选项卡。

  3. 选择顶部的选项子选项卡。

  4. 将GPU Frame Capture从Automatically Enabled或OpenGL ES更改为Metal或Disabled。

  1. In XCode, go to Product > Scheme > Edit Scheme...
  2. Select the "Run" Tab on the left.
  3. Select the "Options" sub-tab on the top.
  4. Change "GPU Frame Capture" from "Automatically Enabled" or "OpenGL ES" to either "Metal" or "Disabled".

这会禁用OpenGL ES帧捕获,这不是很好,但允许
继续调试构建。

This disables OpenGL ES frame capture, which isn't great, but allows you to continue debugging your builds.

不确定这个问题是Apple还是谷歌,但我会向两者发布bug
报告。快乐的编码!

Not sure if this issue is Apple's or Google's but I'll be posting bug reports to both. Happy coding!

这篇关于EXC_BAD_ACCESS使用gmaps sdk 1.9.0,Xcode 6.4,在8.3设备上运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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