laptop and a wrench

Bug

'Open map URL' sample with a custom implementation of the OnMapsClicked method crashes and returns the error message, "Exception Unhandled System.ObjectDisposedException: 'Cannot access a disposed object. Object name: 'MapView'.'" after locking and unlocking the device.

Last Published: December 24, 2020 ArcGIS Runtime SDK
Bug ID Number BUG-000136140
SubmittedDecember 14, 2020
Last ModifiedJuly 5, 2025
Applies toArcGIS Runtime SDK
Version found100.9
Operating SystemApple iOS
Operating System Version12.0x
Version Fixed100.11
StatusFixed

Workaround

Use a custom renderer for MapView. Refer to: https://community.esri.com/t5/arcgis-runtime-sdk-for-net/mapview-objectdisposedexception-ios/m-p/668849#M8426. 

[assembly: ExportRenderer(typeof(Esri.ArcGISRuntime.Xamarin.Forms.MapView), typeof(MyMapViewRenderer))]

namespace xxx.Forms.iOS

{

public class MyMapViewRenderer : MapViewRenderer 

{

protected override bool ManageNativeControlLifetime => false;

}

}

Steps to Reproduce

Bug ID: BUG-000136140

Software:

  • ArcGIS Runtime SDK

Get notified when the status of a bug changes

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options