-
-
Notifications
You must be signed in to change notification settings - Fork 158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Plugin.Geolocator.GeolocationContinuousListener.OnLocationChanged - Object reference not set to an instance of an object #306
Comments
I'm also experiencing this on Android, so far only on the Samsung S9. For context we listen for location updates throughout most of the app but sometimes we experience this same crash:
@igorgomeslima did you ever find a work-around for this? It's a really serious issue for us on Android. |
@harry-gordon We not find any work-around about this. This really is very serious. In this case, we stopped using the plugin. Now we using Fused Location Provider. |
I've just done a 5hr soak test using lockito as my fake gps provider and have encountered zero issues, yesterday I ran the app live for 2hr 45mins with no issues either. Code is :
|
and
|
Hey @chrisfoulds, thanks for sharing. To put the issue in perspective we've been using the plugin for weeks and have only encountered the issue on one device and only with mock data. Will continue to gather data and consider submitting a fix 🕵. |
Version Number of Plugin: \packages\Xam.Plugin.Geolocator.4.5.0.6\lib\monoandroid71\Plugin.Geolocator.dll
Device Tested On: Android
Version of VS: VS2017 15.9.13
Version of Xamarin: 4.12.3.83
Xamarin Android SDK: 12.4.0.64
Versions of other things you are using: Mock Locations (fake GPS path)(https://play.google.com/store/apps/details?id=ru.gavrikov.mocklocations&hl=pt_BR)
Steps to reproduce the Behavior
Default configuration: https://jamesmontemagno.github.io/GeolocatorPlugin/
Expected Behavior
Position Changed event called.
Actual Behavior
This happens after a certain amount of time (this is intermittent).
Thread started: #44
Thread started: #45
Thread started: #46
Thread started: #47
07-05 14:37:21.686 D/Mono (12018): DllImport attempting to load: '/system/lib/liblog.so'.
07-05 14:37:21.693 D/Mono (12018): DllImport loaded library '/system/lib/liblog.so'.
07-05 14:37:21.693 D/Mono (12018): DllImport searching in: '/system/lib/liblog.so' ('/system/lib/liblog.so').
07-05 14:37:21.693 D/Mono (12018): Searching for '__android_log_print'.
07-05 14:37:21.694 D/Mono (12018): Probing '__android_log_print'.
07-05 14:37:21.694 D/Mono (12018): Found as '__android_log_print'.
Thread started: #48
Thread started: #49
Thread started: #50
Thread started: #51
Thread started: #52
Thread started: #53
Thread started: #54
07-05 14:37:21.791 I/MonoDroid(12018): UNHANDLED EXCEPTION:
07-05 14:37:21.806 I/MonoDroid(12018): System.NullReferenceException: Object reference not set to an instance of an object.
07-05 14:37:21.806 I/MonoDroid(12018): at Plugin.Geolocator.GeolocationContinuousListener.OnLocationChanged (Android.Locations.Location location) [0x0007e] in :0
07-05 14:37:21.806 I/MonoDroid(12018): at Android.Locations.ILocationListenerInvoker.n_OnLocationChanged_Landroid_location_Location (System.IntPtr jnienv, System.IntPtr native__this, System.IntPtr native_location) [0x00011] in _:0
07-05 14:37:21.806 I/MonoDroid(12018): at (wrapper dynamic-method) System.Object.27(intptr,intptr,intptr)
Unhandled Exception:
System.NullReferenceException: Object reference not set to an instance of an object.
Thread finished: #54
The thread 0x36 has exited with code 0 (0x0).
Thread finished: #52
The thread 0x34 has exited with code 0 (0x0).
Thread finished: #51
The thread 0x33 has exited with code 0 (0x0).
Thread finished: #47
The thread 0x2f has exited with code 0 (0x0).
Thread finished: #46
The thread 0x2e has exited with code 0 (0x0).
Thread finished: #48
The thread 0x30 has exited with code 0 (0x0).
Thread finished: #50
The thread 0x32 has exited with code 0 (0x0).
Thread finished: #53
The thread 0x35 has exited with code 0 (0x0).
Thread finished: #44
The thread 0x2c has exited with code 0 (0x0).
Thread finished: #45
The thread 0x2d has exited with code 0 (0x0).
07-05 14:38:43.014 E/mono-rt (12018): [ERROR] FATAL UNHANDLED EXCEPTION: System.NullReferenceException: Object reference not set to an instance of an object.
07-05 14:38:43.014 E/mono-rt (12018): at (wrapper dynamic-method) System.Object.27(intptr,intptr,intptr)
07-05 14:38:43.014 E/mono-rt (12018): at (wrapper native-to-managed) System.Object.27(intptr,intptr,intptr)
Thread started: #55
Thread started: #56
Debugger Connection Lost: Debugger lost connection to the running application. Likely this means the application terminated unexpectedly.
Code snippet
The text was updated successfully, but these errors were encountered: