Android-Universal-Image-Loader
Android-Universal-Image-Loader copied to clipboard
"Cache is closed"
Hi guys, I'm using this amazing library without any problem for several months now, and it's working great :)
In my last app, I get this error through crashlytics, a lot of it, but I can't reproduce it myself. Does anyone know how it happens, and how I could correct my app to not have this behavior ? I know it's not a library problem, surely one on my app, but I don't understand how it can happen.
Thanks in advance,
java.lang.IllegalStateException: cache is closed
at com.nostra13.universalimageloader.cache.disc.impl.ext.DiskLruCache.checkNotClosed(DiskLruCache.java:642)
at com.nostra13.universalimageloader.cache.disc.impl.ext.DiskLruCache.get(DiskLruCache.java:413)
at com.nostra13.universalimageloader.cache.disc.impl.ext.LruDiscCache.get(LruDiscCache.java:124)
at com.nostra13.universalimageloader.core.ImageLoaderEngine$1.run(ImageLoaderEngine.java:72)
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:841)
I got this exception too. Can someone help?
I got this exception too
i got this exception too,Can someone fix
i got this exception too,Can someone fix
i got this exception too,Can someone fix
i got this exception too,Can someone fix
i got this exception too,Can someone fix
i got this exception too,Can someone fix
i got this exception too,Can someone fix
i got this exception too,Can someone fix
This Exception comes from the checkNotClosed
method of DiskLruCache
.When the journalWriter
is null, such expception will happen.
When the journal
size is cut half, journalWriter
will close and start rebuild. Any operation during this time will cause such Exception.
The journal is under the cache folder,check if it has changed or deleted.
If you want to clear the DiskCache, it is best to use the framework api to clear the DiskCache.