Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

User location annotation callout crash in v3.5.1 #8674

Closed

Description

@lopemac

I'm experiencing an immediate crash when displaying the current location circle label. If the map moves automatically or is moved or tapped in any way while the "You Are Here" default label is showing, the app immediately crashes. My app is using the latest Xcode and Mapbox SDK. I did not experience this behavior with SDK v3.5. When I downgrade back to v3.5, no crash occurs and the map can be moved as normal. I'm displaying the map in a rounded square view and am using these settings in the code under viewDidLoad:

mapinView.tintColor = .darkGray
mapinView.delegate = self
view.addSubview(mapinView)
self.view.addSubview(resetShadow) //used to show location button on top of map
mapinView.layer.cornerRadius = 20

I'm using "mapbox://styles/mapbox/light-v9" in the Style URL settings box. I'm also using the clustering code from the mapbox example page which shows labels without any issues or crashing.

Platform: iOS Swift 3.1 Xcode 8.3.1 running on iPhone 6 10.3.1 and iPhone 5 10.3
Mapbox SDK version: v3.5.1

Error Code from Xcode:

libc++abi.dylib: terminating with uncaught exception of type std::out_of_range: unordered_map::at: key not found
(lldb)

Steps to trigger behavior

  1. Zoom into current location or scroll to show current location
  2. Press on my location circle to get default pop up label that says "You Are Here"
  3. Move map around or tap anywhere while label is still showing

Expected behavior

It should let you scroll map or tap anywhere without any abnormal behavior

Actual behavior

It immediately crashes following the steps above.

simulator screen shot apr 6 2017 6 50 01 pm

Activity

  1. changed the title [-]iOS 10.3 and 10.3.1 crash while panning in map[/-] [+]iOS 10.3 and 10.3.1 "Your Are Here" label crash[/+] on Apr 7, 2017
  2. added
    iOS
    on Apr 7, 2017
  3. friedbunny commented on Apr 7, 2017

    @friedbunny
    Contributor

    Thanks for the report and clear reproduction steps, @lopemac. Here’s the error message associated with this crash:

    libc++abi.dylib: terminating with uncaught exception of type std::out_of_range: unordered_map::at: key not found
    

    Whoops, missed that you had already included this message, @lopemac.

    This would seem to implicate #8637, but there were a few other annotation-related changes in v3.5.1.

    /cc @1ec5 @boundsj @fabian-guerra

  4. added this to the ios-v3.5.2 milestone on Apr 7, 2017
  5. changed the title [-]iOS 10.3 and 10.3.1 "Your Are Here" label crash[/-] [+]User location annotation callout crash in v3.5.1[/+] on Apr 7, 2017
  6. friedbunny commented on Apr 7, 2017

    @friedbunny
    Contributor

    @1ec5 This crash did bisect to #8637 for me.

  7. 1ec5 commented on Apr 7, 2017

    @1ec5
    Contributor

    Looks like #8637 caught a real bug that was inserting bogus values into _annotationContextsByAnnotationTag.

  8. boundsj commented on Apr 7, 2017

    @boundsj
    Contributor

    Fixed in #8686 on the release-ios-v3.5.0-android-v5.0.0 branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    crashiOS

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions