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

User location annotation callout crash in v3.5.1 #8674

Closed
lopemac opened this issue Apr 7, 2017 · 4 comments
Closed

User location annotation callout crash in v3.5.1 #8674

lopemac opened this issue Apr 7, 2017 · 4 comments
Labels
crash iOS Mapbox Maps SDK for iOS
Milestone

Comments

@lopemac
Copy link

lopemac commented Apr 7, 2017

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

@lopemac lopemac 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 Apr 7, 2017
@tobrun tobrun added the iOS Mapbox Maps SDK for iOS label Apr 7, 2017
@friedbunny
Copy link
Contributor

friedbunny commented Apr 7, 2017

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

@friedbunny friedbunny added this to the ios-v3.5.2 milestone Apr 7, 2017
@friedbunny friedbunny changed the title iOS 10.3 and 10.3.1 "Your Are Here" label crash User location annotation callout crash in v3.5.1 Apr 7, 2017
@friedbunny
Copy link
Contributor

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

@1ec5
Copy link
Contributor

1ec5 commented Apr 7, 2017

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

@boundsj
Copy link
Contributor

boundsj commented Apr 7, 2017

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

@boundsj boundsj closed this as completed Apr 7, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
crash iOS Mapbox Maps SDK for iOS
Projects
None yet
Development

No branches or pull requests

5 participants