Hello we have many technicians who use our application in the field and often this error happens and the app crashes. The map is displayed on a page, we use shape files, the error occur when the page is closed. We have never been able to replicate the case, but it happens to technicians very often. Below the stack trace.
Esri.ArcGISRuntime.ArcGISException.HandleCoreError(CoreError error, Boolean throwException) at RuntimeCoreNet.GeneratedWrappers.Interop.CheckError(IntPtr , Boolean , GCHandle ) at RuntimeCoreNet.GeneratedWrappers.CoreLocationDataSource.UpdateHeading(Double ) at Esri.ArcGISRuntime.Location.LocationDataSource.UpdateHeading(Double ) at Esri.ArcGISRuntime.Location.SystemLocationDataSource.CompassProvider_HeadingChanged(Object sender, Double heading) at Esri.ArcGISRuntime.Location.CompassProvider.OnHeadingChanged(Double ) at Esri.ArcGISRuntime.Internal.Geolocator.LocationManager_UpdatedHeading(Object sender, CLHeadingUpdatedEventArgs e) at CoreLocation.CLLocationManager._CLLocationManagerDelegate.UpdatedHeading(CLLocationManager , CLHeading )
when we close the page , we execute this code
public void DisposeMapObjects(MapView mapView)
{
mapView.Map.OperationalLayers.Clear();
}
Other informations, the operative system is Ios, and the version we are currently use of esri runtime is 200.5.0
Regard
Thanks for sharing the stack trace! We might need some more information to narrow down the problem though.
Are you able to log the type of this exception (e.g. InvalidOperationException or ArcGISRuntimeException) and the exception message?
Also, does the app actually call Dispose on the MapView, or interact with LocationDisplay or SystemLocationDataSource before navigating away from the page?
yes, user can interact whit LocationDisplay when map is displayed , today we released a new version and before going to close the page, we put LocationDisplay.IsEnabled = false and this seems to have solved the problem
thanks for the support