AnsweredAssumed Answered

Xamarin.Forms iOS Crash When Map Disappears

Question asked by Dendroyka on Feb 21, 2020

I was able to finally reproduce a fairly common, but random crash on iOS, so i have a more complete debug stack trace. I'm hoping it helps you find the issue. It looks to me like a race condition where something is trying to update the location indicator on the map, but the map has gone away already.

 

iOS 13.3

iPhone SE

100.7 Runtime

Xamarin Forms 4.4.0.991640

 

=================================================================
Native Crash Reporting
=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================

=================================================================
Native stacktrace:
=================================================================
2020-02-21 07:58:50.135 Landscape.Mobile.iOS[458:18259] 2020-02-21 07:58:50.1354|INFO|Landscape.Mobile.App|Page disappearing: Landscape.Mobile.MapViewPage
2020-02-21 07:58:50.139 Landscape.Mobile.iOS[458:18259] 2020-02-21 07:58:50.1388|INFO|Landscape.Mobile.App|Map viewmodel got page disappearing
0x10ac8cbd0 - /private/var/containers/Bundle/Application/41D77683-DD8B-4AA7-9D3E-AB8A4901818B/Landscape.Mobile.iOS.app/Landscape.Mobile.iOS : mono_dump_native_crash_info
0x10ac82a90 - /private/var/containers/Bundle/Application/41D77683-DD8B-4AA7-9D3E-AB8A4901818B/Landscape.Mobile.iOS.app/Landscape.Mobile.iOS : mono_handle_native_crash
2020-02-21 07:58:50.159 Landscape.Mobile.iOS[458:18259] 2020-02-21 07:58:50.1594|INFO|Landscape.Mobile.App|Page appearing: Landscape.Mobile.VisitHomePage
0x10ac91304 - /private/var/containers/Bundle/Application/41D77683-DD8B-4AA7-9D3E-AB8A4901818B/Landscape.Mobile.iOS.app/Landscape.Mobile.iOS : mono_sigsegv_signal_handler_debug
0x19d860894 - /usr/lib/system/libsystem_platform.dylib : <redacted>
0x1166221a8 - /private/var/containers/Bundle/Application/41D77683-DD8B-4AA7-9D3E-AB8A4901818B/Landscape.Mobile.iOS.app/Frameworks/ArcGIS-arm64.framework/ArcGIS-arm64 : _ZN16Esri_runtimecore12Map_renderer25update_graphic_visibilityERNS0_24TVector_Graphics_surfaceINS0_22Location_graphic_stateEEExb
0x1166221a8 - /private/var/containers/Bundle/Application/41D77683-DD8B-4AA7-9D3E-AB8A4901818B/Landscape.Mobile.iOS.app/Frameworks/ArcGIS-arm64.framework/ArcGIS-arm64 : _ZN16Esri_runtimecore12Map_renderer25update_graphic_visibilityERNS0_24TVector_Graphics_surfaceINS0_22Location_graphic_stateEEExb
0x11662554c - /private/var/containers/Bundle/Application/41D77683-DD8B-4AA7-9D3E-AB8A4901818B/Landscape.Mobile.iOS.app/Frameworks/ArcGIS-arm64.framework/ArcGIS-arm64 : _ZN16Esri_runtimecore12Map_renderer16Location_display15update_locationERKNS1_8LocationE
0x11563c23c - /private/var/containers/Bundle/Application/41D77683-DD8B-4AA7-9D3E-AB8A4901818B/Landscape.Mobile.iOS.app/Frameworks/ArcGIS-arm64.framework/ArcGIS-arm64 : _ZN16Esri_runtimecore9Geo_views16Location_display13set_location_ERKNSt3__110shared_ptrIKNS0_8LocationEEEb
0x115641020 - /private/var/containers/Bundle/Application/41D77683-DD8B-4AA7-9D3E-AB8A4901818B/Landscape.Mobile.iOS.app/Frameworks/ArcGIS-arm64.framework/ArcGIS-arm64 : _ZN16Esri_runtimecore6Common4SlotIFvRKNS_9Geo_views20Location_data_sourceENSt3__110shared_ptrIKNS2_8LocationEEEEE12target_modelIZNS2_16Location_display15set_data_sourceERKNS7_IS3_EEE3$_7E6invokeEPKvS5_NS6_17reference_wrapperISA_EE
0x1170ead80 - /private/var/containers/Bundle/Application/41D77683-DD8B-4AA7-9D3E-AB8A4901818B/Landscape.Mobile.iOS.app/Frameworks/ArcGIS-arm64.framework/ArcGIS-arm64 : _ZNK16Esri_runtimecore6Common13Signal_detail11Signal_base7notify_ENS0_12Function_refIFvRNS1_18erased_target_baseEEEE
0x115639b00 - /private/var/containers/Bundle/Application/41D77683-DD8B-4AA7-9D3E-AB8A4901818B/Landscape.Mobile.iOS.app/Frameworks/ArcGIS-arm64.framework/ArcGIS-arm64 : _ZN16Esri_runtimecore9Geo_views20Location_data_source15update_locationENSt3__110shared_ptrIKNS0_8LocationEEE
0x115394ae4 - /private/var/containers/Bundle/Application/41D77683-DD8B-4AA7-9D3E-AB8A4901818B/Landscape.Mobile.iOS.app/Frameworks/ArcGIS-arm64.framework/ArcGIS-arm64 : RT_LocationDataSource_updateLocation
0x11510493c - /private/var/containers/Bundle/Application/41D77683-DD8B-4AA7-9D3E-AB8A4901818B/Landscape.Mobile.iOS.app/Frameworks/ArcGIS-arm64.framework/ArcGIS-arm64 : CoreRT_LocationDataSource_updateLocation
0x10a5774e0 - /private/var/containers/Bundle/Application/41D77683-DD8B-4AA7-9D3E-AB8A4901818B/Landscape.Mobile.iOS.app/Landscape.Mobile.iOS : wrapper_managed_to_native_RuntimeCoreNet_GeneratedWrappers_CoreLocationDataSource_CoreRT_LocationDataSource_updateLocation_intptr_intptr_intptr_
0x109af3608 - /private/var/containers/Bundle/Application/41D77683-DD8B-4AA7-9D3E-AB8A4901818B/Landscape.Mobile.iOS.app/Landscape.Mobile.iOS : RuntimeCoreNet_GeneratedWrappers_CoreLocationDataSource_UpdateLocation_RuntimeCoreNet_GeneratedWrappers_CoreLocation
0x109f5d2cc - /private/var/containers/Bundle/Application/41D77683-DD8B-4AA7-9D3E-AB8A4901818B/Landscape.Mobile.iOS.app/Landscape.Mobile.iOS : Esri_ArcGISRuntime_Location_LocationDataSource_OnLocationChanged_Esri_ArcGISRuntime_Location_Location
0x109f5d15c - /private/var/containers/Bundle/Application/41D77683-DD8B-4AA7-9D3E-AB8A4901818B/Landscape.Mobile.iOS.app/Landscape.Mobile.iOS : Esri_ArcGISRuntime_Location_LocationDataSource_UpdateLocation_Esri_ArcGISRuntime_Location_Location
0x109f60328 - /private/var/containers/Bundle/Application/41D77683-DD8B-4AA7-9D3E-AB8A4901818B/Landscape.Mobile.iOS.app/Landscape.Mobile.iOS : Esri_ArcGISRuntime_Location_SystemLocationDataSource_RaiseLocationChanged_Esri_ArcGISRuntime_Internal_Geoposition_bool
0x109f5f0d4 - /private/var/containers/Bundle/Application/41D77683-DD8B-4AA7-9D3E-AB8A4901818B/Landscape.Mobile.iOS.app/Landscape.Mobile.iOS : Esri_ArcGISRuntime_Location_SystemLocationDataSource_Locator_PositionChanged_object_Esri_ArcGISRuntime_Internal_PositionChangedEventArgs
0x10a0465ac - /private/var/containers/Bundle/Application/41D77683-DD8B-4AA7-9D3E-AB8A4901818B/Landscape.Mobile.iOS.app/Landscape.Mobile.iOS : Esri_ArcGISRuntime_Internal_Geolocator_OnPositionChanged
0x10a045b64 - /private/var/containers/Bundle/Application/41D77683-DD8B-4AA7-9D3E-AB8A4901818B/Landscape.Mobile.iOS.app/Landscape.Mobile.iOS : Esri_ArcGISRuntime_Internal_Geolocator_UpdateTimer_Elapsed_object_System_Timers_ElapsedEventArgs
0x106042468 - /private/var/containers/Bundle/Application/41D77683-DD8B-4AA7-9D3E-AB8A4901818B/Landscape.Mobile.iOS.app/Landscape.Mobile.iOS : System_Timers_Timer_MyTimerCallback_object
0x1052f4a64 - /private/var/containers/Bundle/Application/41D77683-DD8B-4AA7-9D3E-AB8A4901818B/Landscape.Mobile.iOS.app/Landscape.Mobile.iOS : System_Threading_Timer_Scheduler_TimerCB_object
0x1052ea3d4 - /private/var/containers/Bundle/Application/41D77683-DD8B-4AA7-9D3E-AB8A4901818B/Landscape.Mobile.iOS.app/Landscape.Mobile.iOS : System_Threading_QueueUserWorkItemCallback_System_Threading_IThreadPoolWorkItem_ExecuteWorkItem
0x1052e8208 - /private/var/containers/Bundle/Application/41D77683-DD8B-4AA7-9D3E-AB8A4901818B/Landscape.Mobile.iOS.app/Landscape.Mobile.iOS : System_Threading_ThreadPoolWorkQueue_Dispatch
0x106f140e0 - /private/var/containers/Bundle/Application/41D77683-DD8B-4AA7-9D3E-AB8A4901818B/Landscape.Mobile.iOS.app/Landscape.Mobile.iOS : ObjCRuntime_Runtime_ThreadPoolDispatcher_System_Func_1_bool
0x1052ea1b8 - /private/var/containers/Bundle/Application/41D77683-DD8B-4AA7-9D3E-AB8A4901818B/Landscape.Mobile.iOS.app/Landscape.Mobile.iOS : System_Threading__ThreadPoolWaitCallback_PerformWaitCallback
0x1059fab34 - /private/var/containers/Bundle/Application/41D77683-DD8B-4AA7-9D3E-AB8A4901818B/Landscape.Mobile.iOS.app/Landscape.Mobile.iOS : wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr
0x10ac9472c - /private/var/containers/Bundle/Application/41D77683-DD8B-4AA7-9D3E-AB8A4901818B/Landscape.Mobile.iOS.app/Landscape.Mobile.iOS : mono_jit_runtime_invoke
0x10ad54bdc - /private/var/containers/Bundle/Application/41D77683-DD8B-4AA7-9D3E-AB8A4901818B/Landscape.Mobile.iOS.app/Landscape.Mobile.iOS : mono_runtime_try_invoke
0x10ad98d78 - /private/var/containers/Bundle/Application/41D77683-DD8B-4AA7-9D3E-AB8A4901818B/Landscape.Mobile.iOS.app/Landscape.Mobile.iOS : worker_callback
0x10ad969f8 - /private/var/containers/Bundle/Application/41D77683-DD8B-4AA7-9D3E-AB8A4901818B/Landscape.Mobile.iOS.app/Landscape.Mobile.iOS : worker_thread
0x10ada1d70 - /private/var/containers/Bundle/Application/41D77683-DD8B-4AA7-9D3E-AB8A4901818B/Landscape.Mobile.iOS.app/Landscape.Mobile.iOS : start_wrapper_internal
0x10ada1bf4 - /private/var/containers/Bundle/Application/41D77683-DD8B-4AA7-9D3E-AB8A4901818B/Landscape.Mobile.iOS.app/Landscape.Mobile.iOS : start_wrapper
0x19d86dd8c - /usr/lib/system/libsystem_pthread.dylib : _pthread_start
0x19d87176c - /usr/lib/system/libsystem_pthread.dylib : thread_start

=================================================================
Basic Fault Address Reporting
=================================================================
Memory around native instruction pointer (0x116621f94):0x116621f84 fd c3 00 91 f3 03 02 aa
f4 03 01 aa f5 03 00 aa ............
....
0x116621f94 08 28 40 f9 e8 03 00 f9 ff 13 00 79 00 e1 01 91 .(@...
.....y....
0x116621fa4 c5 87 53 94 e8 03 00 32 e8 2b 00 39 e0 03 15 aa ..S....2.+.9....
0x116621fb4 e1 03 14 aa e2 03 13 aa 92 18 00 94 f3 03 00 aa ...........
.....

=================================================================
Managed Stacktrace:
=================================================================
at <unknown> <0xffffffff>
at RuntimeCoreNet.GeneratedWrappers.CoreLocationDataSource:CoreRT_LocationDataSource_updateLocation <0x00007>
at RuntimeCoreNet.GeneratedWrappers.CoreLocationDataSource:UpdateLocation <0x000b7>
at Esri.ArcGISRuntime.Location.LocationDataSource:OnLocationChanged <0x000cb>
at Esri.ArcGISRuntime.Location.LocationDataSource:UpdateLocation <0x000ab>
at Esri.ArcGISRuntime.Location.SystemLocationDataSource:RaiseLocationChanged <0x00f37>
at Esri.ArcGISRuntime.Location.SystemLocationDataSource:Locator_PositionChanged <0x000c3>
at Esri.ArcGISRuntime.Internal.Geolocator:OnPositionChanged <0x0012b>
at Esri.ArcGISRuntime.Internal.Geolocator:UpdateTimer_Elapsed <0x00063>
at System.Timers.Timer:MyTimerCallback <0x00167>
at Scheduler:TimerCB <0x00063>
at System.Threading.QueueUserWorkItemCallback:System.Thr
eading.IThreadPoolWorkItem.ExecuteWorkItem <0x00033>
at System.Threading.ThreadPoolWorkQueue:Dispatch <0x001e7>
at ObjCRuntime.Runtime:ThreadPoolDispatcher <0x0003f>
at System.Threading._ThreadPoolWaitCallback:PerformWaitCallback <0x00087>
at System.Object:runtime_invoke_dynamic <0x00103>
=================================================================
The app has been terminated.
Failed to Stop app: An error occurred on client IDB164000309 while executing a reply for topic xvs/idb/16.4.0.309/stop-app
The app has been terminated.

Outcomes