-
Notifications
You must be signed in to change notification settings - Fork 6.1k
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
Canvas: trying to use a recycled bitmap android.graphics.Bitmap@22558fc #3299
Comments
This issue has been automatically marked as stale because it has not had activity in the last seven days. It will be closed if no further activity occurs within the next seven days. Thank you for your contributions. |
我用的glide-3.6.1.jar,是有这样的问题,估计代码中大量调用了Bitmap.recycle()方法: // CRASH: com.android.gallery (pid 6661) 01-17 02:02:15.113 6661 6661 D BitmapTAG: Object tried to call recycle,this=android.graphics.Bitmap@6847648 |
Fatal Exception: java.lang.RuntimeException: Canvas: trying to use a recycled bitmap android.graphics.Bitmap@22558fc
at android.graphics.Canvas.throwIfCannotDraw(Canvas.java:1225)
at android.view.GLES20Canvas.drawBitmap(GLES20Canvas.java:600)
at android.graphics.drawable.BitmapDrawable.draw(BitmapDrawable.java:537)
at android.widget.ImageView.onDraw(ImageView.java:1148)
at android.view.View.draw(View.java:15380)
at android.view.View.updateDisplayListIfDirty(View.java:14270)
at android.view.View.getDisplayList(View.java:14300)
at android.view.View.draw(View.java:15085)
at android.view.ViewGroup.drawChild(ViewGroup.java:3535)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3329)
at android.view.View.updateDisplayListIfDirty(View.java:14262)
at android.view.View.getDisplayList(View.java:14300)
at android.view.View.draw(View.java:15085)
at android.view.ViewGroup.drawChild(ViewGroup.java:3535)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3329)
at android.view.View.draw(View.java:15392)
at android.view.View.updateDisplayListIfDirty(View.java:14270)
at android.view.View.getDisplayList(View.java:14300)
at android.view.View.draw(View.java:15085)
at android.view.ViewGroup.drawChild(ViewGroup.java:3535)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3329)
at android.view.View.updateDisplayListIfDirty(View.java:14262)
at android.view.View.getDisplayList(View.java:14300)
at android.view.View.draw(View.java:15085)
at android.view.ViewGroup.drawChild(ViewGroup.java:3535)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3329)
at android.view.View.updateDisplayListIfDirty(View.java:14262)
at android.view.View.getDisplayList(View.java:14300)
at android.view.View.draw(View.java:15085)
at android.view.ViewGroup.drawChild(ViewGroup.java:3535)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3329)
at android.view.View.draw(View.java:15392)
at android.view.View.updateDisplayListIfDirty(View.java:14270)
at android.view.View.getDisplayList(View.java:14300)
at android.view.View.draw(View.java:15085)
at android.view.ViewGroup.drawChild(ViewGroup.java:3535)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3329)
at android.view.View.updateDisplayListIfDirty(View.java:14262)
at android.view.View.getDisplayList(View.java:14300)
at android.view.View.draw(View.java:15085)
at android.view.ViewGroup.drawChild(ViewGroup.java:3535)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3329)
at android.view.View.updateDisplayListIfDirty(View.java:14262)
at android.view.View.getDisplayList(View.java:14300)
at android.view.View.draw(View.java:15085)
at android.view.ViewGroup.drawChild(ViewGroup.java:3535)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3329)
at android.view.View.updateDisplayListIfDirty(View.java:14262)
at android.view.View.getDisplayList(View.java:14300)
at android.view.View.draw(View.java:15085)
at android.view.ViewGroup.drawChild(ViewGroup.java:3535)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3329)
at android.view.View.updateDisplayListIfDirty(View.java:14262)
at android.view.View.getDisplayList(View.java:14300)
at android.view.View.draw(View.java:15085)
at android.view.ViewGroup.drawChild(ViewGroup.java:3535)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3329)
at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchDraw(PhoneWindow.java:2700)
at android.view.View.draw(View.java:15392)
at android.widget.FrameLayout.draw(FrameLayout.java:652)
at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:2679)
at android.view.View.updateDisplayListIfDirty(View.java:14270)
at android.view.View.getDisplayList(View.java:14300)
at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:272)
at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:278)
at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:313)
at android.view.ViewRootImpl.draw(ViewRootImpl.java:2909)
at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2743)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2358)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1290)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6520)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:821)
at android.view.Choreographer.doCallbacks(Choreographer.java:624)
at android.view.Choreographer.doFrame(Choreographer.java:593)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:807)
at android.os.Handler.handleCallback(Handler.java:815)
at android.os.Handler.dispatchMessage(Handler.java:104)
at android.os.Looper.loop(Looper.java:194)
at android.app.ActivityThread.main(ActivityThread.java:5562)
at java.lang.reflect.Method.invoke(Method.java)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:968)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:763)
#0. Crashed: main
at android.graphics.Canvas.throwIfCannotDraw(Canvas.java:1225)
at android.view.GLES20Canvas.drawBitmap(GLES20Canvas.java:600)
at android.graphics.drawable.BitmapDrawable.draw(BitmapDrawable.java:537)
at android.widget.ImageView.onDraw(ImageView.java:1148)
at android.view.View.draw(View.java:15380)
at android.view.View.updateDisplayListIfDirty(View.java:14270)
at android.view.View.getDisplayList(View.java:14300)
at android.view.View.draw(View.java:15085)
at android.view.ViewGroup.drawChild(ViewGroup.java:3535)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3329)
at android.view.View.updateDisplayListIfDirty(View.java:14262)
at android.view.View.getDisplayList(View.java:14300)
at android.view.View.draw(View.java:15085)
at android.view.ViewGroup.drawChild(ViewGroup.java:3535)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3329)
at android.view.View.draw(View.java:15392)
at android.view.View.updateDisplayListIfDirty(View.java:14270)
at android.view.View.getDisplayList(View.java:14300)
at android.view.View.draw(View.java:15085)
at android.view.ViewGroup.drawChild(ViewGroup.java:3535)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3329)
at android.view.View.updateDisplayListIfDirty(View.java:14262)
at android.view.View.getDisplayList(View.java:14300)
at android.view.View.draw(View.java:15085)
at android.view.ViewGroup.drawChild(ViewGroup.java:3535)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3329)
at android.view.View.updateDisplayListIfDirty(View.java:14262)
at android.view.View.getDisplayList(View.java:14300)
at android.view.View.draw(View.java:15085)
at android.view.ViewGroup.drawChild(ViewGroup.java:3535)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3329)
at android.view.View.draw(View.java:15392)
at android.view.View.updateDisplayListIfDirty(View.java:14270)
at android.view.View.getDisplayList(View.java:14300)
at android.view.View.draw(View.java:15085)
at android.view.ViewGroup.drawChild(ViewGroup.java:3535)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3329)
at android.view.View.updateDisplayListIfDirty(View.java:14262)
at android.view.View.getDisplayList(View.java:14300)
at android.view.View.draw(View.java:15085)
at android.view.ViewGroup.drawChild(ViewGroup.java:3535)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3329)
at android.view.View.updateDisplayListIfDirty(View.java:14262)
at android.view.View.getDisplayList(View.java:14300)
at android.view.View.draw(View.java:15085)
at android.view.ViewGroup.drawChild(ViewGroup.java:3535)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3329)
at android.view.View.updateDisplayListIfDirty(View.java:14262)
at android.view.View.getDisplayList(View.java:14300)
at android.view.View.draw(View.java:15085)
at android.view.ViewGroup.drawChild(ViewGroup.java:3535)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3329)
at android.view.View.updateDisplayListIfDirty(View.java:14262)
at android.view.View.getDisplayList(View.java:14300)
at android.view.View.draw(View.java:15085)
at android.view.ViewGroup.drawChild(ViewGroup.java:3535)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3329)
at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchDraw(PhoneWindow.java:2700)
at android.view.View.draw(View.java:15392)
at android.widget.FrameLayout.draw(FrameLayout.java:652)
at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:2679)
at android.view.View.updateDisplayListIfDirty(View.java:14270)
at android.view.View.getDisplayList(View.java:14300)
at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:272)
at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:278)
at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:313)
at android.view.ViewRootImpl.draw(ViewRootImpl.java:2909)
at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2743)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2358)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1290)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6520)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:821)
at android.view.Choreographer.doCallbacks(Choreographer.java:624)
at android.view.Choreographer.doFrame(Choreographer.java:593)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:807)
at android.os.Handler.handleCallback(Handler.java:815)
at android.os.Handler.dispatchMessage(Handler.java:104)
at android.os.Looper.loop(Looper.java:194)
at android.app.ActivityThread.main(ActivityThread.java:5562)
at java.lang.reflect.Method.invoke(Method.java)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:968)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:763)
I Got this Issue through Crashlytics searching a lot but did not find any satisfactory solution.
The text was updated successfully, but these errors were encountered: