question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Crash when back button pressed if NearbyList has not finished loading

See original GitHub issue
USER_COMMENT=gallery button then back
ANDROID_VERSION=6.0.1
APP_VERSION_NAME=1.30


BRAND=google
PHONE_MODEL=Nexus 5
CUSTOM_DATA=
STACK_TRACE=java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object android.content.Context.getSystemService(java.lang.String)' on a null object reference
at android.view.LayoutInflater.from(LayoutInflater.java:229)
at android.widget.ArrayAdapter.<init>(ArrayAdapter.java:178)
at android.widget.ArrayAdapter.<init>(ArrayAdapter.java:163)
at fr.free.nrw.commons.nearby.NearbyListFragment$NearbyAdapter.<init>(NearbyListFragment.java:178)
at fr.free.nrw.commons.nearby.NearbyListFragment$NearbyAsyncTask.onPostExecute(NearbyListFragment.java:143)
at fr.free.nrw.commons.nearby.NearbyListFragment$NearbyAsyncTask.onPostExecute(NearbyListFragment.java:112)

at android.os.AsyncTask.finish(AsyncTask.java:651)
at android.os.AsyncTask.-wrap1(AsyncTask.java)
at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:668)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5461)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
USER_COMMENT=trying to post a picture of the weather in Nigeria
ANDROID_VERSION=5.1
APP_VERSION_NAME=1.31
BRAND=itel
PHONE_MODEL=itel it1506
CUSTOM_DATA=
STACK_TRACE=java.lang.RuntimeException: An error occured while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:304)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355)
at java.util.concurrent.FutureTask.setException(FutureTask.java:222)
at java.util.concurrent.FutureTask.run(FutureTask.java:242)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
Caused by: java.lang.IndexOutOfBoundsException: Invalid index 0, size is 0
at java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java:255)
at java.util.ArrayList.get(ArrayList.java:308)
at fr.free.nrw.commons.nearby.NearbyListFragment.loadAttractionsFromLocation(NearbyListFragment.java:308)
at fr.free.nrw.commons.nearby.NearbyListFragment.access$300(NearbyListFragment.java:27)
at fr.free.nrw.commons.nearby.NearbyListFragment$NearbyAsyncTask.doInBackground(NearbyListFragment.java:134)
at fr.free.nrw.commons.nearby.NearbyListFragment$NearbyAsyncTask.doInBackground(NearbyListFragment.java:112)
at android.os.AsyncTask$2.call(AsyncTask.java:292)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
... 4 more
java.lang.IndexOutOfBoundsException: Invalid index 0, size is 0
at java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java:255)
at java.util.ArrayList.get(ArrayList.java:308)
at fr.free.nrw.commons.nearby.NearbyListFragment.loadAttractionsFromLocation(NearbyListFragment.java:308)
at fr.free.nrw.commons.nearby.NearbyListFragment.access$300(NearbyListFragment.java:27)
at fr.free.nrw.commons.nearby.NearbyListFragment$NearbyAsyncTask.doInBackground(NearbyListFragment.java:134)
at fr.free.nrw.commons.nearby.NearbyListFragment$NearbyAsyncTask.doInBackground(NearbyListFragment.java:112)
at android.os.AsyncTask$2.call(AsyncTask.java:292)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:24 (17 by maintainers)

github_iconTop GitHub Comments

1reaction
misaochancommented, Oct 7, 2016

@VojtechDostal I agree that the file takes a long time to load. 😦 We are tentatively planning to switch to a WikiData API query in the future though (see #289 ), which would hopefully speed things up.

0reactions
misaochancommented, Oct 7, 2016

Yes, please do. 😃 I have no idea what the protocol is for submitting our project for inclusion in the hackathon, but would love for it to happen.

I will see if there are scholarships available for me to attend - getting to Europe will be difficult/expensive for me as I’m based in NZ.

Read more comments on GitHub >

github_iconTop Results From Across the Web

App crashes when when back button is pressed (Android ...
When the migration is complete, you will access your Teams at stackoverflowteams.com, and they will no longer appear in the left sidebar on ......
Read more >
zMUD Version History (current) - Zugg Software
This was causing crashes all over the place, but mainly when opening new settings files. It's possible for this bug to have corrupted...
Read more >
Release Notes/Second Life Beta Viewer/2.1.0
Pressing Control-F (Windows) or Command-F (Mac) does not open the ... right-click context menus; Notifications appears over Sidebar if ...
Read more >
Crash On Clicking Browser Back Button in Promotion
6. Press Alt Q. Form appears NOTE: There is no menu option or button to query in this list applet. ... 9. Click...
Read more >
Spy - Addons - World of Warcraft - CurseForge
Spy is configured by default to switch back to the Nearby list when the next ... Spy will not generate any alerts for...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found