Skip to content
This repository has been archived by the owner on Apr 23, 2023. It is now read-only.

NullPointerException in LocationRequest.getPriority() #236

Closed
adamjodlowski opened this issue Jul 20, 2017 · 8 comments
Closed

NullPointerException in LocationRequest.getPriority() #236

adamjodlowski opened this issue Jul 20, 2017 · 8 comments

Comments

@adamjodlowski
Copy link

adamjodlowski commented Jul 20, 2017

Description

We're getting crashes because of NPE.

java.lang.NullPointerException: Attempt to invoke virtual method 'int com.mapzen.android.lost.api.LocationRequest.getPriority()' on a null object reference
	at android.os.Parcel.readException(Parcel.java:1699)
	at android.os.Parcel.readException(Parcel.java:1646)
	at com.mapzen.android.lost.internal.IFusedLocationProviderService$Stub$Proxy.requestLocationUpdates(IFusedLocationProviderService.java:254)
	at com.mapzen.android.lost.internal.FusedLocationProviderApiImpl.requestLocationUpdatesInternal(FusedLocationProviderApiImpl.java:195)
	at com.mapzen.android.lost.internal.FusedLocationProviderApiImpl.requestLocationUpdates(FusedLocationProviderApiImpl.java:162)
	at com.mapbox.mapboxsdk.location.LocationSource.requestLocationUpdates(LocationSource.java:121)
	at com.mapbox.services.android.telemetry.MapboxTelemetry.onConnected(MapboxTelemetry.java:375)
	at com.mapbox.mapboxsdk.location.LocationSource.onConnected(LocationSource.java:81)
	at com.mapzen.android.lost.internal.FusedLocationServiceConnectionManager.onServiceConnected(FusedLocationServiceConnectionManager.java:86)
	at com.mapzen.android.lost.internal.FusedLocationProviderApiImpl.onServiceConnected(FusedLocationProviderApiImpl.java:96)
	at android.app.LoadedApk$ServiceDispatcher.doConnected(LoadedApk.java:1516)
	at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:1544)
	at android.os.Handler.handleCallback(Handler.java:751)
	at android.os.Handler.dispatchMessage(Handler.java:95)
	at android.os.Looper.loop(Looper.java:154)
	at android.app.ActivityThread.main(ActivityThread.java:6692)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1468)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1358)
java.lang.NullPointerException: Attempt to invoke virtual method 'int com.mapzen.android.lost.api.LocationRequest.getPriority()' on a null object reference
	at com.mapzen.android.lost.internal.FusionEngine.enable(FusionEngine.java:81)
	at com.mapzen.android.lost.internal.LocationEngine.addRequest(LocationEngine.java:47)
	at com.mapzen.android.lost.internal.FusedLocationProviderServiceDelegate.requestLocationUpdates(FusedLocationProviderServiceDelegate.java:65)
	at com.mapzen.android.lost.internal.FusedLocationProviderService$1.requestLocationUpdates(FusedLocationProviderService.java:43)
	at com.mapzen.android.lost.internal.FusedLocationProviderApiImpl.requestLocationUpdatesInternal(FusedLocationProviderApiImpl.java:195)
	at com.mapzen.android.lost.internal.FusedLocationProviderApiImpl.requestLocationUpdates(FusedLocationProviderApiImpl.java:162)
	at com.mapbox.mapboxsdk.location.LocationSource.requestLocationUpdates(LocationSource.java:121)
	at com.mapbox.services.android.telemetry.MapboxTelemetry.onConnected(MapboxTelemetry.java:375)
	at com.mapbox.mapboxsdk.location.LocationSource.onConnected(LocationSource.java:81)
	at com.mapzen.android.lost.internal.FusedLocationServiceConnectionManager.onServiceConnected(FusedLocationServiceConnectionManager.java:86)
	at com.mapzen.android.lost.internal.FusedLocationProviderApiImpl.onServiceConnected(FusedLocationProviderApiImpl.java:96)
	at android.app.LoadedApk$ServiceDispatcher.doConnected(LoadedApk.java:1516)
	at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:1544)
	at android.os.Handler.handleCallback(Handler.java:751)
	at android.os.Handler.dispatchMessage(Handler.java:95)
	at android.os.Looper.loop(Looper.java:154)
	at android.app.ActivityThread.main(ActivityThread.java:6692)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1468)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1358)

Steps to Reproduce

Not reproducible.

Lost & Android Version

mapBoxServices = '2.1.1'
mapBoxSdk = '5.0.2'
mapBoxGeocoder = '1.0.0'
lost = '3.0.2'

Android: 7.0 & 7.1.1 (only 160 crashes so far)

@adamjodlowski adamjodlowski changed the title NullPointerException NullPointerException in LocationRequest.getPriority() Jul 20, 2017
@msmollin
Copy link
Contributor

Hi Adam! Thanks for the report! It looks like you're using the version of LOST integrated into the Mapbox SDK. Is there a relevant issue / has this been triaged yet by Mapbox?

@adamjodlowski
Copy link
Author

Actually I'm using compile "com.mapzen.android:lost:3.0.2" in order to fix this: #218

@msmollin
Copy link
Contributor

Ah ok. We haven't been seeing NPEs from our test apps including Eraser Map so this will require some diagnosing.

@tobrun / @zugaldia is there a LOST 3.0.2-enabled snapshot of the MapboxSDK available for testing?

@zugaldia
Copy link

@tobrun / @zugaldia is there a LOST 3.0.2-enabled snapshot of the MapboxSDK available for testing?

I've created a ticket on mapbox/mapbox-gl-native#9581 where you can track the progress for Mapbox to upgrade to the latest LOST 3.x release and gather any Mapbox-specific feedback.

@ovivoda
Copy link

ovivoda commented Jul 28, 2017

Any updates on this issue? I confirm I get the same issue using lost = '3.0.2' and mapboxSdk: "5.1.1"

@msmollin
Copy link
Contributor

@ovivoda feel free to keep an eye on the linked ticket above. Once Mapbox has had a chance to do appropriate testing internally we will be able to more easily track down whether this is an integration issue or an actual LOST problem. As I said before, we aren't see this issue internally at Mapzen so reproducing it is tricky.

@ndraiman
Copy link

We're seeing the same issue on Android with Mapbox v5.2.1 and Lost v3.0.2.
The issue seem to happen on Samsung and Huawei devices running Android 6 and 7.

We're unable to reproduce the issue.

Also posted this here, as it seems related.

Stacktrace:

Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'int com.mapzen.android.lost.api.LocationRequest.getPriority()' on a null object reference
       at android.os.Parcel.readException(Parcel.java:1626)
       at android.os.Parcel.readException(Parcel.java:1573)
       at com.mapzen.android.lost.internal.IFusedLocationProviderService$Stub$Proxy.requestLocationUpdates(IFusedLocationProviderService.java:254)
       at com.mapzen.android.lost.internal.FusedLocationProviderApiImpl.requestLocationUpdatesInternal(FusedLocationProviderApiImpl.java:195)
       at com.mapzen.android.lost.internal.FusedLocationProviderApiImpl.requestLocationUpdates(FusedLocationProviderApiImpl.java:162)
       at com.mapbox.services.android.telemetry.location.LostLocationEngine.requestLocationUpdates(LostLocationEngine.java:135)
       at com.mapbox.services.android.telemetry.MapboxTelemetry.onConnected(MapboxTelemetry.java:492)
       at com.mapbox.services.android.telemetry.location.LostLocationEngine.onConnected(LostLocationEngine.java:78)
       at com.mapzen.android.lost.internal.FusedLocationServiceConnectionManager.onServiceConnected(FusedLocationServiceConnectionManager.java:86)
       at com.mapzen.android.lost.internal.FusedLocationProviderApiImpl.onServiceConnected(FusedLocationProviderApiImpl.java:96)
       at android.app.LoadedApk$ServiceDispatcher.doConnected(LoadedApk.java:1335)
       at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:1352)

@msmollin
Copy link
Contributor

Closing as this repo is no longer maintained.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants