UIL Android "cache closed"
I've been using this awesome library with no problems for several months now and it works great :)
In my latest application, I am getting this error via crashlytics, a lot of it, but I cannot reproduce it myself. Does anyone know how this happens and how can I fix my application to not have this behavior? I know this is not a library problem, definitely one of my applications, but I don't understand how this 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.runine (ImageLoavaEngine : 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)
source to share
This exception comes from the method checkNotClosed
DiskLruCache
. When journalWriter
null, such a healing will occur.
When the size journal
is cut in half, it journalWriter
closes and the rebuilding begins. Any operation during this time will throw such an exception.
The log is in the cache folder, check if it has not changed or has not been.
If you want to clean up DiskCache, your best bet is to use the api framework to clean up DiskCache.
source to share