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

[ANDROID] Feature with empty string id causing NumberFormatException #9594

Closed
sddamico opened this issue Jul 24, 2017 · 6 comments
Closed

[ANDROID] Feature with empty string id causing NumberFormatException #9594

sddamico opened this issue Jul 24, 2017 · 6 comments
Labels
Android Mapbox Maps SDK for Android

Comments

@sddamico
Copy link

Platform: Android
Mapbox SDK version: 5.1.1

Steps to trigger behavior

  1. Add shape features with an empty string id to map (not sure if possible with runtime styling, but certainly possible with vector tiles)
  2. Tap on shape...
07-24 14:49:03.443 15223-15223/? E/AndroidRuntime: FATAL EXCEPTION: main
                                                   Process: com.seatgeek.android, PID: 15223
                                                   java.lang.NumberFormatException: For input string: ""
                                                       at java.lang.Long.parseLong(Long.java:455)
                                                       at java.lang.Long.valueOf(Long.java:542)
                                                       at com.mapbox.mapboxsdk.maps.AnnotationManager$ShapeAnnotationHitResolver.execute(AnnotationManager.java:729)
                                                       at com.mapbox.mapboxsdk.maps.AnnotationManager.onTap(AnnotationManager.java:651)
                                                       at com.mapbox.mapboxsdk.maps.MapGestureDetector$GestureListener.onSingleTapConfirmed(MapGestureDetector.java:318)
                                                       at android.view.GestureDetector$GestureHandler.handleMessage(GestureDetector.java:300)
                                                       at android.os.Handler.dispatchMessage(Handler.java:102)
                                                       at android.os.Looper.loop(Looper.java:154)
                                                       at android.app.ActivityThread.main(ActivityThread.java:6121)
                                                       at java.lang.reflect.Method.invoke(Native Method)
                                                       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889)
                                                       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779)
@jfirebaugh
Copy link
Contributor

Duplicate of #9584.

@jfirebaugh jfirebaugh marked this as a duplicate of #9584 Jul 24, 2017
@tobrun
Copy link
Member

tobrun commented Jul 25, 2017

@sddamico,
The issue is fixed with #9585 and will be shipped with 5.1.2. I'm still trying to understand the root cause. ShapeAnnotationHitResolver should only query layers with id:

com.mapbox.annotations.shape.i

Where i equals the id of shape annotation. Could you validate if your vector tile has such layers?

@tobrun
Copy link
Member

tobrun commented Jul 25, 2017

This issue was figured out, when you don't have any ShapeAnnotations, it will query all the layers.

@sddamico
Copy link
Author

@tobrun awesome, glad you all were able to find the root cause there.

Any chance we might see an accelerated release to get this out? 5.1.1 is a no-go for us with this issue...

@tobrun
Copy link
Member

tobrun commented Jul 25, 2017

We are aiming at doing 2 weekly patch releases, at the end of this week fixes will be cherry-picked and snaphot will be generated (this should unblock you for development). A final 5.1.2 should happen somewhere next week.

@tobrun
Copy link
Member

tobrun commented Jul 28, 2017

@sddamico 5.1.2-SNAPSHOT is available for testing

@kkaefer kkaefer added the Android Mapbox Maps SDK for Android label Aug 3, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Android Mapbox Maps SDK for Android
Projects
None yet
Development

No branches or pull requests

4 participants