Null pointer on Mapview when activity OnResume occures

658
1
04-29-2021 11:07 AM
JayBowman12
New Contributor II

I have a mapView and I'm navigating along a route. I switch to another app then back to my navigation app the onResume fires.  ArcGIS runtime is 100.11

 

@Override
    protected void onResume() {
        super.onResume();
        if (mMapView != null) {
            mMapView.resume();
        }
    }

 

The mMapView.resume() is executed and I get this:

Caused by: com.esri.arcgisruntime.ArcGISRuntimeException: Null pointer.: object cannot be null.
at com.esri.arcgisruntime.internal.jni.CoreGeoView.nativeResume(Native Method)
at com.esri.arcgisruntime.internal.jni.CoreGeoView.b(SourceFile:5)
at com.esri.arcgisruntime.a.i.f.g.d(SourceFile:3)
at com.esri.arcgisruntime.mapping.view.GeoView$RenderingThread.resume(SourceFile:4)
at com.esri.arcgisruntime.mapping.view.MapView.resume(SourceFile:1)
at com.thevillages.maplib.MapNavActivity.onResume(MapNavActivity.java:816)

 

0 Kudos
1 Reply
RamaChintapalli
Esri Contributor

Hi,
Could you repro the problem with the following sample?
https://github.com/Esri/arcgis-runtime-samples-android/tree/main/java/navigate-route

If so, do you see it on all devices or seeing this behavior on any specific device. Also can you provide the logcat info when you get this error.

Thanks
Rama

0 Kudos