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

连续使用 autoRefresh() 方法刷新列表,会闪退 #1563

Open
tiansuo opened this issue Apr 18, 2024 · 1 comment
Open

连续使用 autoRefresh() 方法刷新列表,会闪退 #1563

tiansuo opened this issue Apr 18, 2024 · 1 comment

Comments

@tiansuo
Copy link

tiansuo commented Apr 18, 2024

错误代码:

java.lang.RuntimeException: Canvas: trying to use a recycled bitmap android.graphics.Bitmap@2a50f92 at android.graphics.BaseCanvas.throwIfCannotDraw(BaseCanvas.java:74) at android.graphics.MiuiCanvas.throwIfCannotDraw(MiuiCanvas.java:358) at android.graphics.RecordingCanvas.throwIfCannotDraw(RecordingCanvas.java:263) at android.graphics.BaseRecordingCanvas.drawBitmap(BaseRecordingCanvas.java:94) at android.graphics.drawable.BitmapDrawable.draw(BitmapDrawable.java:549) at android.widget.ImageView.onDraw(ImageView.java:1462) at android.view.View.draw(View.java:23019) at android.view.View.updateDisplayListIfDirty(View.java:21887) at android.view.View.draw(View.java:22745) at android.view.ViewGroup.drawChild(ViewGroup.java:4542) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4300) at android.view.View.updateDisplayListIfDirty(View.java:21878) at android.view.View.draw(View.java:22745) at android.view.ViewGroup.drawChild(ViewGroup.java:4542) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4300) at android.view.View.updateDisplayListIfDirty(View.java:21878) at android.view.View.draw(View.java:22745) at android.view.ViewGroup.drawChild(ViewGroup.java:4542) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4300) at android.view.View.draw(View.java:23023) at android.view.View.updateDisplayListIfDirty(View.java:21887) at android.view.View.draw(View.java:22745) at android.view.ViewGroup.drawChild(ViewGroup.java:4542) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4300) at android.view.View.updateDisplayListIfDirty(View.java:21878) at android.view.View.draw(View.java:22745) at android.view.ViewGroup.drawChild(ViewGroup.java:4542) at androidx.recyclerview.widget.RecyclerView.drawChild(RecyclerView.java:5204) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4300) at android.view.View.draw(View.java:23023) at androidx.recyclerview.widget.RecyclerView.draw(RecyclerView.java:4603) at android.view.View.updateDisplayListIfDirty(View.java:21887) at android.view.View.draw(View.java:22745) at android.view.ViewGroup.drawChild(ViewGroup.java:4542) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4300) at android.view.View.updateDisplayListIfDirty(View.java:21878) at android.view.View.draw(View.java:22745) at android.view.ViewGroup.drawChild(ViewGroup.java:4542) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4300) at android.view.View.updateDisplayListIfDirty(View.java:21878) at android.view.View.draw(View.java:22745) at android.view.ViewGroup.drawChild(ViewGroup.java:4542) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4300) at android.view.View.updateDisplayListIfDirty(View.java:21878) at android.view.View.draw(View.java:22745) at android.view.ViewGroup.drawChild(ViewGroup.java:4542) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4300) at android.view.View.updateDisplayListIfDirty(View.java:21878) at android.view.View.draw(View.java:22745) at android.view.ViewGroup.drawChild(ViewGroup.java:4542) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4300) at android.view.View.updateDisplayListIfDirty(View.java:21878) at android.view.View.draw(View.java:22745) at android.view.ViewGroup.drawChild(ViewGroup.java:4542) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4300) at android.view.View.updateDisplayListIfDirty(View.java:21878) at android.view.View.draw(View.java:22745) at android.view.ViewGroup.drawChild(ViewGroup.java:4542) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4300) at android.view.View.draw(View.java:23023) at com.android.internal.policy.DecorView.draw(DecorView.java:888) at android.view.View.updateDisplayListIfDirty(View.java:21887) at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:534) at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:542) at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:625) at android.view.ViewRootImpl.draw(ViewRootImpl.java:4660) 2024-04-18 17:40:48.516 29304-29304 CrashReport com.virtual.ailover E at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:4378) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:3489) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:2280) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:9026) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1144) at android.view.Choreographer.doCallbacks(Choreographer.java:948) at android.view.Choreographer.doFrame(Choreographer.java:877) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1129) at android.os.Handler.handleCallback(Handler.java:938) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loopOnce(Looper.java:210) at android.os.Looper.loop(Looper.java:299) at android.app.ActivityThread.main(ActivityThread.java:8337) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:556) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1037)

@tiansuo
Copy link
Author

tiansuo commented Apr 18, 2024

加了延迟就好了,不会闪退了,autoRefresh(100)

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

1 participant