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

Crash when converting screencoordinate as part of moveBy #555

Merged
merged 2 commits into from
Sep 14, 2020

Conversation

tobrun
Copy link
Member

@tobrun tobrun commented Sep 11, 2020

we use Transform::moveBy for scrolling and fling gestures. There are cases as reported by customers that sometimes NaN value are produced for the latitude value:

java.lang.Error: latitude must not be NaN	
at com.mapbox.mapboxsdk.maps.NativeMapView.nativeMoveBy(NativeMapView.java)
at com.mapbox.mapboxsdk.maps.NativeMapView.moveBy(NativeMapView.java:242)
at com.mapbox.mapboxsdk.maps.Transform.moveBy(Transform.java:313)
at com.mapbox.mapboxsdk.maps.MapGestureDetector$MoveGestureListener.onMove(MapGestureDetector.java:494)

This happens as part of screenCoordinateToLatLng within Transform::moveBy.


Capturing from @pozdnyakov in an upstream ticket:

map transform API is not exception-free. Could this exception be caught and handled on platform side?

This PR addresses above comment by wrapping nativeMoveBy and logging the occurrence.

@tobrun tobrun self-assigned this Sep 11, 2020
@tobrun tobrun requested a review from Chaoba September 14, 2020 11:17
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants