Select to view content in your preferred language

[iOS] NullReferenceException in Geolocator.LocationManager_LocationsUpdated

170
2
Jump to solution
a week ago
esp1rl
by
New Contributor III

Hi,

We get these errors reported through Sentry.

It's very important to note that these always happen at startup.

System.NullReferenceException: Object reference not set to an instance of an object
  ?, in void Geolocator.LocationManager_LocationsUpdated(object sender, CLLocationsUpdatedEventArgs e)
  ?, in void _CLLocationManagerDelegate.LocationsUpdated(CLLocationManager, CLLocation[])
  ?, in int UIApplicaion.UIApplicationMain(int, string[], IntPtr, IntPtr)
  ?, in void UIApplication.Main(string[], Type, Type)
  ?, in void Program.Main(string[] args)
OS Version: iOS 17.5.1 (21F90)
Report Version: 104

Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: SEGV_NOOP at 0x0000000000000050
Crashed Thread: 0

Application Specific Information:
Exception 1, Code 1, Subcode 80 >
KERN_INVALID_ADDRESS at 0x50.

Thread 0 Crashed:
0   Naturoppdrag                    0x2021afde8         Esri_ArcGISRuntime_Esri_ArcGISRuntime_Internal_Geolocator_LocationManager_LocationsUpdated_object_CoreLocation_CLLocationsUpdatedEventArgs
1   Naturoppdrag                    0x205ded368         mono_jit_runtime_invoke (mini-runtime.c:3636)
2   Naturoppdrag                    0x205d99fbc         [inlined] do_runtime_invoke (object.c:2576)
3   Naturoppdrag                    0x205d99fbc         mono_runtime_try_invoke (object.c:2733)
4   Naturoppdrag                    0x205d9ccdc         mono_runtime_invoke (object.c:2659)
5   Naturoppdrag                    0x205e9c8f4         native_to_managed_trampoline_117 (registrar.mm:7322)
6   Naturoppdrag                    0x205ea2840         -[CoreLocation_CLLocationManager__CLLocationManagerDelegate locationManager:didUpdateLocations:] (registrar.mm:29700)
7   CoreLocation                    0x3327ff958         CLCopyTechnologiesInUse
8   CoreLocation                    0x3327ff0ec         CLCopyTechnologiesInUse
9   CoreLocation                    0x3327feed8         CLCopyTechnologiesInUse
10  LocationSupport                 0x356ff8d50         CLConnectionMessage::createXPCObject
11  CoreFoundation                  0x31840fc98         __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__
12  CoreFoundation                  0x3183fdde8         __CFRunLoopDoBlocks
13  CoreFoundation                  0x3183fdacc         __CFRunLoopRun
14  CoreFoundation                  0x3183fccd4         CFRunLoopRunSpecific
15  GraphicsServices                0x3a21af1a4         GSEventRunModal
16  UIKitCore                       0x31ccb6908         -[UIApplication _run]
17  UIKitCore                       0x31cd6a9cc         UIApplicationMain
18  Naturoppdrag                    0x205b51a4c         xamarin_UIApplicationMain (bindings.m:126)
19  Naturoppdrag                    0x201ca4b5c         wrapper_managed_to_native_UIKit_UIApplication_xamarin_UIApplicationMain_int_intptr_intptr_intptr_intptr_
20  Naturoppdrag                    0x205a6a410         Microsoft_iOS_UIKit_UIApplication_UIApplicationMain_int_string___intptr_intptr (UIApplication.cs:58)
21  Naturoppdrag                    0x205ded368         mono_jit_runtime_invoke (mini-runtime.c:3636)
22  Naturoppdrag                    0x205d990a8         [inlined] do_runtime_invoke (object.c:2576)
23  Naturoppdrag                    0x205d990a8         mono_runtime_invoke_checked (object.c:2792)
24  Naturoppdrag                    0x205d9f0ec         [inlined] do_exec_main_checked
25  Naturoppdrag                    0x205d9f0ec         mono_runtime_exec_main_checked (object.c:4775)
26  Naturoppdrag                    0x205df2718         [inlined] mono_jit_exec_internal (driver.c:1369)
27  Naturoppdrag                    0x205df2718         mono_jit_exec (driver.c:1314)
28  Naturoppdrag                    0x205b5caf8         xamarin_main (monotouch-main.m:495)
29  Naturoppdrag                    0x205e5afe0         main (main.arm64.mm:352)
30  <unknown>                       0x1b38e5e4c         <redacted>

 

0 Kudos
1 Solution

Accepted Solutions
dotMorten_esri
Esri Notable Contributor

Thank you for the detailed callstack. We have a speculative but safe fix we'll add, and hopefully that'll take care of this one (can't really verify without a reproducer and it seems to require a very particular case of location update firing right when the datasource is created).

View solution in original post

0 Kudos
2 Replies
dotMorten_esri
Esri Notable Contributor

Thank you for the detailed callstack. We have a speculative but safe fix we'll add, and hopefully that'll take care of this one (can't really verify without a reproducer and it seems to require a very particular case of location update firing right when the datasource is created).

0 Kudos
esp1rl
by
New Contributor III

Thanks @dotMorten_esri 

0 Kudos