GeoView's dispose method crashes after migrating to 100.8

1628
4
07-09-2020 10:29 PM
NandKishore
New Contributor II

We are seeing a below crash after upgrading to 100.8 ArcGIS:

 

07-08 17:21:55.821 2741 2797 I TextureView: RenderingThread - Disposing started
07-08 17:21:55.824 2741 2797 E AndroidRuntime: FATAL EXCEPTION: Rendering thread
07-08 17:21:55.824 2741 2797 E AndroidRuntime: Process: com.example.map, PID: 2741
07-08 17:21:55.824 2741 2797 E AndroidRuntime: com.esri.arcgisruntime.ArcGISRuntimeException: Null pointer: object cannot be null.
07-08 17:21:55.824 2741 2797 E AndroidRuntime: at com.esri.arcgisruntime.internal.jni.CoreGeoView.nativePause(Native Method)
07-08 17:21:55.824 2741 2797 E AndroidRuntime: at com.esri.arcgisruntime.internal.jni.CoreGeoView.a(SourceFile:575)
07-08 17:21:55.824 2741 2797 E AndroidRuntime: at com.esri.arcgisruntime.internal.h.b.g.c(SourceFile:1058)
07-08 17:21:55.824 2741 2797 E AndroidRuntime: at com.esri.arcgisruntime.mapping.view.GeoView$RenderingThread.b(SourceFile:1175)
07-08 17:21:55.824 2741 2797 E AndroidRuntime: at com.esri.arcgisruntime.mapping.view.GeoView$RenderingThread.lambda$BRrsZ2XB9Y4rOvLRx6U82gkIAIs(Unknown Source:0)
07-08 17:21:55.824 2741 2797 E AndroidRuntime: at com.esri.arcgisruntime.mapping.view.-$$Lambda$GeoView$RenderingThread$BRrsZ2XB9Y4rOvLRx6U82gkIAIs.run(Unknown Source:2)
07-08 17:21:55.824 2741 2797 E AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:883)
07-08 17:21:55.824 2741 2797 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:100)
07-08 17:21:55.824 2741 2797 E AndroidRuntime: at android.os.Looper.loop(Looper.java:214)
07-08 17:21:55.824 2741 2797 E AndroidRuntime: at com.esri.arcgisruntime.mapping.view.GeoView$RenderingThread.run(SourceFile:1210)
07-08 17:21:55.827 1342 3651 W ActivityTaskManager: Force finishing activity com.example.map/com.example.mapping.ICEHandlingMappingActivity

 

This crash appears from our Activity's onDestroy() when we have called  MapView.dispose() (in turn calling the GeoView class's

RenderingThread's dispose() method)

As this exception occurs in a different thread, we are unable to catch this exception.  

 

Any ideas what causes this crash?

4 Replies
RajashekarReddy1
New Contributor II

Nand Kishore‌ Have you find any solution for this ?

0 Kudos
MarkBaird
Esri Regular Contributor

Can you give me a little more background on this issue?

 - what does your app do?

 - what device are you using?

 - can you share any code?

If you take a very basic app such as this sample can you reproduce it?

0 Kudos
NandKishore
New Contributor II

We went back to ArcGIS version 100.7 to resolve this issue as 100.7 doesn't use TextureView.

Thanks.

0 Kudos
SimonWilks1
New Contributor

I just had the same thing happen with 100.9.0 and in my case this was due to the fact that the MapView was not visible having in some situations been set to: mapView.setVisibility(View.GONE). If mapView.dispose() is called in this state it will crash.

The workaround is to check if it's visible before disposing:

if (mapView != null && mapView.getVisibility() == VISIBLE) {
  mapView.dispose();
}

0 Kudos