mapbox-maps-android icon indicating copy to clipboard operation
mapbox-maps-android copied to clipboard

Crash during drag

Open akirmse opened this issue 2 years ago • 2 comments

Environment

  • Android OS version: 12
  • Devices affected: Samsung Galaxy S10
  • Maps SDK Version: 10.6.1

I got the following crash reported via Crashlytics from a user:

Fatal Exception: java.lang.Error latitude must not be NaN

com.mapbox.maps.CameraManager.getDragCameraOptions (CameraManager.java) com.mapbox.maps.NativeMapImpl.getDragCameraOptions (NativeMapImpl.kt:55) com.mapbox.maps.MapboxMap.getDragCameraOptions (MapboxMap.kt:1643) com.mapbox.maps.plugin.gestures.GesturesPluginImpl.handleMove$plugin_gestures_release (GesturesPluginImpl.kt:1412) com.mapbox.maps.plugin.gestures.GesturesPluginImpl$MoveGestureListener.onMove (GesturesPluginImpl.kt:492) com.mapbox.android.gestures.MoveGestureDetector.analyzeMovement (MoveGestureDetector.java:158) com.mapbox.android.gestures.MultiFingerGesture.analyzeEvent (MultiFingerGesture.java:106) com.mapbox.android.gestures.ProgressiveGesture.analyzeEvent (ProgressiveGesture.java:55) com.mapbox.android.gestures.MoveGestureDetector.analyzeEvent (MoveGestureDetector.java:141) com.mapbox.maps.plugin.gestures.GesturesPluginImpl. (GesturesPluginImpl.kt:61) com.mapbox.android.gestures.BaseGesture.analyze (BaseGesture.java:61) com.mapbox.android.gestures.BaseGesture.onTouchEvent (BaseGesture.java:39) com.mapbox.android.gestures.AndroidGesturesManager.onTouchEvent (AndroidGesturesManager.java:193) com.mapbox.maps.plugin.gestures.GesturesPluginImpl.onTouchEvent (GesturesPluginImpl.kt:287) com.mapbox.maps.plugin.MapPluginRegistry.onTouch (MapPluginRegistry.kt:128) com.mapbox.maps.MapController.onTouchEvent (MapController.kt:174) com.mapbox.maps.MapView.onTouchEvent (MapView.kt:299) android.view.View.dispatchTouchEvent (View.java:15076)

(... many more internal Android stack frames)

akirmse avatar Jul 24 '22 15:07 akirmse

Looks like this should be fixed by https://github.com/mapbox/mapbox-maps-android/pull/1492, that's available in https://github.com/mapbox/mapbox-maps-android/releases/tag/android-v10.7.0-rc.1.

kiryldz avatar Jul 25 '22 09:07 kiryldz

I don't think this was fixed. I just got a crash report with the same stack trace running version 10.8.1 of the library. The device is a Galaxy J5 Prime running Android 8.

akirmse avatar Sep 21 '22 01:09 akirmse

@kiryldz I just reproduced this locally on my first use of version 10.9.0 on a Samsung Galaxy S9.

akirmse avatar Oct 21 '22 22:10 akirmse

It seems is crashing at a different place, added a fix in https://github.com/mapbox/mapbox-maps-android/pull/1906, @akirmse could you try it out when it's landed?

pengdev avatar Dec 09 '22 15:12 pengdev