-
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
Strictmode sometimes detects leaks on FileOutputStream #115
Comments
First of all, your configuration is equal to ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder( getApplicationContext() )
.memoryCacheExtraOptions( maxDimension, maxDimension ) // max width, max height
.discCacheExtraOptions( maxDimension, maxDimension, Bitmap.CompressFormat.JPEG, 75 )
.defaultDisplayImageOptions( options )
.offOutOfMemoryHandling()
.memoryCacheSize( cacheSize )
.discCache( new UnlimitedDiscCache( cacheDir ) )
.enableLogging()
.build(); and I think you can also delete About warning: it seems to be ma fault, I didn't close OutputStream after saving image to disc cache. I thought Bitmap.compress(...) do it but most likely I was mistaken. |
Hi Nostra, thanks for that config info, i didn't know all the default values so i just set about everything. Also thanks for the eventual fix that will be created. I've seem some other strictmode errors in other cases as well. I'll post my findings here as well. |
@nostra13 Here's a related strictmode stacktrace:
|
Hello, First of all, thank you for your amazing work. Your library is clearly my favorite one for image loading, I include it in nearly all my projects. I am currently using StrictMode in one of them. With version 1.9.1 of your library, the previous exception is still raised (after a FileNotFoundException):
These are my settings for UIL:
Temporarily, I will remove detectLeakedClosableObjects() from StrictMode. Thanks for your help. |
Hello, |
I also experience the StrictMode exception: A resource was acquired at attached stack trace but never released. See java.io.Closeable for information on avoiding resource |
Hi @nostra13 it seems to be a bug in okhttp / retrofit maybe you should update to the latest version. |
Hi,
first of all, big fan of the library! Works really well and was easy to integrate. But sometimes when an image is read from diskcache, strictmode throws a warning :
These are my settings for UIL :
The text was updated successfully, but these errors were encountered: