bumptech / bumptech/glide

setDataSourceCallback failed: status = 0x80000000

Open
#4,495 15 comments 5 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
35k
Forks
6.2k
Avg merge
1d 11h
Merged PRs (30d)
8

Description

hi. I'm SeungBeom :)
First of all, thank you so much for making a great library.
Our app uses this library well.

I've already checked same other issues here. (like https://github.com/bumptech/glide/issues/980, https://github.com/bumptech/glide/issues/4254, https://github.com/bumptech/glide/issues/3345)
But I don't get much help, so I submit new issue.

(I used a translator because I am not good at English. Please understand.)

## **Issue details / Repro steps / Use case background**:
**Glide Version**: 4.12.0
**Device/Android Version**: multiple version or devices encountered problems

## log
```
com.bumptech.glide.load.o.q: Failed to load resource
There were 8 causes:
java.io.IOException(java.lang.RuntimeException: setDataSourceCallback failed: status = 0x80000000)
java.io.IOException(java.lang.RuntimeException: setDataSourceCallback failed: status = 0x80000000)
java.io.IOException(java.lang.RuntimeException: setDataSource failed: status = 0x80000000)
java.io.IOException(java.lang.RuntimeException: setDataSource failed: status = 0x80000000)
java.io.IOException(java.lang.RuntimeException: setDataSourceCallback failed: status = 0x80000000)
java.io.IOException(java.lang.RuntimeException: setDataSourceCallback failed: status = 0x80000000)
java.io.IOException(java.lang.RuntimeException: setDataSource failed: status = 0x80000000)
java.io.IOException(java.lang.RuntimeException: setDataSource failed: status = 0x80000000)
call GlideException#logRootCauses(String) for more detail
```
It doesn't happen to all users, but it happens to about 5,000 people a day.
(The average daily user is 2 million.)

## Glide Setting Environment
- DiskCacheStrategy.DATA
- skipMemoryCache(false) -> default
- use okhttp3 (but not using okhttp cache)

## The steps we've taken
- Guessing and reproducing Issue
- ![image](https://user-images.githubusercontent.com/21086676/106713275-8f691980-663d-11eb-85ba-962e135b07a3.png)
- `0x80000000` issue could be reproduced by changing the **contents of a `*.0`-type file** stored in the cache path.
- When I changed the contents, the same issue error occurred
so, we assumed that **the main cause was corrupted disk cache.**
- use signature
- ![image](https://user-images.githubusercontent.com/21086676/106713472-df47e080-663d-11eb-969d-f629d4a77144.png)
- we increased the preference every time a problem occurs, and we use it as a signature.
- why signature?
- we found that it is difficult to delete the cache directly with uri or url. [(link)](https://bumptech.github.io/glide/doc/caching.html#cache-invalidation)
- In Addition, using `DiskLruCacheWrapper` class, we knew it was possible to remove cache with the key with `remove` method, but we found an **exception case** that did not resolve the issue in that way. So we finally used signature.
- The issue seemed to have been resolved! so we provided the modified version to the customer.
- but the problem was not solved. the user experienced the same issue,
although the signature increased several times. we thought maybe it wasn't about Disk Cache..

## Question
- I wonder if there is another situation where 0x80000000 issue can occur.
- Is there anything I missed or I can try?

Thank you for reading it.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.