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

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

What you need to keep in mind:

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

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

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

When I saw the first thread, I found that this error is related to google maps:

Thread 1

Tried the following:

  • Module update (does not work)
  • Replaced my code with sample code on the gmaps sdk page (did not work) *
  • I read something about auto-linking, disconnected (didn't work)

The strange part is that I also:

  • Tried on iPhone 6 with 8.4 (working with DID)
  • Tried on iPhone 6 with 8.3 (working with DID)

Both projects are in early beta state, so I don’t do it if any real user has this problem, but I’m worried that some users will not be able to use applications because of this.

I could not find too much information on the Internet, and I don’t even know where to look, is there any known mistake regarding this ?, anyone else with the same problem?

Here is an example of the 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; } 

EDIT 1:

Performing more tests, it turned out that the problem only occurs during debugging (attaching the debugger when the application starts), if you start the application from the iPhone, and after that you attach the debugger to the process, everything works fine, I mean that if the card tries to display when connected debugger, you get exc_bad_access, is this a debugger error ?, I got confused

EDIT 2:

This is the answer here , thanks Dave

+6
source share
3 answers

The answer to this question is not mine, it is in the answer here , thanks Dave , I just quote it so that everyone can see the answer.

I found the root of the problem and workaround:

It seems that the problem is caused by OpenGL ES Frame Capture in Xcode; I guess this problem started when Apple added Metal to the mix, like XCode 6.4 / iOS 8.3, possibly somehow negatively affecting the whole frame capture debugging system.

Workaround: EDIT: I found the root of the problem and workaround:

It seems that the problem is caused by OpenGL ES Frame Capture in Xcode; I guess this problem started when Apple added Metal to the mix, like XCode 6.4 / iOS 8.3, possibly somehow negatively affecting the whole frame capture debugging system.

Workaround:

  • In Xcode, go to Product> Scheme> Edit Scheme ...
  • Select the Launch tab on the left.
  • Select the Options tab at the top.
  • Change “GPU Frame Capture” from “Automatically Enabled” or “OpenGL ES” to “Metal” or “Disabled”.

This disables the capture of OpenGL ES frames, which is not very convenient, but allows you to continue debugging your collections.

Not sure if this is an Apple or Google issue, but I will post an error that reports both. Happy coding!

+9
source

Same issue here with MKMapView. The solution is rollback (performed side by side) Xcode 6.3.2. http://adcdownload.apple.com/Developer_Tools/Xcode_6.3.2/Xcode_6.3.2.dmg Also switch the command line tools to 6.3.2 in the settings → Location

+1
source

i had the same problem:

iphone 4 → iOs 7 (working)

xcode simulator (working)

iphone 5s → iOs 8.3 (EXC_BAD_ACCESS does not work)

SOLUTION: I upgraded my iphone to iOS 8.4, and the problem disappeared, maps are loading.

hope this helps

0
source

All Articles