bumptech / glide

An image loading and caching library for Android focused on smooth scrolling
https://bumptech.github.io/glide/
Other
34.64k stars 6.12k forks source link

setDataSourceCallback failed: status = 0x80000000 #4495

Open bumdream opened 3 years ago

bumdream commented 3 years ago

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

The steps we've taken

Question

Thank you for reading it.

MateoVakili commented 3 years ago

Hi, I'm also having the same issue.

On devices with the issue I'm seeing the following error in the logs as well as what is provided by @HanSeungBeom :

D/skia: --- Failed to create image decoder with message 'unimplemented'

class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{ParcelFileDescriptor->BitmapDrawable->Drawable}

seems related to https://github.com/android/uamp/issues/354

MateoVakili commented 3 years ago

After taking a look at the issue I'm seeing that when I'm on the wifi connection the images load just fine however with data connection the same error occurs. the data connection is 4G and there is no issue with my connection speed.

bumdream commented 3 years ago

@MateoVakili Thank you for sharing the issue. :)

After taking a look at the issue I'm seeing that when I'm on the wifi connection the images load just fine however with data connection the same error occurs. the data connection is 4G and there is no issue with my connection speed.

It doesn't seem to matter if it's 4g or WIFI. There are more Wi-Fi users in our app who have experienced problems.

vellrya commented 3 years ago

+1 unfortuanately( Glide Version: 4.12.0

2021-03-16 18:08:40.070 27814-27900/com.sample.package D/skia: --- SkAndroidCodec::NewFromStream returned null
2021-03-16 18:08:40.071 27814-27900/com.sample.package D/skia: --- SkAndroidCodec::NewFromStream returned null
2021-03-16 18:08:40.079 27814-27900/com.sample.package D/skia: --- SkAndroidCodec::NewFromStream returned null
2021-03-16 18:08:40.079 27814-27900/com.sample.package D/skia: --- SkAndroidCodec::NewFromStream returned null
2021-03-16 18:08:40.094 27814-27900/com.sample.package D/skia: --- SkAndroidCodec::NewFromStream returned null
2021-03-16 18:08:40.099 27814-27900/com.sample.package I/chatty: uid=11668(com.sample.package) glide-source-th identical 4 lines
2021-03-16 18:08:40.101 27814-27900/com.sample.package D/skia: --- SkAndroidCodec::NewFromStream returned null
2021-03-16 18:08:40.103 1009-1009/? I/ExtendedUtils: printFileName fd(11) -> /data/data/com.sample.package/cache/image_manager_disk_cache/ba46fe404c104d7b3080517b33be79cfa4d07d7810ae9100864157942b7dc30e.0
2021-03-16 18:08:40.109 1009-2193/? I/ExtendedUtils: printFileName fd(11) -> /data/data/com.sample.package/cache/image_manager_disk_cache/ba46fe404c104d7b3080517b33be79cfa4d07d7810ae9100864157942b7dc30e.0
2021-03-16 18:08:40.122 27814-27814/com.sample.package W/Glide: Load failed for [url] with size [300x300]
    class com.bumptech.glide.load.engine.GlideException: Failed to load resource
    There were 4 root causes:
    java.lang.RuntimeException(setDataSourceCallback failed: status = 0x80000000)
    java.lang.RuntimeException(setDataSourceCallback failed: status = 0x80000000)
    java.lang.RuntimeException(setDataSource failed: status = 0x80000000)
    java.lang.RuntimeException(setDataSource failed: status = 0x80000000)
     call GlideException#logRootCauses(String) for more detail
      Cause (1 of 3): class com.bumptech.glide.load.engine.GlideException: Failed LoadPath{DirectByteBuffer->Object->Drawable}, REMOTE, http://valid_and_worked_Url.here

I am also use glide in other application for loading images from the same domain, but without view binding in recyclerview - all works. Probably, this is view binding-spesific error? @HanSeungBeom did you use view binding?

bumdream commented 3 years ago

Probably, this is view binding-spesific error? @HanSeungBeom did you use view binding?

@vellrya

BIGMONK commented 3 years ago

Maybe because the image url contains unicode value which will be converted to character,such as "https://timgsa.baidu.com/timg?image\\u0026quality\\u003d80\\u0026size\\u003db9999_10000\\u0026sec\\u003d1598539200003\\u0026di\\u003ddf074fd0b29e2bc8df514587fa59e224\\u0026imgtype\\u003d0\\u0026src\\u003dhttp%3A%2F%2Fc-ssl.duitang.com%2Fuploads%2Fblog%2F202008%2F09%2F20200809145546_tfrdx.thumb.400_0.jpeg" turn into "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1598539200003&di=df074fd0b29e2bc8df514587fa59e224&imgtype=0&src=http%3A%2F%2Fc-ssl.duitang.com%2Fuploads%2Fblog%2F202008%2F09%2F20200809145546_tfrdx.thumb.400_0.jpeg". But don't know why.

neo-turak commented 3 years ago

2021-07-07 09:42:41.958 8281-8281/** I/Glide: Root cause (6 of 8) java.lang.RuntimeException: setDataSourceCallback failed: status = 0x80000000 at android.media.MediaMetadataRetriever._setDataSource(Native Method) at android.media.MediaMetadataRetriever.setDataSource(MediaMetadataRetriever.java:223) at com.bumptech.glide.load.resource.bitmap.VideoDecoder$ByteBufferInitializer.initialize(VideoDecoder.java:324) at com.bumptech.glide.load.resource.bitmap.VideoDecoder$ByteBufferInitializer.initialize(VideoDecoder.java:318) at com.bumptech.glide.load.resource.bitmap.VideoDecoder.decode(VideoDecoder.java:173) at com.bumptech.glide.load.resource.bitmap.BitmapDrawableDecoder.decode(BitmapDrawableDecoder.java:58) at com.bumptech.glide.load.engine.DecodePath.decodeResourceWithList(DecodePath.java:92) at com.bumptech.glide.load.engine.DecodePath.decodeResource(DecodePath.java:70) at com.bumptech.glide.load.engine.DecodePath.decode(DecodePath.java:59) at com.bumptech.glide.load.engine.LoadPath.loadWithExceptionList(LoadPath.java:76) at com.bumptech.glide.load.engine.LoadPath.load(LoadPath.java:57) at com.bumptech.glide.load.engine.DecodeJob.runLoadPath(DecodeJob.java:529) at com.bumptech.glide.load.engine.DecodeJob.decodeFromFetcher(DecodeJob.java:493) at com.bumptech.glide.load.engine.DecodeJob.decodeFromData(DecodeJob.java:479) at com.bumptech.glide.load.engine.DecodeJob.decodeFromRetrievedData(DecodeJob.java:430) at com.bumptech.glide.load.engine.DecodeJob.onDataFetcherReady(DecodeJob.java:394) at com.bumptech.glide.load.engine.SourceGenerator.onDataFetcherReady(SourceGenerator.java:176) at com.bumptech.glide.load.engine.DataCacheGenerator.onDataReady(DataCacheGenerator.java:94) at com.bumptech.glide.load.model.ByteBufferFileLoader$ByteBufferFetcher.loadData(ByteBufferFileLoader.java:62) at com.bumptech.glide.load.engine.DataCacheGenerator.startNext(DataCacheGenerator.java:74) at com.bumptech.glide.load.engine.SourceGenerator.startNext(SourceGenerator.java:50) at com.bumptech.glide.load.engine.DecodeJob.runGenerators(DecodeJob.java:311) at com.bumptech.glide.load.engine.DecodeJob.runWrapped(DecodeJob.java:280) at com.bumptech.glide.load.engine.DecodeJob.run(DecodeJob.java:235) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at java.lang.Thread.run(Thread.java:764) at com.bumptech.glide.load.engine.executor.GlideExecutor$DefaultThreadFactory$1.run(GlideExecutor.java:393) its repeating error, I do not know why this is happeneng.

any solutions?

IgnacioGarcia198 commented 2 years ago

Hello, this is happening to me. In my case I am just retrieving some pokemon images. The url I am using: https://github.com/PokeAPI/sprites/blob/master/sprites/pokemon/other/official-artwork/1.png -> I can access it on the browser, but Glide cannot load this image. I tried to load images from a different site (just to discard some network issue) and worked ok. Getting same status code: 0x80000000

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
      Cause (2 of 6): class com.bumptech.glide.load.engine.GlideException: Failed LoadPath{FileInputStream->Object->Drawable}, DATA_DISK_CACHE, https://github.com/PokeAPI/sprites/blob/master/sprites/pokemon/other/official-artwork/1.png
        Cause (1 of 3): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{FileInputStream->GifDrawable->Drawable}
        Cause (2 of 3): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{FileInputStream->Bitmap->Drawable}
        Cause (3 of 3): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{FileInputStream->BitmapDrawable->Drawable}
      Cause (3 of 6): class com.bumptech.glide.load.engine.GlideException: Failed LoadPath{ParcelFileDescriptor->Object->Drawable}, DATA_DISK_CACHE, https://github.com/PokeAPI/sprites/blob/master/sprites/pokemon/other/official-artwork/1.png

I was wondering, but, could be the cause that the url contains uppercase characters?

StringMeUp commented 2 years ago

Same here:

java.io.IOException: java.lang.IllegalArgumentException: setDataSource failed: status = 0x80000000 at com.bumptech.glide.load.resource.bitmap.VideoDecoder.decode(VideoDecoder.java:173) at com.bumptech.glide.load.resource.bitmap.BitmapDrawableDecoder.decode(BitmapDrawableDecoder.java:58) at com.bumptech.glide.load.engine.DecodePath.decodeResourceWithList(DecodePath.java:72) at com.bumptech.glide.load.engine.DecodePath.decodeResource(DecodePath.java:55) at com.bumptech.glide.load.engine.DecodePath.decode(DecodePath.java:45) at com.bumptech.glide.load.engine.LoadPath.loadWithExceptionList(LoadPath.java:58) at com.bumptech.glide.load.engine.LoadPath.load(LoadPath.java:43) at com.bumptech.glide.load.engine.DecodeJob.runLoadPath(DecodeJob.java:515) at com.bumptech.glide.load.engine.DecodeJob.decodeFromFetcher(DecodeJob.java:480) at com.bumptech.glide.load.engine.DecodeJob.decodeFromData(DecodeJob.java:466) at com.bumptech.glide.load.engine.DecodeJob.decodeFromRetrievedData(DecodeJob.java:418) at com.bumptech.glide.load.engine.DecodeJob.onDataFetcherReady(DecodeJob.java:387) at com.bumptech.glide.load.engine.SourceGenerator.onDataFetcherReady(SourceGenerator.java:135) at com.bumptech.glide.load.engine.DataCacheGenerator.onDataReady(DataCacheGenerator.java:95) at com.bumptech.glide.load.model.FileLoader$FileFetcher.loadData(FileLoader.java:76) at com.bumptech.glide.load.engine.DataCacheGenerator.startNext(DataCacheGenerator.java:75) at com.bumptech.glide.load.engine.SourceGenerator.startNext(SourceGenerator.java:49) at com.bumptech.glide.load.engine.DecodeJob.runGenerators(DecodeJob.java:309) at com.bumptech.glide.load.engine.DecodeJob.decodeFromRetrievedData(DecodeJob.java:426) at com.bumptech.glide.load.engine.DecodeJob.onDataFetcherReady(DecodeJob.java:387) at com.bumptech.glide.load.engine.SourceGenerator.onDataFetcherReady(SourceGenerator.java:135) at com.bumptech.glide.load.engine.DataCacheGenerator.onDataReady(DataCacheGenerator.java:95) at com.bumptech.glide.load.model.FileLoader$FileFetcher.loadData(FileLoader.java:76) at com.bumptech.glide.load.engine.DataCacheGenerator.startNext(DataCacheGenerator.java:75) at com.bumptech.glide.load.engine.SourceGenerator.startNext(SourceGenerator.java:49) at com.bumptech.glide.load.engine.DecodeJob.runGenerators(DecodeJob.java:309) at com.bumptech.glide.load.engine.DecodeJob.decodeFromRetrievedData(DecodeJob.java:426) at com.bumptech.glide.load.engine.DecodeJob.onDataFetcherReady(DecodeJob.java:387) at com.bumptech.glide.load.engine.SourceGenerator.onDataFetcherReady(SourceGenerator.java:135) at com.bumptech.glide.load.engine.DataCacheGenerator.onDataReady(DataCacheGenerator.java:95) at com.bumptech.glide.load.model.ByteBufferFileLoader$ByteBufferFetcher.loadData(ByteBufferFileLoader.java:74) at com.bumptech.glide.load.engine.DataCacheGenerator.startNext(DataCacheGenerator.java:75) at com.bumptech.glide.load.engine.SourceGenerator.startNext(SourceGenerator.java:49) at com.bumptech.glide.load.engine.DecodeJob.runGenerators(DecodeJob.java:309) at com.bumptech.glide.load.engine.DecodeJob.runWrapped(DecodeJob.java:279) at com.bumptech.glide.load.engine.DecodeJob.run(DecodeJob.java:235) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at java.lang.Thread.run(Thread.java:929) at com.bumptech.glide.load.engine.executor.GlideExecutor$DefaultThreadFactory$1.run(GlideExecutor.java:446) Caused by: java.lang.IllegalArgumentException: setDataSource failed: status = 0x80000000

IgnacioGarcia198 commented 2 years ago

Guys I think I finally understood the problem! The real issue seems to be that the url is not pointing directly to an image. Example: In my case, I was using url https://github.com/PokeAPI/sprites/blob/master/sprites/pokemon/other/official-artwork/1.png , but when I click to download this image, it takes me to https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/other/official-artwork/1.png -> Using this url actually works.

I also found a trick: Try to do this: curl url and see the output:

I got the clue from here (just use some translator): https://blog.csdn.net/u012894648/article/details/115465522

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had activity in the last seven days. It will be closed if no further activity occurs within the next seven days. Thank you for your contributions.

nicelyjust commented 1 year ago

@IgnacioGarcia198 you are right,help me a lot!add a tip:clear the cache first

xckevin commented 1 year ago

I got this error too, because the image content error. The content type of image response is image/webp, but actual it is a gif. https://img101.urbanic.com/v1/aa8160c6f1414db3bf128292973c1389.webp

h-zhouwenjun commented 8 months ago

i got the same error and the imageUrl is https://head.miyiapp.com/android/781015001706435046968.jpg?x-oss-process=image/resize,m_mfit,h_250,w_250 , error message is below: 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 Cause (2 of 3): class com.bumptech.glide.load.engine.GlideException: Failed LoadPath{FileInputStream->Object->Drawable}, REMOTE, https://head.miyiapp.com/android/781015001706435046968.jpg?x-oss-process=image/resize,m_mfit,h_250,w_250 Cause (1 of 3): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{FileInputStream->GifDrawable->Drawable} Cause (2 of 3): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{FileInputStream->Bitmap->Drawable} Cause (3 of 3): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{FileInputStream->BitmapDrawable->Drawable} Cause (3 of 3): class com.bumptech.glide.load.engine.GlideException: Failed LoadPath{ParcelFileDescriptor->Object->Drawable}, REMOTE,

ytjojo commented 3 months ago

https://file.wogoo.com/app/moments/20240625/1bdf4ba084c74cd3886228d324a14db9.png the file is incomplete I have same error when load this url ,but only one phone can load success