Skip to content
This repository has been archived by the owner on Dec 15, 2020. It is now read-only.

NullPointerException in Reservoir.java:180 #12

Closed
sohamtriveous opened this issue Dec 2, 2014 · 5 comments
Closed

NullPointerException in Reservoir.java:180 #12

sohamtriveous opened this issue Dec 2, 2014 · 5 comments

Comments

@sohamtriveous
Copy link

One of my customers is frequently seeing the following issue in a beta version of their app. We've seen over 60+ non-fatals over 3 separate instances affecting 10+ users in a beta test group of around 15

Trace:

java.lang.NullPointerException
       at com.anupcowkur.reservoir.Reservoir$GetTask.doInBackground(Reservoir.java:180)
       at com.anupcowkur.reservoir.Reservoir$GetTask.doInBackground(Reservoir.java:163)
       at android.os.AsyncTask$2.call(AsyncTask.java:287)
       at java.util.concurrent.FutureTask.run(FutureTask.java:234)
       at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
       at java.lang.Thread.run(Thread.java:856)

This happens at multiple locations in the app and has no specific trigger. Reservoir has been initiated in the application object like so:

Reservoir.init(this, 100000);

Seems the cache object might be null in Reservoir.java:180, let me know if you need any more information to reproduce the issue

@anupcowkur
Copy link
Owner

Will take a look soon.

@anupcowkur
Copy link
Owner

Ok, so I spent some time on this but wasn't able to reproduce it. If you can provide a reproducible sample, that would help a lot.

@dev-mraj
Copy link

dev-mraj commented Feb 2, 2015

+1

@anupcowkur
Copy link
Owner

closing for now. Will re-open if I can get a reproducible sample.

@anupcowkur
Copy link
Owner

Ok. So the issue seems to be that library shows a success message even when the object is not stored due to there not being enough space in the cache to store the object. It should should an error message saying "not enough space in cache!" or something. Re-opening issue now that cause is known.

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

3 participants