Open marchlqq opened 1 month ago
Partial exception log: Load failed for [https://i-blog.csdnimg.cn/direct/efed520f694b4f31aa30e236c7bfa0ed.jpeg] with dimensions [1440x400] class com.bumptech.glide.load.engine.GlideException: Failed to load resource There were 24 root causes: java.lang.IndexOutOfBoundsException(index=-2023161846 out of bounds (limit=86, nb=2)) java.lang.RuntimeException(setDataSourceCallback failed: status = 0x80000000) java.lang.IndexOutOfBoundsException(index=-2023161846 out of bounds (limit=86, nb=2)) java.lang.RuntimeException(setDataSourceCallback failed: status = 0x80000000) java.lang.IndexOutOfBoundsException(index=-2023161846 out of bounds (limit=86, nb=2)) java.lang.RuntimeException(setDataSourceCallback failed: status = 0x80000000) java.lang.IndexOutOfBoundsException(index=-2023161846 out of bounds (limit=86, nb=2)) java.lang.IndexOutOfBoundsException(index=-2023161846 out of bounds (limit=86, nb=2)) java.lang.IndexOutOfBoundsException(index=-2023161846 out of bounds (limit=86, nb=2)) java.lang.IndexOutOfBoundsException(index=-2023161846 out of bounds (limit=86, nb=2)) java.lang.RuntimeException(setDataSource failed: status = 0x80000000) java.lang.RuntimeException(setDataSource failed: status = 0x80000000) java.lang.IndexOutOfBoundsException(index=-2023161846 out of bounds (limit=86, nb=2)) java.lang.RuntimeException(setDataSourceCallback failed: status = 0x80000000) java.lang.IndexOutOfBoundsException(index=-2023161846 out of bounds (limit=86, nb=2)) java.lang.RuntimeException(setDataSourceCallback failed: status = 0x80000000) java.lang.IndexOutOfBoundsException(index=-2023161846 out of bounds (limit=86, nb=2)) java.lang.RuntimeException(setDataSourceCallback failed: status = 0x80000000) java.lang.IndexOutOfBoundsException(index=-2023161846 out of bounds (limit=86, nb=2)) java.lang.IndexOutOfBoundsException(index=-2023161846 out of bounds (limit=86, nb=2)) java.lang.IndexOutOfBoundsException(index=-2023161846 out of bounds (limit=86, nb=2)) java.lang.IndexOutOfBoundsException(index=-2023161846 out of bounds (limit=86, nb=2)) java.lang.RuntimeException(setDataSource failed: status = 0x80000000) java.lang.RuntimeException(setDataSource failed: status = 0x80000000) call GlideException#logRootCauses(String) for more detail Cause (1 of 6): class com.bumptech.glide.load.engine.GlideException: Failed LoadPath{DirectByteBuffer->Object->Drawable}, DATA_DISK_CACHE, https://i-blog.csdnimg.cn/direct/efed520f694b4f31aa30e236c7bfa0ed.jpeg There were 6 root causes: java.lang.IndexOutOfBoundsException(index=-2023161846 out of bounds (limit=86, nb=2)) java.lang.RuntimeException(setDataSourceCallback failed: status = 0x80000000) java.lang.IndexOutOfBoundsException(index=-2023161846 out of bounds (limit=86, nb=2)) java.lang.RuntimeException(setDataSourceCallback failed: status = 0x80000000) java.lang.IndexOutOfBoundsException(index=-2023161846 out of bounds (limit=86, nb=2)) java.lang.RuntimeException(setDataSourceCallback failed: status = 0x80000000) call GlideException#logRootCauses(String) for more detail Cause (1 of 4): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{DirectByteBuffer->Drawable->Drawable} There were 2 root causes: java.lang.IndexOutOfBoundsException(index=-2023161846 out of bounds (limit=86, nb=2)) java.lang.RuntimeException(setDataSourceCallback failed: status = 0x80000000) call GlideException#logRootCauses(String) for more detail Cause (1 of 2): class java.lang.IndexOutOfBoundsException: index=-2023161846 out of bounds (limit=86, nb=2) Cause (2 of 2): class java.lang.RuntimeException: setDataSourceCallback failed: status = 0x80000000 Cause (2 of 4): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{DirectByteBuffer->GifDrawable->Drawable} Cause (3 of 4): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{DirectByteBuffer->Bitmap->BitmapDrawable} There were 2 root causes: java.lang.IndexOutOfBoundsException(index=-2023161846 out of bounds (limit=86, nb=2))
Is there no one handling the issue with Glide now?
class:DefaultImageHeaderParser int tagCount = segmentData.getInt16(firstIfdOffset);
private static final class RandomAccessReader {
short getInt16(int offset) {
return isAvailable(offset, 2) ? data.getShort(offset) : -1;
}
the code: data.getShort(offset) has exception:Method threw 'java.lang.IndexOutOfBoundsException' exception.
private int getOrientation(Reader reader, ArrayPool byteArrayPool) throws IOException { try { final int magicNumber = reader.getUInt16(); // .... } catch (Reader.EndOfFileException e) { // TODO(b/143917798): Re-enable this logging when dependent tests are fixed. // if (Log.isLoggable(TAG, Log.ERROR)) { // Log.e(TAG, "Unexpected EOF", e); // } return UNKNOWN_ORIENTATION; } }
modify Reader.EndOfFileException to Exception } catch (Exception e) {
can finish this issue
Can solve this problem. But packing aar is more troublesome. I have packed 3 aars here, namely libray, gif_decoder, and disklrucache.
implementation(name: 'glide-4.16.0-release', ext: 'aar')
implementation ("com.github.bumptech.glide:gifdecoder:4.16.0")
implementation ("com.github.bumptech.glide:disklrucache:4.16.0")
implementation ("com.github.bumptech.glide:annotations:4.16.0")
This is a recurring issue; I occasionally encounter certain phones that function properly while others do not. The status code is 0x80000000.
Loading images through Glide, this way of loading, linking https://i-blog.csdnimg.cn/direct/efed520f694b4f31aa30e236c7bfa0ed.jpeg Cannot load normally.
Specific code: // Glide.with(this) // .load(url) // .into(imageView); or // Glide.with(this) // .asBitmap() // .load(url) // .apply(requestOptions) // .into(new ImageViewTarget(imageView) {
// @Override
// protected void setResource(@Nullable Bitmap resource) {
// imageView.setImageBitmap(resource);
// }
// });
By querying the Android folder and glide cache, it can be confirmed that the image download is successful and can be previewed on the PC end. Moreover, images can also be loaded normally through BitmapFactory. decodeFile (filePath, options). Verified by the Picasso framework, it can be loaded normally. So, it can be concluded that the Glide framework encountered problems when parsing into a bitmap. Can you help to query and fix it?