question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Canvas: trying to use a recycled bitmap

See original GitHub issue

Hi, i’m using SupportBlurDialogFragment and sometimes i got exception (probably when user rotate device):

FATAL EXCEPTION: AsyncTask #1
java.lang.RuntimeException: An error occured while executing doInBackground()
    at android.os.AsyncTask$3.done(AsyncTask.java:300)
    at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355)
    at java.util.concurrent.FutureTask.setException(FutureTask.java:222)
    at java.util.concurrent.FutureTask.run(FutureTask.java:242)
    at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
    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:841)
 Caused by: java.lang.RuntimeException: Canvas: trying to use a recycled bitmap android.graphics.Bitmap@420c9438
    at android.graphics.Canvas.throwIfCannotDraw(Canvas.java:1084)
    at android.graphics.Canvas.drawBitmap(Canvas.java:1170)
    at fr.tvbarthel.lib.blurdialogfragment.BlurDialogEngine.blur(BlurDialogEngine.java:390)
    at fr.tvbarthel.lib.blurdialogfragment.BlurDialogEngine.access$300(BlurDialogEngine.java:41)
    at fr.tvbarthel.lib.blurdialogfragment.BlurDialogEngine$BlurAsyncTask.doInBackground(BlurDialogEngine.java:567)
    at fr.tvbarthel.lib.blurdialogfragment.BlurDialogEngine$BlurAsyncTask.doInBackground(BlurDialogEngine.java:524)
    at android.os.AsyncTask$2.call(AsyncTask.java:288)

Issue Analytics

  • State:open
  • Created 8 years ago
  • Reactions:6
  • Comments:27 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
fabrizioguelicommented, Jun 5, 2017

@vbarthel-fr Any news about this issue?

Thx

0reactions
jonashoccommented, Jan 30, 2020

Still no fix for this? Does anyone know of another library that works like this, but does not crash and is consistently updated?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Canvas: trying to use a recycled bitmap android.graphics ...
I tried to recycle a bitmap in onPause like this: ... After returning back i got the exception: Canvas: trying to use a...
Read more >
'Canvas: trying to use a recycled bitmap android.graphics ...
Java.Lang.RuntimeException: 'Canvas: trying to use a recycled bitmap android.graphics.Bitmap@3fd875' #9007.
Read more >
bitmap.recycle(); problem in Android 4.1 onwards devices ...
I used bitmap recycle method in my project; it is working perfectly until Android 4.0 devices. But Android 4.1 onwards mobiles have following...
Read more >
java.lang.RuntimeException: Canvas: trying to use a recycled ...
RuntimeException: Canvas: trying to use a recycled bitmap android.graphics.Bitmap@41371280 at android.graphics.Canvas.throwIfRecycled(Canvas.java:1038) at ...
Read more >
Android : Canvas: trying to use a recycled bitmap ... - YouTube
Android : Canvas : trying to use a recycled bitmap android.graphics.Bitmap in Android [ Beautify Your Computer ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found