Skip to content

Nearby crash when LatLng is null #1735

@neslihanturan

Description

@neslihanturan

Summary:

I am able to get this crash on some first runs. Then it gets solved.

Steps to reproduce:

Not very stable, sometimes, it happens. Ie, once I turned off wireless connection and it happened.
Add System logs:

                                 Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'double android.location.Location.getLatitude()' on a null object reference
                                                                             at fr.free.nrw.commons.location.LatLng.from(LatLng.java:45)
                                                                             at fr.free.nrw.commons.location.LocationServiceManager.getLKL(LocationServiceManager.java:109)
                                                                             at fr.free.nrw.commons.nearby.NearbyActivity.onRequestPermissionsResult(NearbyActivity.java:224)
                                                                             at android.app.Activity.dispatchRequestPermissionsResult(Activity.java:6553)
                                                                             at android.app.Activity.dispatchActivityResult(Activity.java:6432)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions