Android kills app after instantiating multiple MapView objects

391
0
05-24-2022 01:21 AM
jabbink
New Contributor

In a Xamarin Forms application we are working on, using the Prism Library for navigation, we noticed one of our views containing an ArcGIS map would become very sluggish and eventually crash on older devices.

I made a minimal application using the default Xamarin Forms template (without Prism) to reproduce this issue.

Relevant parts:

  • on navigation, a new ContentPage with the MapView component is initialized (the way Prism does this as well); although only instantiating it once and moving to this singleton reduces the issue, after many more page transitions, the app will still crash
  • this only happens on older Android devices (some Android 11, some Android 10, seems consistent on Android 9; have not seen it on Android 12); not on iOS, nor on UWP
  • Originally encountered on Esri.ArcGISRuntime.Xamarin.Forms 100.10.0 (same as sample project), but also reproduced on 100.14, 100.7 and 100.3

Repository with a minimally reproducible test case: https://github.com/jabbink/EsriMapNavigation

Did I miss something in the documentation on how to properly dispose this component, or is this a known bug?

0 Kudos
0 Replies