-
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
ImageResizer requires two InputStreams #2
Labels
Comments
Fixed in one_input_stream branch |
Closed
This was referenced Apr 14, 2015
This was referenced Nov 20, 2017
Closed
SZn007
referenced
this issue
Apr 29, 2019
Engine acquires it's lock, then the EngineResource lock when it loads resources from cache or active resources. EngineResource acquires its lock, then the EngineLock, when a resource is cleared. This conflicting lock order leads to deadlock. The fix is similar to the fix applied in ActiveResources. We always make sure that the Engine (listener) lock is acquired before the EngineResource lock. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=233861929
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This hasn't been a problem for us internally since we typically are loading images from files and so only have to open a second InputStream. It is however a more substantial problem for users who might want to load images via http where two separate calls would be required.
We originally required two InputStreams because using mark and reset on a BufferedInputStream to determine the size would occasionally throw a "Mark has been invalidated" IOException.
Having determined the reason why occurred so frequently (see https://code.google.com/p/android/issues/detail?id=57578&q=BitmapFactory&colspec=ID%20Type%20Status%20Owner%20Summary%20Stars and), we should be able to revert back to using a single InputStream.
The text was updated successfully, but these errors were encountered: