-
Notifications
You must be signed in to change notification settings - Fork 6.1k
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
Image Loading Failure: Mark has been invalidated Error when load png file which is bigger than 5MB, without diskCache #4950
Labels
Comments
Teddyleee
changed the title
Mark has been invalidated Error when load png file which is bigger than 5MB, without diskCache
Image Loading Failure: Mark has been invalidated Error when load png file which is bigger than 5MB, without diskCache
Nov 8, 2022
Things that make this hard:
We could change either #1 or #2, but at the cost of less obvious failures. I'm inclined to think the best way to handle these images is to go through the disk cache. |
In our app this seems to happen even with a disk cache strategy of
This is on Glide 4.16.0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Glide Version:
4.14.2
Integration libraries:
com.github.bumptech.glide:Volley:4.14.2
Device/Android Version:
API 31
Issue details / Repro steps / Use case background:
It's similar issue with 4517 (#4517)
When you try to load 5MB png file(which size bigger than max buffer size in recycleablebufferedinputStream in Glide(5MB)) without Data Cache(Disk only cache resource), you fail load image
The cause of this problem is. when you try to get Orientation(in downsampler.java, 330 Line). it use ExifInterface and when ExifInterface Initialize, it read InputStream. And then the inputStream gets wrong.
before get Orientation, it can decode InputStream,
but It can't after ExifInterface read the inputStream.
If you use Data(not resource) Cache after fail all try to load image using inputStream, then it try to load image using file cached on disk(not using inputStream) So. it load image successfully. (In this case it doesn't use stream)
I think when the stream size is bigger than 5 MB it should return default Orientation -1(if it use ExifInterface)
The Error message is
The text was updated successfully, but these errors were encountered: