Can we load the same url in different scaling using different diskcache strategy ?
- Dominant language
- Java
- Stars
- 35k
- Forks
- 6.2k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 8
Description
**Glide Version**: Glide 4.0 alpha
**Device/Android Version**: Android
**Issue details / Repro steps / Use case background**: We have a usecase where we try to load the same image in two different views on android - scaling them to the respective view size. And we are using DiskCacheStrategy.DATA for one and DiskCacheStrategy.ALL for another view as the second view has some color extraction logic and we wanted to store the resources for the second view.
After implementing this - we are noticing some failures in loading images with the below signature and are worried whether this is because we are using two different cache strategies. Could this issue be because of two different strategies? Can we use DATa for one and ALL for another?Is there a better way?
**Glide load line / `GlideModule` (if any) / list Adapter code (if any)**:
```java
Glide.with...
```
(1)
Glide.with(context)
.as(PaletteBitmapContainer.class)
.load(URL)
.diskCacheStrategy(DiskCacheStrategy.ALL)
.override(view.getWidth(), view.getHeight())
(2)
Glide.with(context)
.load(URL)
.diskCacheStrategy(DiskCacheStrategy.DATA)
.override(view.getWidth(), view.getHeight())
crash signature: Removed the url for security reasons
W/Glide: Load failed for URL
class bxg: Failed to load resource
There were 4 root causes:
java.lang.RuntimeException(setDataSourceCallback failed: status = 0x80000000)
java.lang.RuntimeException(setDataSource failed: status = 0x80000000)
java.lang.RuntimeException(setDataSourceCallback failed: status = 0x80000000)
java.lang.RuntimeException(setDataSource failed: status = 0x80000000)
call GlideException#logRootCauses(String) for more detail
Cause (1 of 6): class bxg: Failed LoadPath{DirectByteBuffer->Object->dhu}, DATA_DISK_CACHE, URL
There was 1 root cause:
java.lang.RuntimeException(setDataSourceCallback failed: status = 0x80000000)
call GlideException#logRootCauses(String) for more detail
Cause (1 of 1): class bxg: Failed DecodePath{DirectByteBuffer->Bitmap->dhu}
There was 1 root cause:
java.lang.RuntimeException(setDataSourceCallback failed: status = 0x80000000)
call GlideException#logRootCauses(String) for more detail
Cause (1 of 1): class java.lang.RuntimeException: setDataSourceCallback failed: status = 0x80000000
2021-11-03 17:33:07.661 9142-9142/com.google.android.apps.tv.dreamx W/Glide: Cause (2 of 6): class bxg: Failed LoadPath{FileInputStream->Object->dhu}, DATA_DISK_CACHE, URL
Cause (1 of 1): class bxg: Failed DecodePath{FileInputStream->Bitmap->dhu}
Cause (3 of 6): class bxg: Failed LoadPath{ParcelFileDescriptor->Object->dhu}, DATA_DISK_CACHE, URL
There was 1 root cause:
java.lang.RuntimeException(setDataSource failed: status = 0x80000000)
call GlideException#logRootCauses(String) for more detail
Cause (1 of 1): class bxg: Failed DecodePath{ParcelFileDescriptor->Bitmap->dhu}
There was 1 root cause:
Contributor guide
Assessment
This issue has not been assessed yet.