Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Android Image loading error #902

Open
LiangLuDev opened this issue Feb 9, 2023 · 10 comments
Open

[BUG] Android Image loading error #902

LiangLuDev opened this issue Feb 9, 2023 · 10 comments

Comments

@LiangLuDev
Copy link

LiangLuDev commented Feb 9, 2023

error logs :

I/Glide ( 9972): Root cause (3 of 3)
I/Glide ( 9972): java.lang.IllegalArgumentException: setDataSource failed: status = 0xFFFFFFEA
I/Glide ( 9972): at android.media.MediaMetadataRetriever._setDataSource(Native Method)
I/Glide ( 9972): at android.media.MediaMetadataRetriever.setDataSource(MediaMetadataRetriever.java:312)
I/Glide ( 9972): at com.bumptech.glide.load.resource.bitmap.VideoDecoder$AssetFileDescriptorInitializer.initialize(VideoDecoder.java:422)
I/Glide ( 9972): at com.bumptech.glide.load.resource.bitmap.VideoDecoder$AssetFileDescriptorInitializer.initialize(VideoDecoder.java:417)
I/Glide ( 9972): at com.bumptech.glide.load.resource.bitmap.VideoDecoder.decode(VideoDecoder.java:188)
I/Glide ( 9972): at com.bumptech.glide.load.engine.DecodePath.decodeResourceWithList(DecodePath.java:92)
I/Glide ( 9972): at com.bumptech.glide.load.engine.DecodePath.decodeResource(DecodePath.java:70)
I/Glide ( 9972): at com.bumptech.glide.load.engine.DecodePath.decode(DecodePath.java:59)
I/Glide ( 9972): at com.bumptech.glide.load.engine.LoadPath.loadWithExceptionList(LoadPath.java:76)
I/Glide ( 9972): at com.bumptech.glide.load.engine.LoadPath.load(LoadPath.java:57)
I/Glide ( 9972): at com.bumptech.glide.load.engine.DecodeJob.runLoadPath(DecodeJob.java:539)
I/Glide ( 9972): at com.bumptech.glide.load.engine.DecodeJob.decodeFromFetcher(DecodeJob.java:503)
I/Glide ( 9972): at com.bumptech.glide.load.engine.DecodeJob.decodeFromData(DecodeJob.java:489)
I/Glide ( 9972): at com.bumptech.glide.load.engine.DecodeJob.decodeFromRetrievedData(DecodeJob.java:434)
I/Glide ( 9972): at com.bumptech.glide.load.engine.DecodeJob.onDataFetcherReady(DecodeJob.java:399)
I/Glide ( 9972): at com.bumptech.glide.load.engine.SourceGenerator.onDataReadyInternal(SourceGenerator.java:211)
I/Glide ( 9972): at com.bumptech.glide.load.engine.SourceGenerator$1.onDataReady(SourceGenerator.java:101)
I/Glide ( 9972): at com.bumptech.glide.load.data.LocalUriFetcher.loadData(LocalUriFetcher.java:45)
I/Glide ( 9972): at com.bumptech.glide.load.engine.SourceGenerator.startNextLoad(SourceGenerator.java:95)
I/Glide ( 9972): at com.bumptech.glide.load.engine.SourceGenerator.startNext(SourceGenerator.java:88)
I/Glide ( 9972): at com.bumptech.glide.load.engine.DecodeJob.runGenerators(DecodeJob.java:311)
I/Glide ( 9972): at com.bumptech.glide.load.engine.DecodeJob.decodeFromRetrievedData(DecodeJob.java:442)
I/Glide ( 9972): at com.bumptech.glide.load.engine.DecodeJob.onDataFetcherReady(DecodeJob.java:399)
I/Glide ( 9972): at com.bumptech.glide.load.engine.SourceGenerator.onDataReadyInternal(SourceGenerator.java:211)
I/Glide ( 9972): at com.bumptech.glide.load.engine.SourceGenerator$1.onDataReady(SourceGenerator.java:101)
I/Glide ( 9972): at com.bumptech.glide.load.data.LocalUriFetcher.loadData(LocalUriFetcher.java:45)
I/Glide ( 9972): at com.bumptech.glide.load.engine.SourceGenerator.startNextLoad(SourceGenerator.java:95)
I/Glide ( 9972): at com.bumptech.glide.load.engine.SourceGenerator.startNext(SourceGenerator.java:88)
I/Glide ( 9972): at com.bumptech.glide.load.engine.DecodeJob.runGenerators(DecodeJob.java:311)
I/Glide ( 9972): at com.bumptech.glide.load.engine.DecodeJob.decodeFromRetrievedData(DecodeJob.java:442)
I/Glide ( 9972): at com.bumptech.glide.load.engine.DecodeJob.onDataFetcherReady(DecodeJob.java:399)
I/Glide ( 9972): at com.bumptech.glide.load.engine.SourceGenerator.onDataReadyInternal(SourceGenerator.java:211)
I/Glide ( 9972): at com.bumptech.glide.load.engine.SourceGenerator$1.onDataReady(SourceGenerator.java:101)
I/Glide ( 9972): at com.bumptech.glide.load.data.LocalUriFetcher.loadData(LocalUriFetcher.java:45)
I/Glide ( 9972): at com.bumptech.glide.load.engine.SourceGenerator.startNextLoad(SourceGenerator.java:95)
I/Glide ( 9972): at com.bumptech.glide.load.engine.SourceGenerator.startNext(SourceGenerator.java:88)
I/Glide ( 9972): at com.bumptech.glide.load.engine.DecodeJob.runGenerators(DecodeJob.java:311)
I/Glide ( 9972): at com.bumptech.glide.load.engine.DecodeJob.decodeFromRetrievedData(DecodeJob.java:442)
I/Glide ( 9972): at com.bumptech.glide.load.engine.DecodeJob.onDataFetcherReady(DecodeJob.java:399)
I/Glide ( 9972): at com.bumptech.glide.load.engine.SourceGenerator.onDataReadyInternal(SourceGenerator.java:211)
I/Glide ( 9972): at com.bumptech.glide.load.engine.SourceGenerator$1.onDataReady(SourceGenerator.java:101)
I/Glide ( 9972): at com.bumptech.glide.load.data.LocalUriFetcher.loadData(LocalUriFetcher.java:45)
I/Glide ( 9972): at com.bumptech.glide.load.model.stream.QMediaStoreUriLoader$QMediaStoreUriFetcher.loadData(QMediaStoreUriLoader.java:141)
I/Glide ( 9972): at com.bumptech.glide.load.engine.SourceGenerator.startNextLoad(SourceGenerator.java:95)
I/Glide ( 9972): at com.bumptech.glide.load.engine.SourceGenerator.startNext(SourceGenerator.java:88)
I/Glide ( 9972): at com.bumptech.glide.load.engine.DecodeJob.runGenerators(DecodeJob.java:311)
I/Glide ( 9972): at com.bumptech.glide.load.engine.DecodeJob.decodeFromRetrievedData(DecodeJob.java:442)
I/Glide ( 9972): at com.bumptech.glide.load.engine.DecodeJob.onDataFetcherReady(DecodeJob.java:399)
I/Glide ( 9972): at com.bumptech.glide.load.engine.SourceGenerator.onDataReadyInternal(SourceGenerator.java:211)
I/Glide ( 9972): at com.bumptech.glide.load.engine.SourceGenerator$1.onDataReady(SourceGenerator.java:101)
I/Glide ( 9972): at com.bumptech.glide.load.model.MultiModelLoader$MultiFetcher.onDataReady(MultiModelLoader.java:145)
I/Glide ( 9972): at com.bumptech.glide.load.data.LocalUriFetcher.loadData(LocalUriFetcher.java:45)
I/Glide ( 9972): at com.bumptech.glide.load.model.MultiModelLoader$MultiFetcher.loadData(MultiModelLoader.java:100)
I/Glide ( 9972): at com.bumptech.glide.load.model.MultiModelLoader$MultiFetcher.startNextOrFail(MultiModelLoader.java:164)
I/Glide ( 9972): at com.bumptech.glide.load.model.MultiModelLoader$MultiFetcher.onDataReady(MultiModelLoader.java:147)
I/Glide ( 9972): at com.bumptech.glide.load.data.mediastore.ThumbFetcher.loadData(ThumbFetcher.java:62)
I/Glide ( 9972): at com.bumptech.glide.load.model.MultiModelLoader$MultiFetcher.loadData(MultiModelLoader.java:100)
I/Glide ( 9972): at com.bumptech.glide.load.model.stream.QMediaStoreUriLoader$QMediaStoreUriFetcher.loadData(QMediaStoreUriLoader.java:141)
I/Glide ( 9972): at com.bumptech.glide.load.engine.SourceGenerator.startNextLoad(SourceGenerator.java:95)
I/Glide ( 9972): at com.bumptech.glide.load.engine.SourceGenerator.startNext(SourceGenerator.java:88)
I/Glide ( 9972): at com.bumptech.glide.load.engine.DecodeJob.runGenerators(DecodeJob.java:311)
I/Glide ( 9972): at com.bumptech.glide.load.engine.DecodeJob.decodeFromRetrievedData(DecodeJob.java:442)
I/Glide ( 9972): at com.bumptech.glide.load.engine.DecodeJob.onDataFetcherReady(DecodeJob.java:399)
I/Glide ( 9972): at com.bumptech.glide.load.engine.SourceGenerator.onDataReadyInternal(SourceGenerator.java:211)
I/Glide ( 9972): at com.bumptech.glide.load.engine.SourceGenerator$1.onDataReady(SourceGenerator.java:101)
I/Glide ( 9972): at com.bumptech.glide.load.data.mediastore.ThumbFetcher.loadData(ThumbFetcher.java:62)
I/Glide ( 9972): at com.bumptech.glide.load.engine.SourceGenerator.startNextLoad(SourceGenerator.java:95)
I/Glide ( 9972): at com.bumptech.glide.load.engine.SourceGenerator.startNext(SourceGenerator.java:88)
I/Glide ( 9972): at com.bumptech.glide.load.engine.DecodeJob.runGenerators(DecodeJob.java:311)
I/Glide ( 9972): at com.bumptech.glide.load.engine.DecodeJob.runWrapped(DecodeJob.java:280)
I/Glide ( 9972): at com.bumptech.glide.load.engine.DecodeJob.run(DecodeJob.java:235)
I/Glide ( 9972): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
I/Glide ( 9972): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
I/Glide ( 9972): at com.bumptech.glide.load.engine.executor.GlideExecutor$DefaultThreadFactory$1.run(GlideExecutor.java:421)
I/Glide ( 9972): at java.lang.Thread.run(Thread.java:930)
I/Glide ( 9972): at com.bumptech.glide.load.engine.executor.GlideExecutor$DefaultPriorityThreadFactory$1.run(GlideExecutor.java:380)

======== Exception caught by photo_manager =========================================================
The following PlatformException was thrown:
PlatformException(Thumbnail request error, java.util.concurrent.ExecutionException: com.bumptech.glide.load.engine.GlideException: Failed to load resource
There were 3 root causes:
java.lang.IllegalArgumentException(setDataSource failed: status = 0xFFFFFFEA)
java.lang.IllegalArgumentException(setDataSource failed: status = 0xFFFFFFEA)
java.lang.IllegalArgumentException(setDataSource failed: status = 0xFFFFFFEA)
call GlideException#logRootCauses(String) for more detail, null, null)

When the exception was thrown, this was the stack:
StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:653:7)
MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:296:18)

AssetEntityImageProvider._loadAsync (package:photo_manager/src/internal/image_provider.dart:118:16)

@LiangLuDev
Copy link
Author

I went to the system album to check the wrong picture, and there was also a problem, but once the error was reported, it would affect the loading of the following pictures, and it would be stuck for a while

@LiangLuDev
Copy link
Author

在系统相册查看报错的几张图片,有几张是正常无法打开的。
但是我看很老的版本(0.x 和1.x)好像是没问题的。
出现报错会导致图片加载不了,等待了好久才恢复继续加载

@LiangLuDev
Copy link
Author

Because the width and height of the picture are 0

image

@AlexV525
Copy link
Member

AlexV525 commented Feb 10, 2023

We need to figure out how to remove empty assets and keep the counting of paths working.

@LiangLuDev
Copy link
Author

I don't know. I accidentally found this problem by using my colleague's phone

@Wbqqqq
Copy link

Wbqqqq commented Sep 21, 2023

Hello , any progress?

@Fansvaer
Copy link

MOV的视频,获取缩略图失败,也会导致后续其他的缩略图获取需要等很久

@yuanting2016
Copy link

is it fixed?

@wdcs-dimilkalathiya
Copy link

This issue happens if you have broken assets on device e.g if download was canceled middle or corrupted file

if you delete specific file it solves problem but there should be way to identify such assets and not try to load them in the first place

@lyngbach
Copy link

lyngbach commented Jun 4, 2024

Seems to happen as well on Android Emulator when you have some video files where the playback wont work.

Detecting if a bad file is there and exclude it would be awesome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants