This code calls setImageDrawable() before the reference count is incremented by setBeingUsed(). The race is that if the drawable is evicted from the cache due to memory pressure after the drawable is assigned but before the reference count is incremented then checkState() might be called from another thread, and the bitmap might be recycled, leading to the "Canvas trying to use a recycled bitmap" exception.
I think there's a race condition here.
https://github.com/chrisbanes/Android-BitmapCache/blob/master/library/src/uk/co/senab/bitmapcache/CacheableImageView.java#L51
This code calls setImageDrawable() before the reference count is incremented by setBeingUsed(). The race is that if the drawable is evicted from the cache due to memory pressure after the drawable is assigned but before the reference count is incremented then checkState() might be called from another thread, and the bitmap might be recycled, leading to the "Canvas trying to use a recycled bitmap" exception.