java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.graphics.Bitmap.isRecycled()' on a null object reference

GitHub | EMIN3M1986 | 4 months ago
tip
Do you find the tips below useful? Click on the to mark them and say thanks to rafael . Or join the community to write better ones.
  1. 0
    samebug tip
    Android has some problem with big images, so, probably, the image you're trying to use is too big for Canvas. You can either use Picasso or compress your image to reduce it's size (both pixel wise and filesize wise)
  2. 0

    WaveView on RecyclerView

    GitHub | 4 months ago | EMIN3M1986
    java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.graphics.Bitmap.isRecycled()' on a null object reference
  3. 0

    Using Line Chart In RecyclerView Error Paint.getNativeInstance()' on a null object reference

    GitHub | 7 months ago | sahilwebmazix
    java.lang.NullPointerException: Attempt to invoke virtual method 'long android.graphics.Paint.getNativeInstance()' on a null object reference.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Canvas: trying to use a recycled bitmap

    GitHub | 10 months ago | pauliktamas
    java.lang.RuntimeException: Canvas: trying to use a recycled bitmap android.graphics.Bitmap@342ab43
  6. 0

    GitHub comment 483#109388839

    GitHub | 2 years ago | Tolriq
    java.lang.Exception: OnDraw error on image id : 0x7F10015D at xxxx.ui.view.SecuredImageView.onDraw(SecuredImageView.java:37)

    3 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NullPointerException

      Attempt to invoke virtual method 'boolean android.graphics.Bitmap.isRecycled()' on a null object reference

      at android.graphics.Canvas.throwIfCannotDraw()
    2. Android Platform
      Canvas.drawBitmap
      1. android.graphics.Canvas.throwIfCannotDraw(Canvas.java:1269)
      2. android.graphics.Canvas.drawBitmap(Canvas.java:1325)
      2 frames
    3. rm.com.audiowave
      AudioWaveView.onDraw
      1. rm.com.audiowave.AudioWaveView.onDraw(AudioWaveView.kt:132)
      1 frame
    4. Android Platform
      ViewGroup.drawChild
      1. android.view.View.draw(View.java:16302)
      2. android.view.View.updateDisplayListIfDirty(View.java:15284)
      3. android.view.View.draw(View.java:16072)
      4. android.view.ViewGroup.drawChild(ViewGroup.java:3622)
      5. android.view.ViewGroup.dispatchDraw(ViewGroup.java:3409)
      6. android.view.View.updateDisplayListIfDirty(View.java:15279)
      7. android.view.View.draw(View.java:16072)
      8. android.view.ViewGroup.drawChild(ViewGroup.java:3622)
      9. android.view.ViewGroup.dispatchDraw(ViewGroup.java:3409)
      10. android.view.View.draw(View.java:16305)
      11. android.view.View.updateDisplayListIfDirty(View.java:15284)
      12. android.view.View.draw(View.java:16072)
      13. android.view.ViewGroup.drawChild(ViewGroup.java:3622)
      14. android.view.ViewGroup.dispatchDraw(ViewGroup.java:3409)
      15. android.view.View.draw(View.java:16305)
      16. android.view.View.updateDisplayListIfDirty(View.java:15284)
      17. android.view.View.draw(View.java:16072)
      18. android.view.ViewGroup.drawChild(ViewGroup.java:3622)
      19. android.view.ViewGroup.dispatchDraw(ViewGroup.java:3409)
      20. android.view.View.updateDisplayListIfDirty(View.java:15279)
      21. android.view.View.draw(View.java:16072)
      22. android.view.ViewGroup.drawChild(ViewGroup.java:3622)
      22 frames
    5. Android v7
      RecyclerView.drawChild
      1. android.support.v7.widget.RecyclerView.drawChild(RecyclerView.java:4400)
      1 frame
    6. Android Platform
      View.draw
      1. android.view.ViewGroup.dispatchDraw(ViewGroup.java:3409)
      2. android.view.View.draw(View.java:16305)
      2 frames
    7. Android v7
      RecyclerView.draw
      1. android.support.v7.widget.RecyclerView.draw(RecyclerView.java:3792)
      1 frame
    8. Android Platform
      View.draw
      1. android.view.View.updateDisplayListIfDirty(View.java:15284)
      2. android.view.View.draw(View.java:16072)
      3. android.view.ViewGroup.drawChild(ViewGroup.java:3622)
      4. android.view.ViewGroup.dispatchDraw(ViewGroup.java:3409)
      5. android.view.View.updateDisplayListIfDirty(View.java:15279)
      6. android.view.View.draw(View.java:16072)
      7. android.view.ViewGroup.drawChild(ViewGroup.java:3622)
      8. android.view.ViewGroup.dispatchDraw(ViewGroup.java:3409)
      9. android.view.View.updateDisplayListIfDirty(View.java:15279)
      10. android.view.View.draw(View.java:16072)
      11. android.view.ViewGroup.drawChild(ViewGroup.java:3622)
      12. android.view.ViewGroup.dispatchDraw(ViewGroup.java:3409)
      13. android.view.View.draw(View.java:16305)
      14. android.view.View.updateDisplayListIfDirty(View.java:15284)
      15. android.view.View.draw(View.java:16072)
      16. android.view.ViewGroup.drawChild(ViewGroup.java:3622)
      17. android.view.ViewGroup.dispatchDraw(ViewGroup.java:3409)
      18. android.view.View.updateDisplayListIfDirty(View.java:15279)
      19. android.view.View.draw(View.java:16072)
      20. android.view.ViewGroup.drawChild(ViewGroup.java:3622)
      21. android.view.ViewGroup.dispatchDraw(ViewGroup.java:3409)
      22. android.view.View.updateDisplayListIfDirty(View.java:15279)
      23. android.view.View.draw(View.java:16072)
      24. android.view.ViewGroup.drawChild(ViewGroup.java:3622)
      25. android.view.ViewGroup.dispatchDraw(ViewGroup.java:3409)
      26. android.view.View.updateDisplayListIfDirty(View.java:15279)
      27. android.view.View.draw(View.java:16072)
      28. android.view.ViewGroup.drawChild(ViewGroup.java:3622)
      29. android.view.ViewGroup.dispatchDraw(ViewGroup.java:3409)
      30. android.view.View.updateDisplayListIfDirty(View.java:15279)
      31. android.view.View.draw(View.java:16072)
      32. android.view.ViewGroup.drawChild(ViewGroup.java:3622)
      33. android.view.ViewGroup.dispatchDraw(ViewGroup.java:3409)
      34. android.view.View.updateDisplayListIfDirty(View.java:15279)
      35. android.view.View.draw(View.java:16072)
      36. android.view.ViewGroup.drawChild(ViewGroup.java:3622)
      37. android.view.ViewGroup.dispatchDraw(ViewGroup.java:3409)
      38. android.view.View.updateDisplayListIfDirty(View.java:15279)
      39. android.view.View.draw(View.java:16072)
      39 frames