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.

Leave a Comment