onaio / kujaku

Mapping and check-in library for Android using MapBox SDK
https://ona.io
BSD 2-Clause "Simplified" License
18 stars 13 forks source link

GeoWidget Sample App crashes when you touch a point while the cards are moving #190

Closed craigappl closed 5 years ago

craigappl commented 5 years ago

The GeoWidget Sample App engages some type of animation when users select either a point or a card. This animation changes the info window. If a user touches another point while the animation is processing, the GeoWidget Sample App crashes.

Recreation Steps:

Log:

11-13 16:39:08.835  6008  6008 D InfoWindowViewHolder: Info window unselected animation started
11-13 16:39:08.860  6008  6008 D InfoWindowViewHolder: Info window unselected animation started
11-13 16:39:08.882  6008  6008 D InfoWindowViewHolder: Info window unselected animation started
11-13 16:39:08.893  6008  6008 D InfoWindowViewHolder: Info window selected animation started
11-13 16:39:09.109  6008  6008 D InfoWindowViewHolder: Info window selected animation started
11-13 16:39:09.136  6008  6008 D InfoWindowViewHolder: Info window unselected animation started
11-13 16:39:09.136  6008  6008 D AndroidRuntime: Shutting down VM
11-13 16:39:09.150  6008  6008 E AndroidRuntime: FATAL EXCEPTION: main
11-13 16:39:09.150  6008  6008 E AndroidRuntime: Process: io.ona.kujaku.sample, PID: 6008
11-13 16:39:09.150  6008  6008 E AndroidRuntime: java.lang.IndexOutOfBoundsException: Index: 16, Size: 16
11-13 16:39:09.150  6008  6008 E AndroidRuntime:        at java.util.ArrayList.get(ArrayList.java:411)
11-13 16:39:09.150  6008  6008 E AndroidRuntime:        at io.ona.kujaku.adapters.InfoWindowAdapter.focusOnPosition(InfoWindowAdapter.java:108)
11-13 16:39:09.150  6008  6008 E AndroidRuntime:        at io.ona.kujaku.activities.MapActivity.scrollToInfoWindowPosition(MapActivity.java:496)
11-13 16:39:09.150  6008  6008 E AndroidRuntime:        at io.ona.kujaku.activities.MapActivity.showInfoWindowListAndScrollToPosition(MapActivity.java:490)
11-13 16:39:09.150  6008  6008 E AndroidRuntime:        at io.ona.kujaku.activities.MapActivity.focusOnFeature(MapActivity.java:594)
11-13 16:39:09.150  6008  6008 E AndroidRuntime:        at io.ona.kujaku.activities.MapActivity.focusOnFeature(MapActivity.java:609)
11-13 16:39:09.150  6008  6008 E AndroidRuntime:        at io.ona.kujaku.activities.MapActivity.onMapClick(MapActivity.java:464)
11-13 16:39:09.150  6008  6008 E AndroidRuntime:        at com.mapbox.mapboxsdk.maps.MapGestureDetector.notifyOnMapClickListeners(MapGestureDetector.java:908)
11-13 16:39:09.150  6008  6008 E AndroidRuntime:        at com.mapbox.mapboxsdk.maps.MapGestureDetector$StandardGestureListener.onSingleTapConfirmed(MapGestureDetector.java:343)
11-13 16:39:09.150  6008  6008 E AndroidRuntime:        at com.mapbox.android.gestures.StandardGestureDetector$1.onSingleTapConfirmed(StandardGestureDetector.java:81)
11-13 16:39:09.150  6008  6008 E AndroidRuntime:        at android.view.GestureDetector$GestureHandler.handleMessage(GestureDetector.java:300)
11-13 16:39:09.150  6008  6008 E AndroidRuntime:        at android.os.Handler.dispatchMessage(Handler.java:102)
11-13 16:39:09.150  6008  6008 E AndroidRuntime:        at android.os.Looper.loop(Looper.java:154)
11-13 16:39:09.150  6008  6008 E AndroidRuntime:        at android.app.ActivityThread.main(ActivityThread.java:6119)
11-13 16:39:09.150  6008  6008 E AndroidRuntime:        at java.lang.reflect.Method.invoke(Native Method)
11-13 16:39:09.150  6008  6008 E AndroidRuntime:        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
11-13 16:39:09.150  6008  6008 E AndroidRuntime:        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
11-13 16:39:09.152  1158  2933 W ActivityManager:   Force finishing activity io.ona.kujaku.sample/io.ona.kujaku.activities.MapActivity
11-13 16:39:09.157  1158  2933 D ActivityTrigger: ActivityTrigger activityPauseTrigger
craigappl commented 5 years ago

@ekigamba and @githengi we need to triage this and see if the refactor will cover it. I'm not sure if we are going to display the sliding cards across the bottom in the next release of the sample app, or if we will just use Reveal as the sample host application. Can you discuss this and identify if this bug should be a priority before GeoWidget v2?

ekigamba commented 5 years ago

I think that it's not a priority since we are not going to be using the cards for v1, probably even v2. In the current implementation, the cards are going to be created and managed by the host application. However, we are going to use it at some point next year when we have the GeoWidget being called through intents.

githengi commented 5 years ago

The cards can be implemented on host application e.g reveal, since the may contain custom business logic

craigappl commented 5 years ago

The developer team discussed this ticket and determined that the app is crashing because of a state change while an animation is being executed. They stated that we will not use this animation in Reveal and will remove it in the next release of the GeoWidget, replacing it with what we build for Reveal. We plan to close this bug as won't do because it was for Release 1's sample app that is used for demonstration purposes only and will be replaced in the next release.