Yoa*_*rtz 39 xcode google-maps objective-c ios
我的代码完全正常,直到大约3天前.我已经尝试回到一个更老的提交,它工作了100%,现在它仍然与exc_bad崩溃.崩溃只发生在设备上运行应用程序时,如果我在模拟器上运行应用程序或使用仪器在设备上运行应用程序,它运行完全正常.当我更改我的谷歌API密钥时,它说"您可能没有权限使用此API密钥",但不再崩溃.
该应用程序仅在通过xcode在设备上运行应用程序时崩溃.如果稍后在设备上运行相同版本而未连接到xcode,则可以正常工作.
我不知道我可以在这里添加哪些信息来帮助调试问题.我最近将xcode更新为6.4并使用最新更新更新了OSX.
我正在使用谷歌1.10.1 sdk版本,使用CocoaPods安装
我用来添加地图的代码:
self.mapView = [GMSMapView mapWithFrame:self.view.bounds camera:camera];
self.mapView.myLocationEnabled = YES;
self.mapView.settings.myLocationButton = YES;
self.mapView.delegate = self;
[self.mapView addObserver:self
forKeyPath:@"myLocation"
options:NSKeyValueObservingOptionNew
context:NULL];
[self.view insertSubview:self.mapView atIndex:1];
Run Code Online (Sandbox Code Playgroud)
错误本身在code = 1,code = 2和code = 257之间变化.我尝试使用故事板而不是代码添加GMSMapView.我已经尝试安装旧版本的xcode并再次运行但它没有改变任何东西.
如果我注释掉插入子视图行,该应用程序不会崩溃.我试过运行僵尸乐器工具,但当我使用乐器运行时,应用程序工作正常.
#0 0x0000000100c5dc34 in EAGLContext_renderbufferStorageFromDrawable(EAGLContext*, objc_selector*, unsigned long, id<EAGLDrawable>) ()
#1 0x00000001002404c0 in gmscore::renderer::ios::GLRenderTarget::CreateFramebuffer() ()
#2 0x00000001002403cc in gmscore::renderer::ios::GLRenderTarget::FrameStart() ()
#3 0x00000001002e7af4 in gmscore::renderer::EntityRenderer::Draw(bool) ()
#4 0x00000001002516f4 in -[GMSPhoenixRenderer drawIfNeeded] ()
#5 0x00000001002329a0 in -[GMSEntityRendererView draw] ()
#6 0x000000010028dc74 in -[GMSDisplayLink displayLinkFired:] ()
#7 0x0000000100c5ca9c in -[DYDisplayLinkInterposer forwardDisplayLinkCallback:] ()
#8 0x00000001887f629c in CA::Display::DisplayLinkItem::dispatch() ()
#9 0x00000001887f6134 in CA::Display::DisplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long) ()
#10 0x00000001855d1470 in IODispatchCalloutFromCFMessage ()
#11 0x00000001843c2dc4 in __CFMachPortPerform ()
#12 0x00000001843d7a54 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ ()
#13 0x00000001843d79b4 in __CFRunLoopDoSource1 ()
#14 0x00000001843d5934 in __CFRunLoopRun ()
#15 0x00000001843012d4 in CFRunLoopRunSpecific ()
#16 0x000000018db1f6fc in GSEventRunModal ()
#17 0x0000000188ec6fac in UIApplicationMain ()
#18 0x000000010002d794 in main at /Users/yoavschwartz/Documents/donkey_republic_ios/DonkeyRepublic/DonkeyRepublic/main.m:14
#19 0x0000000196272a08 in start ()
Run Code Online (Sandbox Code Playgroud)
重新启动计算机/设备时,此问题似乎已解决,现在再次弹出.我真的不明白发生了什么.
Dav*_*ole 106
编辑:我找到了问题的根源并有一个解决方法:
问题似乎是由XCode中的OpenGL ES帧捕获引发的; 我猜这个问题已经开始,当Apple在XCode 6.4/iOS 8.3中添加Metal时,可能会以某种方式对整个帧捕获调试系统产生负面影响.
解决方法:
这会禁用OpenGL ES帧捕获,这不是很好,但允许您继续调试构建.
不确定这个问题是苹果还是谷歌,但我会向两者发布错误报告.快乐的编码!
-
早先的帖子:
一些进一步的信息(会使这个评论,但还没有完成代表),因为我也遇到了这个问题; 我能说得最好:
我可能会错过赃物赏金的最后期限,但我明天要花一整天深入挖掘并报告.
| 归档时间: |
|
| 查看次数: |
6244 次 |
| 最近记录: |