Categories

Tags

None

    Recent Comments

    java.lang.RuntimeException: Canvas: trying to use a recycled bitmap android.graphics.Bitmap

    Recently our two applications on Android Market kept reporting error “java.lang.RuntimeException: Canvas: trying to use a recycled bitmap android.graphics.Bitmap…”. If you look at the stack trace, there is no trace of our code. Below is one of the stack trace:

    java.lang.RuntimeException: Canvas: trying to use a recycled bitmap android.graphics.Bitmap@4478a900
    at android.graphics.Canvas.throwIfRecycled(Canvas.java:955)
    at android.graphics.Canvas.drawBitmap(Canvas.java:1044)
    at android.graphics.drawable.BitmapDrawable.draw(BitmapDrawable.java:323)
    at android.widget.ImageView.onDraw(ImageView.java:842)
    at android.view.View.draw(View.java:6740)
    at android.view.ViewRoot.draw(ViewRoot.java:1407)
    at android.view.ViewRoot.performTraversals(ViewRoot.java:1163)
    at android.view.ViewRoot.handleMessage(ViewRoot.java:1727)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:123)
    at android.app.ActivityThread.main(ActivityThread.java:4627)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:521)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
    at dalvik.system.NativeStart.main(Native Method)

     

    After searching around the Internet, I found some clues. It has something to do with the call of bitmap.recycle(). Some people suggest to remove all the calls to bitmap.recycle() and let the garbage collector to do the job. So I tried this solution and updated the Packing List application. I will give it a day or two to see if it settles the issue.

    October 25, 2010 22:50 by dotnetideas
    E-mail | Permalink | Comments (10) | Comment RSSRSS comment feed

    Comments

    January 11. 2011 15:20

    warren

    hi , i 've encounter this issue too .
    if i remove the code "bitmap.recycle".
    it 'll occur another problem ,which is "Out Of Memeory ".
    i 've been stuck in these problems for days.

    warren

    January 12. 2011 04:11

    Vincenzo Blare

    Whether a song is good or great, there will always be revisions. These are inevitable and changing your lyrics or melodies are just part of the process, so please understand that before we move forward. No criticism given is absent of constructiveness. Thank you for you recognition of this.

    Vincenzo Blare

    January 17. 2011 08:04

    Felisha Minderman

    All that's necessary to try and do is sing your songs… but alternatively you’re haning out finding musicians, negotiating contracts with studios, assembling artist packages, and also becoming doors slammed within your face by record labels that don’t take unsolicited materials.Stop being ignored and obtain noticed with aid from the winning team at WeShopSongs! Make the most of a vibrant association of music business professionals who have been organized to assist singers and songwriters achieve their goals. WSS removes the guesswork by hiring pre-qualified experts to produce the ideal product to meet your needs and budget.

    Felisha Minderman

    January 18. 2011 22:28

    Anjelica Jensvold

    My job is normally to concentrate on getting you your first or next placement. Did you know how difficult it is very to buy a placement? It doesn't happen overnight, many connections around have to be made in addition to a reputation established. I have worked through this business for Several years, I have built strong relationships we uses that will help move to step 2. A very important factor Let me get clear right away, We're very honest all of which will explain straight a few things i know to figure best. Here's one secret: START SELLING YOUR SONGS For some other ARTISTS.

    Anjelica Jensvold