EXC_BAD_ACCESS 在 8.3 设备上使用 gmaps sdk 1.9.0,Xcode 6.4,运行
EXC_BAD_ACCESS Using gmaps sdk 1.9.0, Xcode 6.4, running on 8.3 device
我有 2 个项目使用 google maps sdk,它们目前在 Appstore 中。
注意事项:
- Gmaps sdk 版本 1.9.0 通过 cocoapods 安装
- Xcode 版本 6.4
- 部署目标 7.1
- 设备:iPhone 4s with 8.3.0
今天我像往常一样打开了第一个项目 Xcode,尝试在 iPhone 上进行编译和调试,有时我会在应用程序上遇到 EXC_BAD_ACCESS (code=1...)
崩溃,有时得到 EXC_BAD_ACCESS (code=EXC_ARM_DA_ALING...)
,这里没有堆栈跟踪,但总是在 main.m:
return UIApplicationMain(argc, argv, nil, NSStringFromClass([TGPAppDelegate class]));
看到第一个线程我发现这个错误与 google 地图有关:
尝试了以下方法:
- 正在更新 pod(无效)
- 用 gmaps sdk 页面上的示例代码替换了我的代码(没有用)*
- I have read 一些关于自动布局的东西,禁用(没用)
奇怪的是我还:
- 尝试了 iPhone 6 和 8.4(DID 工作)
- 尝试了 iPhone 6 和 8.3(DID 工作)
这两个项目都处于早期测试阶段,所以我不知道是否有真正的用户遇到这个问题,但我担心一些用户因此无法使用这些应用程序。
我在互联网上找不到太多信息,我什至不知道去哪里找,是否有关于此问题的已知错误报告?其他人有同样的问题吗?
这是我使用的示例代码:
-(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,那么这是调试器错误? ,我很困惑
编辑 2:
这在回答 , thanks Dave
我遇到了完全相同的问题:
iphone 4 -> iOs 7(工作)
xcode 模拟器(工作)
iphone 5s -> iOs 8.3(不工作 EXC_BAD_ACCESS)
解决方案:我将 iphone 更新为 iOs 8.4,问题消失了,正在加载地图。
希望对您有所帮助
MKMapView 也有同样的问题。
解决方案是回滚到(运行 并排)Xcode 6.3.2。
http://adcdownload.apple.com/Developer_Tools/Xcode_6.3.2/Xcode_6.3.2.dmg
同时在 Preference -> Locations
中将 Command Line Tools 切换到 6.3.2
这个问题的答案不是我的,答案是 , thanks Dave,我只是引用他的话,这样任何人都可以看到答案。
I've found the root of the problem and have a workaround:
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:
EDIT: I've found the root of the problem and have a workaround:
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:
- In XCode, go to Product > Scheme > Edit Scheme...
- Select the "Run" Tab on the left.
- Select the "Options" sub-tab on the top.
- Change "GPU Frame Capture" from "Automatically Enabled" or "OpenGL ES" to either "Metal" or "Disabled".
This disables OpenGL ES frame capture, which isn't great, but allows
you to continue debugging your builds.
Not sure if this issue is Apple's or Google's but I'll be posting bug
reports to both. Happy coding!
我有 2 个项目使用 google maps sdk,它们目前在 Appstore 中。
注意事项:
- Gmaps sdk 版本 1.9.0 通过 cocoapods 安装
- Xcode 版本 6.4
- 部署目标 7.1
- 设备:iPhone 4s with 8.3.0
今天我像往常一样打开了第一个项目 Xcode,尝试在 iPhone 上进行编译和调试,有时我会在应用程序上遇到 EXC_BAD_ACCESS (code=1...)
崩溃,有时得到 EXC_BAD_ACCESS (code=EXC_ARM_DA_ALING...)
,这里没有堆栈跟踪,但总是在 main.m:
return UIApplicationMain(argc, argv, nil, NSStringFromClass([TGPAppDelegate class]));
看到第一个线程我发现这个错误与 google 地图有关:
尝试了以下方法:
- 正在更新 pod(无效)
- 用 gmaps sdk 页面上的示例代码替换了我的代码(没有用)*
- I have read 一些关于自动布局的东西,禁用(没用)
奇怪的是我还:
- 尝试了 iPhone 6 和 8.4(DID 工作)
- 尝试了 iPhone 6 和 8.3(DID 工作)
这两个项目都处于早期测试阶段,所以我不知道是否有真正的用户遇到这个问题,但我担心一些用户因此无法使用这些应用程序。
我在互联网上找不到太多信息,我什至不知道去哪里找,是否有关于此问题的已知错误报告?其他人有同样的问题吗?
这是我使用的示例代码:
-(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,那么这是调试器错误? ,我很困惑
编辑 2:
这在回答
我遇到了完全相同的问题:
iphone 4 -> iOs 7(工作)
xcode 模拟器(工作)
iphone 5s -> iOs 8.3(不工作 EXC_BAD_ACCESS)
解决方案:我将 iphone 更新为 iOs 8.4,问题消失了,正在加载地图。
希望对您有所帮助
MKMapView 也有同样的问题。 解决方案是回滚到(运行 并排)Xcode 6.3.2。 http://adcdownload.apple.com/Developer_Tools/Xcode_6.3.2/Xcode_6.3.2.dmg 同时在 Preference -> Locations
中将 Command Line Tools 切换到 6.3.2这个问题的答案不是我的,答案是
I've found the root of the problem and have a workaround:
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: EDIT: I've found the root of the problem and have a workaround:
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:
- In XCode, go to Product > Scheme > Edit Scheme...
- Select the "Run" Tab on the left.
- Select the "Options" sub-tab on the top.
- Change "GPU Frame Capture" from "Automatically Enabled" or "OpenGL ES" to either "Metal" or "Disabled".
This disables OpenGL ES frame capture, which isn't great, but allows you to continue debugging your builds.
Not sure if this issue is Apple's or Google's but I'll be posting bug reports to both. Happy coding!