Adding Google Maps as Subview Crashes iOS App with Exc_Bad

Adding google maps as subview crashes iOS app with exc_bad

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:

  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".

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!

--

earlier post:

Some further info (would make this a comment but don't have the rep quite yet) as I'm experiencing this too; as best I can tell:

  • The issue is apparent in XCode 6.4 as well as XCode 7 beta 3
  • It presents itself in debug mode only, not running outside XCode.
  • It doesn't manifest on iOS 8.1.2 but it does on iOS 8.3.
  • It happens with both Google Maps 1.9.X (imported as a Framework file) as well as 1.10.X (imported as a CocoaPod, including the latest)
  • I can't verify this completely yet but it hasn't shown up in XCode 6.3.2 for me; this might be because I can't compile for 8.3 in that version.

I'll likely miss the deadline for the swag bounty but I'm spending all day tomorrow digging deeper and will report back.

EXC_BAD_ACCESS Using gmaps sdk 1.9.0, Xcode 6.4, running on 8.3 device

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:

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:

  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".

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!

Google Maps iOS SDK crash

Problem that I used Autolayout view.

Application crash without any error when i load google map

After lots of research i found the solution for this.

I change in the product>Schema>Edit Schema>Run>Option>GPU Frame Capture = Metal or Disable not get success with this. I found this solution from here

iPhone - Need some help with EXC_BAD_ACCESS that drives me crazy (full source code included)


[self.myMapView removeAnnotation:self.myMapView.userLocation];

This line is causing the crash from stacktrace this is what I've seen.

When I saw exc_bad_access I did a bt in gdb. I have added Guard Malloc breakpoint. Looking at the stack it said about removing annotation.

Get EXC_BAD_ACCESS error after adding a viewcontroller'view as subView to another viewcontroller's view?

The issue is that SecondViewController is not assigned to strong variable / property, therefore it is deallocated when the method returns.

Any variable pointing to an object, inside a method (called automatic variable if I remember correctly), will be removed from the memory when the method returns. As a result, object pointed to by that variable will be released. If this object is not retained anywhere else, by for example assigning to a strong property or strong instance variable, it will be deallocated. Now, what you are doing is, you grab second view controller's view and stick it into view hierarchy of the view controller's view where this method is defined. The method returns, variable is popped off the stack, SampleViewController is not retained in any way, so it gets released. Any actions that "new" view performs, that result in a call to its view controller (the second view controller), such as button tap event notification, will end up in a crash, as that view controller is no longer in the memory.

Btw. You are simply not doing it right. Look at View Controller Containment API, if you wanna write custom containers.

Why Google Maps crashes with Attempt to set an unknown enum value error?

Finally, after the all updates above, I came up with an idea that I should delete the app in my phone and run it again. Then, it worked! I don't know why it has worked. Possibly, this error occurs only in debug version of the app.



Related Topics



Leave a reply



Submit