eopeter / flutter_mapbox_navigation

Turn By Turn Navigation for Your Flutter Application
Apache License 2.0
217 stars 184 forks source link

App crashes at short intervals #130

Closed supertech11 closed 1 year ago

supertech11 commented 3 years ago

Hi all, please have been able to setup the package successfully but i noticed the app crashes if the interval between the origin and the stop point is small. Below is the log

java.lang.IllegalArgumentException: NaN is not a valid double value as per JSON specification. To override this behavior, use GsonBuilder.serializeSpecialFloatingPointValues() method. E/AndroidRuntime( 7282): at com.google.gson.Gson.checkValidFloatingPoint(Gson.java:359) E/AndroidRuntime( 7282): at com.google.gson.Gson$2.write(Gson.java:351) E/AndroidRuntime( 7282): at com.google.gson.Gson$2.write(Gson.java:337) E/AndroidRuntime( 7282): at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.write(TypeAdapterRuntimeTypeWrapper.java:69) E/AndroidRuntime( 7282): at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.write(ReflectiveTypeAdapterFactory.java:127) E/AndroidRuntime( 7282): at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.write(ReflectiveTypeAdapterFactory.java:245) E/AndroidRuntime( 7282): at com.google.gson.Gson.toJson(Gson.java:704) E/AndroidRuntime( 7282): at com.google.gson.Gson.toJson(Gson.java:683) E/AndroidRuntime( 7282): at com.google.gson.Gson.toJson(Gson.java:638) E/AndroidRuntime( 7282): at com.google.gson.Gson.toJson(Gson.java:618) E/AndroidRuntime( 7282): at com.dormmom.flutter_mapbox_navigation.utilities.PluginUtilities$Companion.sendEvent(PluginUtilities.kt:46) E/AndroidRuntime( 7282): at com.dormmom.flutter_mapbox_navigation.activity.NavigationActivity.onRouteProgressChanged(NavigationActivity.kt:175) E/AndroidRuntime( 7282): at com.mapbox.navigation.core.trip.session.MapboxTripSession.updateRouteProgress(MapboxTripSession.kt:549) E/AndroidRuntime( 7282): at com.mapbox.navigation.core.trip.session.MapboxTripSession.access$updateRouteProgress(MapboxTripSession.kt:50) E/AndroidRuntime( 7282): at com.mapbox.navigation.core.trip.session.MapboxTripSession$updateDataFromNavigatorStatus$updateNavigatorStatusDataJob$1.invokeSuspend(MapboxTripSession.kt:519) E/AndroidRuntime( 7282): at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) E/AndroidRuntime( 7282): at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) E/AndroidRuntime( 7282): at android.os.Handler.handleCallback(Handler.java:883) E/AndroidRuntime( 7282): at android.os.Handler.dispatchMessage(Handler.java:100) E/AndroidRuntime( 7282): at android.os.Looper.loop(Looper.java:264) E/AndroidRuntime( 7282): at android.app.ActivityThread.main(ActivityThread.java:7684) E/AndroidRuntime( 7282): at java.lang.reflect.Method.invoke(Native Method) E/AndroidRuntime( 7282): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492) E/AndroidRuntime( 7282): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:980) I/Process ( 7282): Sending signal. PID: 7282 SIG: 9

supertech11 commented 3 years ago

This happens when distance is less than 100m and you try navigating

eopeter commented 1 year ago

Stale issue message

eopeter commented 1 year ago

Please reopen if you still see this issue