-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
BlurTransformation leak? #120
Comments
Thank you for your report. |
@wasabeef Hi, thanks for the quick response. v3.2.0 resolves the issue. While I was looking into this, I discovered that the issue is also resolved by using the RenderScript support library instead of the one packaged on the device: import android.support.v8.renderscript.Allocation;
import android.support.v8.renderscript.BaseObj;
import android.support.v8.renderscript.Element;
import android.support.v8.renderscript.RSRuntimeException;
import android.support.v8.renderscript.RenderScript;
import android.support.v8.renderscript.ScriptIntrinsicBlur; It seems that the RenderScript implementation packaged on the NVIDIA SHIELD TV is not working correctly. However, since the support library version does appear to work, I'd prefer to use it instead of To that end, I've written modified versions of Let me know if you'd be open to a pull request with these new classes. I can understand if your decision for this library is to remove RenderScript entirely; in that case, I can come up with my own solution. Thanks! |
Before, I used the Support v8 RenderScript 817b138 But Your |
I've opened a pr with the SupportBlurTransformation: #125 Closing since this is resolved in the latest |
Device: NVIDIA SHIELD TV
Android: 7.0
Hi, @wasabeef, I've been using glide-transformations (v2.0.2) along with Glide (v3.7.0) for quite some time with no issues. Thanks for taking the time to open source this, its been great so far.
I recently upgraded to the latest Glide (4.6.1), and glide-transformations (v3.1.1) and I'm seeing what appears to be a native memory leak. It's a bit strange though; the app never crashes with OutOfMemory, and the resource monitor shows that memory use does not appear to be growing continuously (these are the "typical" numbers: java: 70-90MB, native: 15-20MB, graphic: 60-80MB).
My app uses BlurTransformation quite frequently as the user navigates. Its not uncommon for an extended user session to result in dozens of blur calls (note: only a single blurred image is ever displayed).
After ~50 uses of the BlurTransformation, I start seeing a tonne of blocking GC NativeAllocs in the logs:
This causes the app performance to degrade to the point where its basically unusable (however, it doesn't crash with OOM, just takes a very long time to make new allocations).
At first, I had a really hard time pinning it down. After googling a bit, I found this issue: #111, which prompted me to try disabling the blur effect, which made the problem go away.
It's still possible in my mind that this isn't related to
glide-transformations
at all, but I'd like your input. It looks to me like this may actually be a RenderScript bug.Here's how I'm using the transformation:
Please let me know if I've omitted any important information, or if there are any additional tests I could do to track this down.
Cheers.
The text was updated successfully, but these errors were encountered: