com.esri.arcgisruntime.ArcGISRuntimeException:
at com.esri.arcgisruntime.internal.jni.CoreMapView.nativeSetViewpointScaleAsync (CoreMapView.java)
at com.esri.arcgisruntime.internal.jni.CoreMapView.b (CoreMapView.java:466)
at com.esri.arcgisruntime.internal.h.b.o.b (o.java:389)
at com.esri.arcgisruntime.mapping.view.MapView.setViewpointScaleAsync (MapView.java:509)
at ##########################.zoomOut (##########BaseGisMap.java:272)
at ##########################Fragment.zoomOut (##########GisMapFragment.java:202)
at ##########################.-$$Lambda$h3MyHBBt8NtlFxN6xy62Sz5lvRo.execute (-.java:2)
at ##########################.databinding.FragmentGisMapControlsBindingImpl._internalCallbackOnClick (FragmentGisMapControlsBindingImpl.java:656)
at com.wssc.util.generated.callback.OnClickListener.onClick (OnClickListener.java:11)
at android.view.View.performClick (View.java:7333)
at android.view.View.performClickInternal (View.java:7299)
at android.view.View.access$3200 (View.java:846)
at android.view.View$PerformClick.run (View.java:27774)
at android.os.Handler.handleCallback (Handler.java:873)
at android.os.Handler.dispatchMessage (Handler.java:99)
at android.os.Looper.loop (Looper.java:214)
at android.app.ActivityThread.main (ActivityThread.java:6981)
at java.lang.reflect.Method.invoke (Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1445)
Hi Luke,
If you are able to reproduce this in your app, I recommend you try to catch the ArcGISRuntimeException thrown in `MapView.setViewpointScaleAsync()` and inspect the exception's message and additionalMessage properties. That might give some useful information as to what might be going wrong.
One possibility is that an invalid scale value is passed to `MapView.setViewpointScaleAsync()`, for example a negative value. This would definitely cause an ArcGISRuntimeException to be thrown.
Gunther
Hi Gunther - Unfortunately I cannot reproduce the issue.
Hi Gunther,
I have another issue. Crashes caused by the following stacktrace are trending now. Can your team please look into this?
This stacktrace seems out of nowhere. It is not directly associated with any of our android code. Unfortunately I cannot reproduce this.
Fatal Exception: com.esri.arcgisruntime.ArcGISRuntimeException: Invalid argument
at com.esri.arcgisruntime.internal.jni.CoreMapView.nativeGetMagnifierEnabled(CoreMapView.java)
at com.esri.arcgisruntime.internal.jni.CoreMapView.q + 190(CoreMapView.java:190)
at com.esri.arcgisruntime.internal.h.b.o.s + 304(o.java:304)
at com.esri.arcgisruntime.mapping.view.MapView.isMagnifierEnabled + 383(MapView.java:383)
at com.esri.arcgisruntime.mapping.view.DefaultMapViewOnTouchListener.onLongPress + 643(DefaultMapViewOnTouchListener.java:643)
at com.esri.arcgisruntime.mapping.view.DefaultMapViewOnTouchListener$2.run + 164(DefaultMapViewOnTouchListener.java:164)
at android.os.Handler.handleCallback + 789(Handler.java:789)
at android.os.Handler.dispatchMessage + 98(Handler.java:98)
at android.os.Looper.loop + 164(Looper.java:164)
at android.app.ActivityThread.main + 6944(ActivityThread.java:6944)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run + 327(Zygote.java:327)
at com.android.internal.os.ZygoteInit.main + 1374(ZygoteInit.java:1374)
Thanks,
Luke
Hi Luke,
Judging from the call stack the users does a long press on the MapView which causes the magnifier to be shown (I assume you have enabled the magnifier via `MapView.setMagnifierEnabled()`?). There are two possibilities why this could be causing the Invalid argument exception:
1. Invalid screen coordinates are set when the magnifier is shown.
2. As the user pans the map while the magnifier is visible, invalid screen coordinates are set for panning the map.
I'm not sure how either of these cases could be reproduced, but it might be worth to try these workflows in your app.
Gunther