chrisbanes/Android-BitmapCache

IllegalStateException: BitmapMemoryLruCache.sizeOf() is reporting inconsistent results!

ashughes opened this issue · 2 comments

Sometimes I get an IllegalStateException when calling BitmapLruCache.getFromDiskCache(). I have both a disk and memory cache configured, and this call is successful most of the time.

Here's the stacktrace:

java.lang.IllegalStateException: uk.co.senab.bitmapcache.BitmapMemoryLruCache.sizeOf() is reporting inconsistent results!
at android.support.v4.util.LruCache.trimToSize
at android.support.v4.util.LruCache.put
at uk.co.senab.bitmapcache.BitmapMemoryLruCache.put
at uk.co.senab.bitmapcache.BitmapLruCache.getFromDiskCache

Thanks Chris. I haven't run into the issue since the fix.

Great, closing.