Glide doesn't load images when device space run out
- Dominant language
- Java
- Stars
- 35k
- Forks
- 6.2k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 8
Description
**Glide Version/Integration library (if any)**: 3.6.1
**Device/Android Version**: tested on android emulator and SONY Xperia Z, Samsung G531H
**Issue details/Repro steps/Use case background**:
Happens when free internal or external disk space is less than glide max disk cache size.
Can be reproduced on emulator by creating large file in app data directory which will take all of free space and load an image that is not in disk cache.
**Glide load line**:
``` java
Glide.with(context)
.load(url)
.transform(new CircleTransform())
.dontAnimate()
.into(new Target());
public static class Target extends SimpleTarget {
@Override
public void onLoadFailed(Exception e, Drawable errorDrawable) {
super.onLoadFailed(e, errorDrawable);
Log.e("TAG", "onLoadFailed " + e);
}
@Override
public void onResourceReady(GlideDrawable resource, GlideAnimation glideAnimation) {
Log.e("TAG", "onResourceReady");
}
@Override
public void onLoadCleared(Drawable placeholder) {
super.onLoadCleared(placeholder);
Log.e("TAG", "onLoadCleared");
}
@Override
public void onLoadStarted(Drawable placeholder) {
super.onLoadStarted(placeholder);
Log.e("TAG", "onLoadStarted");
}
}
}
```
**Stack trace / LogCat**:
``` ruby
01-20 09:07:29.899 16463-16463/my.app E/TAG: onLoadFailed null
```
**Expected behavior**: Glide fails to write image to disk cache, but keeps it in memory cache and onResourceReady method called
Contributor guide
Assessment
This issue has not been assessed yet.