I cannot reproduce by myself, but I have a bunch of users having a fatal exception when last line "canvas.drawBitmap" gets called. What could be the problem? I checked your source code and couldn't find a place where you call bitmap.recycle().
This is the stacktrace:
Fatal Exception: java.lang.RuntimeException: Canvas: trying to use a recycled bitmap android.graphics.Bitmap@1bafec58
at android.graphics.Canvas.throwIfCannotDraw(Canvas.java:1225)
at android.view.GLES20Canvas.drawBitmap(GLES20Canvas.java:589)
at MyCustomConfetto.drawInternal(MyCustomConfetto.java:57)
at com.github.jinatonic.confetti.confetto.Confetto.getWidth(Confetto.java:342)
at com.github.jinatonic.confetti.confetto.Confetto.getWidth(Confetto.java:332)
at com.github.jinatonic.confetti.ConfettiView.onDraw(ConfettiView.java:132)
Hi,
I'm extending Confetto class to make my custom animation. This is all what I have:
I cannot reproduce by myself, but I have a bunch of users having a fatal exception when last line "canvas.drawBitmap" gets called. What could be the problem? I checked your source code and couldn't find a place where you call bitmap.recycle().
This is the stacktrace: