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

Saving Background bitmap with drawn paint causes the app to crash? #16

Open
imsocb opened this issue Dec 21, 2016 · 1 comment
Open

Comments

@imsocb
Copy link

imsocb commented Dec 21, 2016

Hi Chris, Sorry to bother you did not know have you read my previous post to you in another thread here #6. Anyway, have been getting weird errors (double paint on the canvas and crashing the app) occurring when i press the save button that runs this code drawableView.obtainBitmap(bitmap); where i want to save the drawn paint together with the background image. Rather a newbie in android please tell me how I can solve this problem? Thank You

 java.lang.RuntimeException: Canvas: trying to use a recycled bitmap android.graphics.Bitmap@c6e04c3
                                                                                               at android.graphics.Canvas.throwIfCannotDraw(Canvas.java:1270)
                                                                                               at android.graphics.Canvas.drawBitmap(Canvas.java:1404)
                                                                                               at android.graphics.drawable.BitmapDrawable.draw(BitmapDrawable.java:544)
                                                                                               at android.view.View.getDrawableRenderNode(View.java:16513)
                                                                                               at android.view.View.drawBackground(View.java:16449)
                                                                                               at android.view.View.draw(View.java:16261)
@PaNaVTEC
Copy link
Owner

can you provide a sample project with the bug? Happy to take a look

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