You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bugA bug is found inside the code base and should be immediately brought to attention ASAPlocation-layer-pluginIssues that deal with the location layer module
I am using locationlayer to show my current location and when I [single/double] tap on map. App getting crashed with following errors.
NOTE :: My GPS is on and i am getting location.
java.lang.NullPointerException: Attempt to invoke virtual method 'double android.location.Location.getLatitude()' on a null object reference
at com.mapbox.mapboxsdk.plugins.locationlayer.LocationLayer.calculateZoomLevelRadius(LocationLayer.java:190)
at com.mapbox.mapboxsdk.plugins.locationlayer.LocationLayer.updateAccuracyRadius(LocationLayer.java:184)
at com.mapbox.mapboxsdk.plugins.locationlayer.LocationLayerPlugin.onCameraMove(LocationLayerPlugin.java:483)
Can confirm this as well. Running com.mapbox.mapboxsdk:mapbox-android-plugin-locationlayer:0.3.0-SNAPSHOT
Stacktrace:
java.lang.NullPointerException: Attempt to invoke virtual method 'double android.location.Location.getLatitude()' on a null object reference
at com.mapbox.mapboxsdk.plugins.locationlayer.LocationLayer.calculateZoomLevelRadius(LocationLayer.java:190)
at com.mapbox.mapboxsdk.plugins.locationlayer.LocationLayer.updateAccuracyRadius(LocationLayer.java:184)
at com.mapbox.mapboxsdk.plugins.locationlayer.LocationLayerPlugin.onCameraMove(LocationLayerPlugin.java:483)
at com.mapbox.mapboxsdk.maps.CameraChangeDispatcher$2.run(CameraChangeDispatcher.java:62)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5539)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:960)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
Edit:
Pinging @cammace and @tobrun since it seems that it was added in #186 if I'm not mistaken.
bugA bug is found inside the code base and should be immediately brought to attention ASAPlocation-layer-pluginIssues that deal with the location layer module
Activity
davols commentedon Dec 22, 2017
Can confirm this as well. Running
com.mapbox.mapboxsdk:mapbox-android-plugin-locationlayer:0.3.0-SNAPSHOTStacktrace:
Edit:
Pinging @cammace and @tobrun since it seems that it was added in #186 if I'm not mistaken.
cammace commentedon Dec 22, 2017
This was an oversight by me, If the locations null, the accuracy is now set to 0 radii. Fix will be in master once #221 is merged.