Open ZouYongpeng opened 1 year ago
I also found another problematic gif file.
The log is as follows W/Glide: Load failed for [content://com.oplus.wallpapers.fileProvider/gallery_pictures/storage/emulated/0/DCIM/Camera/gif_load_error_9e_05_04_00_3b.gif] with dimensions [382x720] class com.bumptech.glide.load.engine.GlideException: Failed to load resource Cause (1 of 1): class com.bumptech.glide.load.engine.GlideException: Failed LoadPath{AutoCloseInputStream->GifDrawable->GifDrawable}, LOCAL Cause (1 of 1): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{AutoCloseInputStream->GifDrawable->GifDrawable}
Through breakpoint debugging, I found that GifHeaderParser.read() threw an exception when parsing the file, resulting in a status of STATUS_FORMAT_ERROR.
The exception code is currByte = rawData.get() & MASK_INT_LOWEST_BYTE; I think it may be that BufferUnderflowException is thrown when the rawData.get() method is executed. Does Glide have a plan to ensure that the effective data length in ByteBuffer is sufficient or perform exception handling?
Does Glide have any format requirements for Gif files? This Gif file starts with "47 49 46 38 39 61" and ends with "3b". I can't determine whether there is a problem with the Gif file format, after all, it can be displayed normally on other apps.
What frustrates me is that I can't upload the problematic gif file and the screenshot of the breakpoint debugging code.
Failed DecodePath{AssetInputStream->GifDrawable->GifDrawable}
Has it been resolved? I also encountered this problem
I found Glide cannot load this gif at all android devices, like Pixel 3 XL.
My code:
build.gradle
MainActivity
Error log:
My analysis: I think this Gif format is special and Glide can't parse it successfully.