Skip to content
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

Fatal Exception: java.lang.NullPointerException #29

Open
TonyHaddad91 opened this issue Apr 3, 2016 · 1 comment
Open

Fatal Exception: java.lang.NullPointerException #29

TonyHaddad91 opened this issue Apr 3, 2016 · 1 comment

Comments

@TonyHaddad91
Copy link

Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.graphics.Bitmap.isRecycled()' on a null object reference
at android.graphics.Canvas.throwIfCannotDraw(Canvas.java:1302)
at android.graphics.Canvas.drawBitmap(Canvas.java:1358)
at jp.wasabeef.blurry.internal.Blur.rs(Blur.java:60)
at jp.wasabeef.blurry.internal.BlurTask$1.run(BlurTask.java:60)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)

@Ariel4Android
Copy link

The same issue happened on some 3rd customized Android OS within my depolyed app.
I tried to modify code BlurTask.java, frome line 60 like this

` Context context = contextWeakRef.get();
if (context != null) {

      final BitmapDrawable bitmapDrawable =
              new BitmapDrawable(res, Blur.of(context, capture, factor));

      if (callback != null) {
        new Handler(Looper.getMainLooper()).post(new Runnable() {
          @Override public void run() {
            callback.done(bitmapDrawable);
          }
        });
      }
    }`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants