Failure to render image: RecyclableBufferedInputStream$InvalidMarkException
- Dominant language
- Java
- Stars
- 35k
- Forks
- 6.2k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 8
Description
Hi there! Over at Signal a user reported [an issue](https://github.com/signalapp/Signal-Android/issues/11074) around being unable to render a specific image. Sure enough the problem seems to be completely reproducible with that image.
I made a POC app to verify it wasn't anything Signal was doing:
https://github.com/greyson-signal/glide-failure-poc
The POC shows Glide loading a working image and also failing to load the image from the issue.
Thanks!
**Glide Version**:
4.12.0
**Integration libraries**:
None
**Device/Android Version**:
Android 10 emulator, my Android 11 Pixel 5. In general seems to be a universal issue.
**Issue details / Repro steps / Use case background**:
Image fails to load, but renders in a web browser and can otherwise be opened in desktop image programs.
**Glide load line / `GlideModule` (if any) / list Adapter code (if any)**:
See POC
**Layout XML**:
See POC
**Stack trace / LogCat**:
```java
2021-03-08 10:39:48.113 18969-18969/com.greysonparrelli.glideimagefailure W/Glide: Load failed for [B@1ea6a87 with size [1080x825]
class com.bumptech.glide.load.engine.GlideException: Failed to load resource
There were 6 root causes:
com.bumptech.glide.load.resource.bitmap.RecyclableBufferedInputStream$InvalidMarkException(Mark has been invalidated, pos: 288768 markLimit: 5242880)
java.lang.RuntimeException(setDataSourceCallback failed: status = 0x80000000)
com.bumptech.glide.load.resource.bitmap.RecyclableBufferedInputStream$InvalidMarkException(Mark has been invalidated, pos: 288768 markLimit: 5242880)
java.lang.RuntimeException(setDataSourceCallback failed: status = 0x80000000)
com.bumptech.glide.load.resource.bitmap.RecyclableBufferedInputStream$InvalidMarkException(Mark has been invalidated, pos: 288768 markLimit: 5242880)
com.bumptech.glide.load.resource.bitmap.RecyclableBufferedInputStream$InvalidMarkException(Mark has been invalidated, pos: 2460412 markLimit: 5242880)
call GlideException#logRootCauses(String) for more detail
Cause (1 of 2): class com.bumptech.glide.load.engine.GlideException: Failed LoadPath{HeapByteBuffer->Object->Drawable}, LOCAL
There were 4 root causes:
com.bumptech.glide.load.resource.bitmap.RecyclableBufferedInputStream$InvalidMarkException(Mark has been invalidated, pos: 288768 markLimit: 5242880)
java.lang.RuntimeException(setDataSourceCallback failed: status = 0x80000000)
com.bumptech.glide.load.resource.bitmap.RecyclableBufferedInputStream$InvalidMarkException(Mark has been invalidated, pos: 288768 markLimit: 5242880)
java.lang.RuntimeException(setDataSourceCallback failed: status = 0x80000000)
call GlideException#logRootCauses(String) for more detail
Cause (1 of 3): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{HeapByteBuffer->GifDrawable->Drawable}
Cause (2 of 3): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{HeapByteBuffer->Bitmap->Drawable}
There were 2 root causes:
com.bumptech.glide.load.resource.bitmap.RecyclableBufferedInputStream$InvalidMarkException(Mark has been invalidated, pos: 288768 markLimit: 5242880)
java.lang.RuntimeException(setDataSourceCallback failed: status = 0x80000000)
call GlideException#logRootCauses(String) for more detail
Cause (1 of 2): class com.bumptech.glide.load.resource.bitmap.RecyclableBufferedInputStream$InvalidMarkException: Mark has been invalidated, pos: 288768 markLimit: 5242880
Cause (2 of 2): class java.lang.RuntimeException: setDataSourceCallback failed: status = 0x80000000
Cause (3 of 3): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{HeapByteBuffer->BitmapDrawable->Drawable}
There were 2 root causes:
com.bumptech.glide.load.resource.bitmap.RecyclableBufferedInputStream$InvalidMarkException(Mark has been invalidated, pos: 288768 markLimit: 5242880)
java.lang.RuntimeException(setDataSourceCallback failed: status = 0x80000000)
call GlideException#logRootCauses(String) for more detail
Cause (1 of 2): class com.bumptech.glide.load.resource.bitmap.RecyclableBufferedInputStream$InvalidMarkException: Mark has been invalidated, pos: 288768 markLimit: 5242880
Cause (2 of 2): class java.lang.RuntimeException: setDataSourceCallback failed: status = 0x80000000
Cause (2 of 2): class com.bumptech.glide.load.engine.GlideException: Failed LoadPath{ByteArrayInputStream->Object->Drawable}, LOCAL
There were 2 root causes:
com.bumptech.glide.load.resource.bitmap.RecyclableBufferedInputStream$InvalidMarkException(Mark has been invalidated, pos: 288768 markLimit: 5242880)
com.bumptech.glide.load.resource.bitmap.RecyclableBufferedInputStream$InvalidMarkException(Mark has been invalidated, pos: 2460412 markLimit: 5242880)
call GlideException#logRootCauses(String) for more detail
Cause (1 of 3): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{ByteArrayInputStream->GifDrawable->Drawable}
Cause (2 of 3): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{ByteArrayInputStream->Bitmap->Drawable}
There was 1 root cause:
2021-03-08 10:39:48.113 18969-18969/com.greysonparrelli.glideimagefailure W/Glide: com.bumptech.glide.load.resource.bitmap.RecyclableBufferedInputStream$InvalidMarkException(Mark has been invalidated, pos: 288768 markLimit: 5242880)
call GlideException#logRootCauses(String) for more detail
Cause (1 of 1): class com.bumptech.glide.load.resource.bitmap.RecyclableBufferedInputStream$InvalidMarkException: Mark has been invalidated, pos: 288768 markLimit: 5242880
Cause (3 of 3): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{ByteArrayInputStream->BitmapDrawable->Drawable}
There was 1 root cause:
com.bumptech.glide.load.resource.bitmap.RecyclableBufferedInputStream$InvalidMarkException(Mark has been invalidated, pos: 2460412 markLimit: 5242880)
call GlideException#logRootCauses(String) for more detail
Cause (1 of 1): class com.bumptech.glide.load.resource.bitmap.RecyclableBufferedInputStream$InvalidMarkException: Mark has been invalidated, pos: 2460412 markLimit: 5242880
```
Contributor guide
Assessment
This issue has not been assessed yet.