Closed firemaples closed 8 months ago
Try fixing this issue by upgrading the compose version to the latest and avoid reusing the same view https://github.com/firemaples/EverTranslator/pull/445
version: 4.0.4 still same error
2024-03-22 05:49:08.186 23542-23542 AndroidRuntime tw.firemaples.onscreenocr_debug E FATAL EXCEPTION: main Process: tw.firemaples.onscreenocr_debug, PID: 23542 java.lang.IllegalStateException: Cannot start this animator on a detached view! at android.graphics.RenderNode.addAnimator(RenderNode.java:1502) at android.view.RenderNodeAnimator.setTarget(RenderNodeAnimator.java:316) at android.view.RenderNodeAnimator.setTarget(RenderNodeAnimator.java:300) at android.graphics.drawable.RippleForeground.startPending(RippleForeground.java:139) at android.graphics.drawable.RippleForeground.drawHardware(RippleForeground.java:168) at android.graphics.drawable.RippleForeground.draw(RippleForeground.java:340) at android.graphics.drawable.RippleDrawable.drawBackgroundAndRipples(RippleDrawable.java:848) at android.graphics.drawable.RippleDrawable.draw(RippleDrawable.java:679) at android.view.View.drawBackground(View.java:22227) at android.view.View.draw(View.java:21991) at androidx.compose.material.ripple.AndroidRippleIndicationInstance.drawIndication(Ripple.android.kt:192) at androidx.compose.foundation.IndicationModifier.draw(Indication.kt:183) at androidx.compose.ui.node.BackwardsCompatNode.draw(BackwardsCompatNode.kt:349) at androidx.compose.ui.node.LayoutNodeDrawScope.drawDirect-x_KDEd0$ui_release(LayoutNodeDrawScope.kt:105) at androidx.compose.ui.node.LayoutNodeDrawScope.performDraw(LayoutNodeDrawScope.kt:76) at androidx.compose.ui.node.LayoutNodeDrawScope.drawContent(LayoutNodeDrawScope.kt:55) at androidx.compose.foundation.BackgroundNode.draw(Background.kt:159) at androidx.compose.ui.node.LayoutNodeDrawScope.drawDirect-x_KDEd0$ui_release(LayoutNodeDrawScope.kt:105) at androidx.compose.ui.node.LayoutNodeDrawScope.draw-x_KDEd0$ui_release(LayoutNodeDrawScope.kt:86) at androidx.compose.ui.node.NodeCoordinator.drawContainedDrawModifiers(NodeCoordinator.kt:364) at androidx.compose.ui.node.NodeCoordinator.draw(NodeCoordinator.kt:353) at androidx.compose.ui.node.LayoutModifierNodeCoordinator.performDraw(LayoutModifierNodeCoordinator.kt:176) at androidx.compose.ui.node.NodeCoordinator.drawContainedDrawModifiers(NodeCoordinator.kt:361) at androidx.compose.ui.node.NodeCoordinator.draw(NodeCoordinator.kt:353) at androidx.compose.ui.node.LayoutNode.draw$ui_release(LayoutNode.kt:926) at androidx.compose.ui.node.InnerNodeCoordinator.performDraw(InnerNodeCoordinator.kt:174) at androidx.compose.ui.node.NodeCoordinator.drawContainedDrawModifiers(NodeCoordinator.kt:361) at androidx.compose.ui.node.NodeCoordinator.access$drawContainedDrawModifiers(NodeCoordinator.kt:54) at androidx.compose.ui.node.NodeCoordinator$drawBlock$1$1.invoke(NodeCoordinator.kt:383) at androidx.compose.ui.node.NodeCoordinator$drawBlock$1$1.invoke(NodeCoordinator.kt:382) at androidx.compose.runtime.snapshots.Snapshot$Companion.observe(Snapshot.kt:2303) at androidx.compose.runtime.snapshots.SnapshotStateObserver$ObservedScopeMap.observe(SnapshotStateObserver.kt:500) at androidx.compose.runtime.snapshots.SnapshotStateObserver.observeReads(SnapshotStateObserver.kt:256) at androidx.compose.ui.node.OwnerSnapshotObserver.observeReads$ui_release(OwnerSnapshotObserver.kt:133) at androidx.compose.ui.node.NodeCoordinator$drawBlock$1.invoke(NodeCoordinator.kt:382) at androidx.compose.ui.node.NodeCoordinator$drawBlock$1.invoke(NodeCoordinator.kt:380) at androidx.compose.ui.platform.RenderNodeApi29.record(RenderNodeApi29.android.kt:209) at androidx.compose.ui.platform.RenderNodeLayer.updateDisplayList(RenderNodeLayer.android.kt:335) at androidx.compose.ui.platform.AndroidComposeView.dispatchDraw(AndroidComposeView.android.kt:1236) at android.view.View.draw(View.java:22002) at android.view.View.draw(View.java:21868) at android.view.ViewGroup.drawChild(ViewGroup.java:4639) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4386) at android.view.View.draw(View.java:22002) at android.view.ViewRootImpl.drawSoftware(ViewRootImpl.java:4469) at android.view.ViewRootImpl.draw(ViewRootImpl.java:4367) 2024-03-22 05:49:08.186 23542-23542 AndroidRuntime tw.firemaples.onscreenocr_debug E at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:4147) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:3407) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:2188) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:8918) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1280) at android.view.Choreographer.doCallbacks(Choreographer.java:1019) at android.view.Choreographer.doFrame(Choreographer.java:911) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1248) at android.os.Handler.handleCallback(Handler.java:900) at android.os.Handler.dispatchMessage(Handler.java:103) at android.os.Looper.loop(Looper.java:219) at android.app.ActivityThread.main(ActivityThread.java:8676) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1109) 2024-03-22 05:49:08.315 23542-23542 Process tw.firemaples.onscreenocr_debug I Sending signal. PID: 23542 SIG: 9 2024-03-22 05:49:08.380 1536-2056 InputDispatcher system_server E channel 'cc57613 tw.firemaples.onscreenocr_debug (server)' ~ Channel is unrecoverably broken and will be disposed! 2024-03-22 05:49:08.402 1536-2056 InputDispatcher system_server E channel 'adabf66 tw.firemaples.onscreenocr_debug (server)' ~ Channel is unrecoverably broken and will be disposed! ---------------------------- PROCESS STARTED (28736) for package tw.firemaples.onscreenocr_debug ----------------------------
Hi @uomar8 Do you have the reproduce steps? I tried Pixel 3/7/8 and Note 8 and couldn't reproduce this issue. π
This issue needs to be fixed before releasing the production version. The main flow is already refactored, I will start working on the enhancement from you after this issue is fixed.
Hi @uomar8 Do you have the reproduce steps? I tried Pixel 3/7/8 and Note 8 and couldn't reproduce this issue. π
This issue needs to be fixed before releasing the production version. The main flow is already refactored, I will start working on the enhancement from you after this issue is fixed.
I don't have the steps because it happens randomly
This is a video how it crush, I hope it could help
https://github.com/firemaples/EverTranslator/assets/7046347/48d4bd3e-3c5f-44fd-83c2-cbc149c8f733
Does it always happen after pressing the translation button and before displaying the result window? π€
Does it always happen after pressing the translation button and before displaying the result window? π€
It never happened after pressing the translation button or before displaying the result window π
It happened after closing the result windows by clicking outside the window ( sometimes it close the window and sometimes it crush the app)
It happened after closing the result windows by clicking outside the window ( sometimes it close the window and sometimes it crush the app)
Thanks for explaining the situation clearly. π
Currently, this crash mainly happens on Samsung, Huawei, and Xiaomi with Android 10, 13, 14 I don't have the above devices π Let me try to reproduce it on emulators first. πββοΈ
Hi @uomar8, When I'm trying to reproduce this on my local side, could you try this fix https://github.com/firemaples/EverTranslator/pull/447 when you have time? Thank you!πββοΈ
The issue is caused by the running ripple effect after the view is destroyed. I removed the ripple effect from the result view's background.
Hi @uomar8, When I'm trying to reproduce this on my local side, could you try this fix #447 when you have time? Thank you!πββοΈ
The issue is caused by the running ripple effect after the view is destroyed. I removed the ripple effect from the result view's background.
Fixed πππ I tried it multiple, it works
It can be closed now
Thank you, let me introduce the fix to a new release!
https://console.firebase.google.com/u/0/project/ever-translator/crashlytics/app/android:tw.firemaples.onscreenocr/issues/9ddc5e91ce28839a6fc4e763d7917e4c?versions=4.0.0%20(118)&time=last-twenty-four-hours&sessionEventKey=65C7852C00ED00014F8DABB00F4CD6F2_1912423033284923655