Last modified: 2014-09-22 15:59:06 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T73025, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 71025 - Nearby feature crash with NPE
Nearby feature crash with NPE
Status: RESOLVED FIXED
Product: Wikipedia App
Classification: Unclassified
Android App (Other open bugs)
Beta
All All
: Unprioritized normal
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-09-18 22:04 UTC by Bernd Sitzmann
Modified: 2014-09-22 15:59 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Bernd Sitzmann 2014-09-18 22:04:51 UTC
Two similar NPEs occurring in Nearby feature during the sort by distance step:

java.lang.NullPointerException
at android.location.Location.distanceTo(Location.java:426)
at org.wikipedia.beta.nearby.NearbyActivity.getDistance(NearbyActivity.java:351)
at org.wikipedia.beta.nearby.NearbyActivity.access$500(NearbyActivity.java:53)
at org.wikipedia.beta.nearby.NearbyActivity$6.compare(NearbyActivity.java:345)
at org.wikipedia.beta.nearby.NearbyActivity$6.compare(NearbyActivity.java:343)
at java.util.TimSort.binarySort(TimSort.java:261)
at java.util.TimSort.sort(TimSort.java:204)
at java.util.TimSort.sort(TimSort.java:169)
at java.util.Arrays.sort(Arrays.java:2038)
at java.util.Collections.sort(Collections.java:1891)
at org.wikipedia.beta.nearby.NearbyActivity.sortByDistance(NearbyActivity.java:343)
at org.wikipedia.beta.nearby.NearbyActivity.showNearbyPages(NearbyActivity.java:316)
at org.wikipedia.beta.nearby.NearbyActivity.access$300(NearbyActivity.java:53)
at org.wikipedia.beta.nearby.NearbyActivity$5.onFinish(NearbyActivity.java:235)
at org.wikipedia.beta.nearby.NearbyActivity$5.onFinish(NearbyActivity.java:232)
at org.wikipedia.beta.concurrency.SaneAsyncTask$BackingAsyncTask.onPostExecute(SaneAsyncTask.java:121)
at org.wikipedia.beta.concurrency.AsyncTask.finish(AsyncTask.java:642)
at org.wikipedia.beta.concurrency.AsyncTask.access$600(AsyncTask.java:187)
at org.wikipedia.beta.concurrency.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:655)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:176)
at android.app.ActivityThread.main(ActivityThread.java:5419)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1046)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:862)
at dalvik.system.NativeStart.main(Native Method)

OTRS:
https://ticket.wikimedia.org/otrs/index.pl?Action=AgentTicketZoom&TicketID=7818998
https://ticket.wikimedia.org/otrs/index.pl?Action=AgentTicketZoom&TicketID=7819051
https://ticket.wikimedia.org/otrs/index.pl?Action=AgentTicketZoom&TicketID=7819170

The other variation:
java.lang.NullPointerException: Attempt to read from field 'double android.location.Location.mLatitude' on a null object reference
at android.location.Location.distanceTo(Location.java:426)
at org.wikipedia.beta.nearby.NearbyActivity.getDistance(NearbyActivity.java:351)
[...] rest is the same

OTRS:
https://ticket.wikimedia.org/otrs/index.pl?Action=AgentTicketZoom&TicketID=7819444
https://ticket.wikimedia.org/otrs/index.pl?Action=AgentTicketZoom&TicketID=7819030
Comment 1 Gerrit Notification Bot 2014-09-19 20:38:10 UTC
Change 161579 had a related patch set uploaded by BearND:
Some nearby page entries don't have coordinates

https://gerrit.wikimedia.org/r/161579
Comment 2 Gerrit Notification Bot 2014-09-22 13:47:54 UTC
Change 161579 merged by Dbrant:
Some nearby page entries don't have coordinates

https://gerrit.wikimedia.org/r/161579
Comment 3 Alex Monk 2014-09-22 15:59:06 UTC
Assuming this is fixed.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links