Select to view content in your preferred language

Bug Esri.ArcGISRuntime.ArcGISRuntimeException: Invalid argument: Scale can't be NAN

865
2
10-05-2023 03:13 AM
Labels (3)
TomášZachoval
Occasional Contributor

Hello I want to find solution, or report a bug for Esri.ArcGISRuntime.Maui Android.

Occasionally happening this bug. Also it was happend on xamarin forms maui it persists. 

I got this log from appcenter

mono.android.view.View_OnTouchListenerImplementor.onTouch
Esri.ArcGISRuntime.ArcGISRuntimeException: Invalid argument: Scale can't be NAN

  • Esri.ArcGISRuntime.ArcGISException.HandleCoreError(CoreError error, Boolean throwException)
  • RuntimeCoreNet.GeneratedWrappers.Interop.CheckError(IntPtr errorHandle, Boolean throwOnFailure, GCHandle wrapperHandle)
  • RuntimeCoreNet.GeneratedWrappers.CoreMapView.InteractionZoomToScale(Double scale, CoreCoordinate2D screenPoint)
  • Esri.ArcGISRuntime.UI.Controls.MapView.OnGeoViewManipulationDelta(PointF origin, PointF screenLocation, Double translateX, Double translateY, Double scale, Double rotation, Boolean isFlick, DeviceIndependentPointingDevice device)
  • Esri.ArcGISRuntime.UI.UserInteractionHandler.OnManipulationDelta(PointF origin, PointF screenLocation, Double translateX, Double translateY, Double scale, Double rotation, Boolean isFlick, DeviceIndependentPointingDevice device)
  • Esri.ArcGISRuntime.UI.AndroidDeviceInteractionHandler.OnTouchEvent(MotionEvent ev)
  • Esri.ArcGISRuntime.UI.Controls.GeoView.<.ctor>b__7_0(Object s, TouchEventArgs e)
  • Android.Views.View.IOnTouchListenerImplementor.OnTouch(View , MotionEvent )
  • Android.Views.View.IOnTouchListenerInvoker.n_OnTouch_Landroid_view_View_Landroid_view_MotionEvent_(IntPtr , IntPtr , IntPtr , IntPtr )
  • Android.Runtime.JNINativeWrapper.Wrap_JniMarshal_PPLL_Z(_JniMarshal_PPLL_Z , IntPtr , IntPtr , IntPtr , IntPtr )

It only for Android. 

Does someone know workaround.

Thank you 

Tomas

 

0 Kudos
2 Replies
dotMorten_esri
Esri Notable Contributor

Hi Tomas,

Thanks for the detailed callstack. That's really helpful. It looks like there are a few cases where Android could return a NaN value from a pinch zoom gesture, that we aren't guarding against. While I don't have a workaround for you, the above is enough information that we at least can get a fix in for the next release.

TomášZachoval
Occasional Contributor

Thank you 🙂

0 Kudos