Blurry
Blurry copied to clipboard
Out of Memory Crash Issue: java.lang.OutOfMemoryError: Failed to allocate a 12 byte allocation with 0 free bytes and 3GB until OOM
Hi, Just want to ask for help if you know why this crash occured and if there is a fix about it. Note that it does not always happen on the app. Stack Trace:
java.lang.OutOfMemoryError: Failed to allocate a 12 byte allocation with 0 free bytes and 3GB until OOM
at jp.wasabeef.blurry.internal.BlurTask.execute(BlurTask.java:66)
at jp.wasabeef.blurry.Blurry$ImageComposer.into(Blurry.java:207)
Code:
final View rootView = findViewById(R.id.layout_home_view);
mBlurBackground.postDelayed(new Runnable() {
@Override
public void run() {
Blurry.with(MyActivity.this)
.radius(10)
.sampling(8)
.color(Color.argb(180, 0, 0, 0))
.async()
.animate(500)
.capture(rootView)
.into(mBlurBackground);
isBlurred = true;
}
}, 1000);
where rootView has a background image size of approx 115.43kb
Happened in OS: Android 5.1.1 Device: SAMSUNG-SM-G900A
Appreciate your help!
Thanks, Hannah
We see the same on devices:
- TECNO F2 (1 GB RAM, Android 7.0)
- Infinix HOT 4 Lite (1 GB RAM, Android 6.0)
It looks as if Blurry lib had a memory leak?
I am getting the same issue in Mostly in Android 5 Devices,
Fatal Exception: java.lang.OutOfMemoryError: Failed to allocate a 4000012 byte allocation with 1691254 free bytes and 1651KB until OOM at dalvik.system.VMRuntime.newNonMovableArray(VMRuntime.java) at android.graphics.Bitmap.nativeCreate(Bitmap.java) at android.graphics.Bitmap.createBitmap(Bitmap.java:812) at android.graphics.Bitmap.createBitmap(Bitmap.java:789) at android.graphics.Bitmap.createBitmap(Bitmap.java:720) at android.graphics.Bitmap.createScaledBitmap(Bitmap.java:596) at jp.wasabeef.blurry.Blur.of(Blur.java:72) at jp.wasabeef.blurry.BlurTask$1$1.run(BlurTask.java:69) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5333) at java.lang.reflect.Method.invoke(Method.java) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:940) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:735)