Crash with "-[GMSCoordinateBounds CGRectValue]: unrecognized selector sent to instance"

jan-hendrik.diederich's Avatar

jan-hendrik.diederich

16 Aug, 2017 01:02 PM

Hello,
I use Google Maps for iOS and get always a crash when launching Reveal 9 from AppCode with the following error message:
-[GMSCoordinateBounds CGRectValue]: unrecognized selector sent to instance

Of course GMSCoordinateBounds has no CGRectValue method, so Reveal shouldn't call it.

Please fix that. Thanks.

  1. Support Staff 1 Posted by Tony Arnold on 16 Aug, 2017 10:32 PM

    Tony Arnold's Avatar

    Hello,

    We've had a look and Google Maps for iOS doesn't crash Reveal out of the box. Reveal only reads properties defined by UIKit, and none of those return the GMSCoordinateBounds value type.

    Is your app storing to, or returning GMSCoordinateBounds from any of the following properties (or properties like them)?

    CALayer.contentsRect
    CALayer.contentsCenter
    CALayer.bounds
    CALayer.frame
    UILayoutGuide.layoutFrame
    UIView.bounds
    UIView.frame
    UIView.accessibilityFrame
    

    thanks,

    Tony

  2. 2 Posted by jan-hendrik.die... on 17 Aug, 2017 08:00 AM

    jan-hendrik.diederich's Avatar

    I looked everywhere and couldn't find any place where I assign GMSCoordinateBounds to anything other than temporary local variables.
    It's used for a call to "moveCamera(...)" and the result from "map.projection.visibleRegion()", which is immediately converted to something else and the GMSCoordinateBounds variable then removed from the stack.

    But my map usage is very complex.
    Please, just add a "respondsToSelector" test before you call on any objects found via reflection.

  3. Support Staff 3 Posted by Tony Arnold on 21 Aug, 2017 03:59 AM

    Tony Arnold's Avatar

    We'll look at adding a fix in a future release, thanks for the detail.

    It's worth pointing out that Reveal reads a pre-defined list of properties from a pre-defined list of UIKit classes, so it is possible that something in your view hierarchy is returning a GMSCoordinateBounds value from a property or method that should be returning CGRect.

    It may not cause you any issues, but it's worth keeping an eye on.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac