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

ANR during draw on Android 8 devices #44

Open
faruktoptas opened this issue Nov 6, 2024 · 6 comments
Open

ANR during draw on Android 8 devices #44

faruktoptas opened this issue Nov 6, 2024 · 6 comments

Comments

@faruktoptas
Copy link

Please complete the following information:

  • Library Version: 0.2.3
  • Affected Device(s): Android 8.1 and older versions

Describe the Bug:

ANR happens when user navigates to the screen that uses the cloudy modifier. Logs show that it happens when creating blurred bitmap with runBlocking.

val blurredBitmap: Bitmap = runBlocking(Dispatchers.IO) {

Compose version: bom:2024.09.03

I see hundreds of ANR logs in Google Play Android Vitals.

Log details:

"main" tid=1 Timed Waiting
  at java.lang.Object.wait (Native method)
  at java.lang.Thread.parkFor$ (Thread.java:2161)
  at sun.misc.Unsafe.park (Unsafe.java:358)
  at java.util.concurrent.locks.LockSupport.parkNanos (LockSupport.java:230)
  at kotlinx.coroutines.BlockingCoroutine.joinBlocking (Builders.kt:88)
  at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking (Builders.kt:59)
  at kotlinx.coroutines.BuildersKt.runBlocking (Builders.kt:1)
  at com.skydoves.cloudy.CloudyModifierNode.draw (CloudyModifierNode.kt:127)
  at androidx.compose.ui.node.LayoutNodeDrawScope.drawDirect-eZhPAX0$ui_release (LayoutNodeDrawScope.kt:110)
  at androidx.compose.ui.node.LayoutNodeDrawScope.draw-eZhPAX0$ui_release (LayoutNodeDrawScope.kt:89)
  at androidx.compose.ui.node.NodeCoordinator.drawContainedDrawModifiers (NodeCoordinator.kt:450)
  at androidx.compose.ui.node.NodeCoordinator.draw (NodeCoordinator.kt:439)
  at androidx.compose.ui.node.LayoutModifierNodeCoordinator.performDraw (LayoutModifierNodeCoordinator.kt:280)
  at androidx.compose.ui.node.NodeCoordinator.drawContainedDrawModifiers (NodeCoordinator.kt:447)
  at androidx.compose.ui.node.NodeCoordinator.draw (NodeCoordinator.kt:439)
  at androidx.compose.ui.node.LayoutNode.draw$ui_release (LayoutNode.kt:1000)
  at androidx.compose.ui.node.InnerNodeCoordinator.performDraw (InnerNodeCoordinator.kt:196)
  at androidx.compose.ui.node.NodeCoordinator.drawContainedDrawModifiers (NodeCoordinator.kt:447)
  at androidx.compose.ui.node.NodeCoordinator.access$getTmpLayerPositionalProperties$cp (NodeCoordinator.kt:58)
  at androidx.compose.ui.node.NodeCoordinator.access$drawContainedDrawModifiers (NodeCoordinator.kt:58)
  at androidx.compose.ui.node.NodeCoordinator$drawBlock$1$1.invoke (NodeCoordinator.kt:469)
  at androidx.compose.ui.node.NodeCoordinator$drawBlock$1$1.invoke (NodeCoordinator.kt:468)
  at androidx.compose.runtime.snapshots.Snapshot$Companion.observe (Snapshot.kt:503)
  at androidx.compose.runtime.snapshots.SnapshotStateObserver$ObservedScopeMap.observe (SnapshotStateObserver.kt:502)
  at androidx.compose.runtime.snapshots.SnapshotStateObserver.observeReads (SnapshotStateObserver.kt:258)
  at androidx.compose.ui.node.OwnerSnapshotObserver.observeReads$ui_release (OwnerSnapshotObserver.kt:133)
  at androidx.compose.ui.node.NodeCoordinator$drawBlock$1.invoke (NodeCoordinator.kt:468)
  at androidx.compose.ui.node.NodeCoordinator$drawBlock$1.invoke (NodeCoordinator.kt:466)
  at androidx.compose.ui.platform.GraphicsLayerOwnerLayer$recordLambda$1.invoke (GraphicsLayerOwnerLayer.android.kt:291)
  at androidx.compose.ui.platform.GraphicsLayerOwnerLayer$recordLambda$1.invoke (GraphicsLayerOwnerLayer.android.kt:289)
  at androidx.compose.ui.graphics.drawscope.DrawScopeKt.draw-ymL40Pk$default (DrawScope.kt:343)
  at androidx.compose.ui.graphics.layer.GraphicsLayerV23.record (GraphicsLayerV23.android.kt:316)
  at androidx.compose.ui.graphics.layer.GraphicsLayer.recordInternal (AndroidGraphicsLayer.android.kt:430)
  at androidx.compose.ui.graphics.layer.GraphicsLayer.record-mL-hObY (AndroidGraphicsLayer.android.kt:423)
  at androidx.compose.ui.platform.GraphicsLayerOwnerLayer.updateDisplayList (GraphicsLayerOwnerLayer.android.kt:284)
  at androidx.compose.ui.platform.GraphicsLayerOwnerLayer.drawLayer (GraphicsLayerOwnerLayer.android.kt:229)
  at androidx.compose.ui.node.NodeCoordinator.draw (NodeCoordinator.kt:434)
  at androidx.compose.ui.node.LayoutModifierNodeCoordinator.performDraw (LayoutModifierNodeCoordinator.kt:280)
  at androidx.compose.ui.node.LayoutNodeDrawScope.drawContent (LayoutNodeDrawScope.kt:68)
  at androidx.compose.foundation.DrawGlowOverscrollModifier.draw (AndroidOverscroll.android.kt:330)
  at androidx.compose.ui.node.BackwardsCompatNode.draw (BackwardsCompatNode.kt:350)
  at androidx.compose.ui.node.LayoutNodeDrawScope.drawDirect-eZhPAX0$ui_release (LayoutNodeDrawScope.kt:110)
  at androidx.compose.ui.node.LayoutNodeDrawScope.draw-eZhPAX0$ui_release (LayoutNodeDrawScope.kt:89)
  at androidx.compose.ui.node.NodeCoordinator.drawContainedDrawModifiers (NodeCoordinator.kt:450)
  at androidx.compose.ui.node.NodeCoordinator.access$getTmpLayerPositionalProperties$cp (NodeCoordinator.kt:58)
  at androidx.compose.ui.node.NodeCoordinator.access$drawContainedDrawModifiers (NodeCoordinator.kt:58)
  at androidx.compose.ui.node.NodeCoordinator$drawBlock$1$1.invoke (NodeCoordinator.kt:469)
  at androidx.compose.ui.node.NodeCoordinator$drawBlock$1$1.invoke (NodeCoordinator.kt:468)
  at androidx.compose.runtime.snapshots.Snapshot$Companion.observe (Snapshot.kt:503)
  at androidx.compose.runtime.snapshots.SnapshotStateObserver$ObservedScopeMap.observe (SnapshotStateObserver.kt:502)
  at androidx.compose.runtime.snapshots.SnapshotStateObserver.observeReads (SnapshotStateObserver.kt:258)
  at androidx.compose.ui.node.OwnerSnapshotObserver.observeReads$ui_release (OwnerSnapshotObserver.kt:133)
  at androidx.compose.ui.node.NodeCoordinator$drawBlock$1.invoke (NodeCoordinator.kt:468)
  at androidx.compose.ui.node.NodeCoordinator$drawBlock$1.invoke (NodeCoordinator.kt:466)
  at androidx.compose.ui.platform.GraphicsLayerOwnerLayer$recordLambda$1.invoke (GraphicsLayerOwnerLayer.android.kt:291)
  at androidx.compose.ui.platform.GraphicsLayerOwnerLayer$recordLambda$1.invoke (GraphicsLayerOwnerLayer.android.kt:289)
  at androidx.compose.ui.graphics.drawscope.DrawScopeKt.draw-ymL40Pk$default (DrawScope.kt:343)
  at androidx.compose.ui.graphics.layer.GraphicsLayerV23.record (GraphicsLayerV23.android.kt:316)
  at androidx.compose.ui.graphics.layer.GraphicsLayer.recordInternal (AndroidGraphicsLayer.android.kt:430)
  at androidx.compose.ui.graphics.layer.GraphicsLayer.record-mL-hObY (AndroidGraphicsLayer.android.kt:423)
  at androidx.compose.ui.platform.GraphicsLayerOwnerLayer.updateDisplayList (GraphicsLayerOwnerLayer.android.kt:284)
  at androidx.compose.ui.platform.GraphicsLayerOwnerLayer.drawLayer (GraphicsLayerOwnerLayer.android.kt:229)
  at androidx.compose.ui.node.NodeCoordinator.draw (NodeCoordinator.kt:434)
  at androidx.compose.ui.node.LayoutModifierNodeCoordinator.performDraw (LayoutModifierNodeCoordinator.kt:280)
  at androidx.compose.ui.node.NodeCoordinator.drawContainedDrawModifiers (NodeCoordinator.kt:447)
  at androidx.compose.ui.node.NodeCoordinator.draw (NodeCoordinator.kt:439)
  at androidx.compose.ui.node.LayoutModifierNodeCoordinator.performDraw (LayoutModifierNodeCoordinator.kt:280)
  at androidx.compose.ui.node.NodeCoordinator.drawContainedDrawModifiers (NodeCoordinator.kt:447)
  at androidx.compose.ui.node.NodeCoordinator.draw (NodeCoordinator.kt:439)
  at androidx.compose.ui.node.LayoutModifierNodeCoordinator.performDraw (LayoutModifierNodeCoordinator.kt:280)
  at androidx.compose.ui.node.NodeCoordinator.drawContainedDrawModifiers (NodeCoordinator.kt:447)
  at androidx.compose.ui.node.NodeCoordinator.access$getTmpLayerPositionalProperties$cp (NodeCoordinator.kt:58)
  at androidx.compose.ui.node.NodeCoordinator.access$drawContainedDrawModifiers (NodeCoordinator.kt:58)
  at androidx.compose.ui.node.NodeCoordinator$drawBlock$1$1.invoke (NodeCoordinator.kt:469)
  at androidx.compose.ui.node.NodeCoordinator$drawBlock$1$1.invoke (NodeCoordinator.kt:468)
  at androidx.compose.runtime.snapshots.Snapshot$Companion.observe (Snapshot.kt:503)
  at androidx.compose.runtime.snapshots.SnapshotStateObserver$ObservedScopeMap.observe (SnapshotStateObserver.kt:502)
  at androidx.compose.runtime.snapshots.SnapshotStateObserver.observeReads (SnapshotStateObserver.kt:258)
  at androidx.compose.ui.node.OwnerSnapshotObserver.observeReads$ui_release (OwnerSnapshotObserver.kt:133)
  at androidx.compose.ui.node.NodeCoordinator$drawBlock$1.invoke (NodeCoordinator.kt:468)
  at androidx.compose.ui.node.NodeCoordinator$drawBlock$1.invoke (NodeCoordinator.kt:466)
  at androidx.compose.ui.platform.GraphicsLayerOwnerLayer$recordLambda$1.invoke (GraphicsLayerOwnerLayer.android.kt:291)
  at androidx.compose.ui.platform.GraphicsLayerOwnerLayer$recordLambda$1.invoke (GraphicsLayerOwnerLayer.android.kt:289)
  at androidx.compose.ui.graphics.drawscope.DrawScopeKt.draw-ymL40Pk$default (DrawScope.kt:343)
  at androidx.compose.ui.graphics.layer.GraphicsLayerV23.record (GraphicsLayerV23.android.kt:316)
  at androidx.compose.ui.graphics.layer.GraphicsLayer.recordInternal (AndroidGraphicsLayer.android.kt:430)
  at androidx.compose.ui.graphics.layer.GraphicsLayer.record-mL-hObY (AndroidGraphicsLayer.android.kt:423)
  at androidx.compose.ui.platform.GraphicsLayerOwnerLayer.updateDisplayList (GraphicsLayerOwnerLayer.android.kt:284)
  at androidx.compose.ui.platform.GraphicsLayerOwnerLayer.drawLayer (GraphicsLayerOwnerLayer.android.kt:229)
  at androidx.compose.ui.node.NodeCoordinator.draw (NodeCoordinator.kt:434)
  at androidx.compose.ui.node.LayoutNode.draw$ui_release (LayoutNode.kt:1000)
  at androidx.compose.ui.node.InnerNodeCoordinator.performDraw (InnerNodeCoordinator.kt:196)
  at androidx.compose.ui.node.LayoutNodeDrawScope.drawContent (LayoutNodeDrawScope.kt:68)
  at androidx.compose.foundation.DrawGlowOverscrollModifier.draw (AndroidOverscroll.android.kt:330)
  at androidx.compose.ui.node.BackwardsCompatNode.draw (BackwardsCompatNode.kt:350)
  at androidx.compose.ui.node.LayoutNodeDrawScope.drawDirect-eZhPAX0$ui_release (LayoutNodeDrawScope.kt:110)
  at androidx.compose.ui.node.LayoutNodeDrawScope.draw-eZhPAX0$ui_release (LayoutNodeDrawScope.kt:89)
  at androidx.compose.ui.node.NodeCoordinator.drawContainedDrawModifiers (NodeCoordinator.kt:450)
  at androidx.compose.ui.node.NodeCoordinator.access$getTmpLayerPositionalProperties$cp (NodeCoordinator.kt:58)
  at androidx.compose.ui.node.NodeCoordinator.access$drawContainedDrawModifiers (NodeCoordinator.kt:58)
  at androidx.compose.ui.node.NodeCoordinator$drawBlock$1$1.invoke (NodeCoordinator.kt:469)
  at androidx.compose.ui.node.NodeCoordinator$drawBlock$1$1.invoke (NodeCoordinator.kt:468)
  at androidx.compose.runtime.snapshots.Snapshot$Companion.observe (Snapshot.kt:503)
  at androidx.compose.runtime.snapshots.SnapshotStateObserver$ObservedScopeMap.observe (SnapshotStateObserver.kt:502)
  at androidx.compose.runtime.snapshots.SnapshotStateObserver.observeReads (SnapshotStateObserver.kt:258)
  at androidx.compose.ui.node.OwnerSnapshotObserver.observeReads$ui_release (OwnerSnapshotObserver.kt:133)
  at androidx.compose.ui.node.NodeCoordinator$drawBlock$1.invoke (NodeCoordinator.kt:468)
  at androidx.compose.ui.node.NodeCoordinator$drawBlock$1.invoke (NodeCoordinator.kt:466)
  at androidx.compose.ui.platform.GraphicsLayerOwnerLayer$recordLambda$1.invoke (GraphicsLayerOwnerLayer.android.kt:291)
  at androidx.compose.ui.platform.GraphicsLayerOwnerLayer$recordLambda$1.invoke (GraphicsLayerOwnerLayer.android.kt:289)
  at androidx.compose.ui.graphics.drawscope.DrawScopeKt.draw-ymL40Pk$default (DrawScope.kt:343)
  at androidx.compose.ui.graphics.layer.GraphicsLayerV23.record (GraphicsLayerV23.android.kt:316)
  at androidx.compose.ui.graphics.layer.GraphicsLayer.recordInternal (AndroidGraphicsLayer.android.kt:430)
  at androidx.compose.ui.graphics.layer.GraphicsLayer.record-mL-hObY (AndroidGraphicsLayer.android.kt:423)
  at androidx.compose.ui.platform.GraphicsLayerOwnerLayer.updateDisplayList (GraphicsLayerOwnerLayer.android.kt:284)
  at androidx.compose.ui.platform.GraphicsLayerOwnerLayer.drawLayer (GraphicsLayerOwnerLayer.android.kt:229)
  at androidx.compose.ui.node.NodeCoordinator.draw (NodeCoordinator.kt:434)
  at androidx.compose.ui.node.LayoutModifierNodeCoordinator.performDraw (LayoutModifierNodeCoordinator.kt:280)
  at androidx.compose.ui.node.NodeCoordinator.drawContainedDrawModifiers (NodeCoordinator.kt:447)
  at androidx.compose.ui.node.NodeCoordinator.draw (NodeCoordinator.kt:439)
  at androidx.compose.ui.node.LayoutModifierNodeCoordinator.performDraw (LayoutModifierNodeCoordinator.kt:280)
  at androidx.compose.ui.node.NodeCoordinator.drawContainedDrawModifiers (NodeCoordinator.kt:447)
  at androidx.compose.ui.node.NodeCoordinator.draw (NodeCoordinator.kt:439)
  at androidx.compose.ui.node.LayoutNode.draw$ui_release (LayoutNode.kt:1000)
  at androidx.compose.ui.node.InnerNodeCoordinator.performDraw (InnerNodeCoordinator.kt:196)
  at androidx.compose.ui.node.NodeCoordinator.drawContainedDrawModifiers (NodeCoordinator.kt:447)
  at androidx.compose.ui.node.NodeCoordinator.draw (NodeCoordinator.kt:439)
  at androidx.compose.ui.node.LayoutModifierNodeCoordinator.performDraw (LayoutModifierNodeCoordinator.kt:280)
  at androidx.compose.ui.node.NodeCoordinator.drawContainedDrawModifiers (NodeCoordinator.kt:447)
  at androidx.compose.ui.node.NodeCoordinator.draw (NodeCoordinator.kt:439)
  at androidx.compose.ui.node.LayoutNode.draw$ui_release (LayoutNode.kt:1000)
  at androidx.compose.ui.node.InnerNodeCoordinator.performDraw (InnerNodeCoordinator.kt:196)
  at androidx.compose.ui.node.LayoutNodeDrawScope.drawContent (LayoutNodeDrawScope.kt:68)
  at androidx.compose.foundation.BackgroundNode.draw (Background.kt:163)
  at androidx.compose.ui.node.LayoutNodeDrawScope.drawDirect-eZhPAX0$ui_release (LayoutNodeDrawScope.kt:110)
  at androidx.compose.ui.node.LayoutNodeDrawScope.draw-eZhPAX0$ui_release (LayoutNodeDrawScope.kt:89)
  at androidx.compose.ui.node.NodeCoordinator.drawContainedDrawModifiers (NodeCoordinator.kt:450)
  at androidx.compose.ui.node.NodeCoordinator.draw (NodeCoordinator.kt:439)
  at androidx.compose.ui.node.LayoutModifierNodeCoordinator.performDraw (LayoutModifierNodeCoordinator.kt:280)
  at androidx.compose.ui.node.NodeCoordinator.drawContainedDrawModifiers (NodeCoordinator.kt:447)
  at androidx.compose.ui.node.NodeCoordinator.access$getTmpLayerPositionalProperties$cp (NodeCoordinator.kt:58)
  at androidx.compose.ui.node.NodeCoordinator.access$drawContainedDrawModifiers (NodeCoordinator.kt:58)
  at androidx.compose.ui.node.NodeCoordinator$drawBlock$1$1.invoke (NodeCoordinator.kt:469)
  at androidx.compose.ui.node.NodeCoordinator$drawBlock$1$1.invoke (NodeCoordinator.kt:468)
  at androidx.compose.runtime.snapshots.Snapshot.enter (Snapshot.java:140)
  at androidx.compose.runtime.snapshots.Snapshot$Companion.observe (Snapshot.kt:529)
  at androidx.compose.runtime.snapshots.SnapshotStateObserver$ObservedScopeMap.observe (SnapshotStateObserver.kt:502)
  at androidx.compose.runtime.snapshots.SnapshotStateObserver.observeReads (SnapshotStateObserver.kt:258)
  at androidx.compose.ui.node.OwnerSnapshotObserver.observeReads$ui_release (OwnerSnapshotObserver.kt:133)
  at androidx.compose.ui.node.NodeCoordinator$drawBlock$1.invoke (NodeCoordinator.kt:468)
  at androidx.compose.ui.node.NodeCoordinator$drawBlock$1.invoke (NodeCoordinator.kt:466)
  at androidx.compose.ui.platform.GraphicsLayerOwnerLayer$recordLambda$1.invoke (GraphicsLayerOwnerLayer.android.kt:291)
  at androidx.compose.ui.platform.GraphicsLayerOwnerLayer$recordLambda$1.invoke (GraphicsLayerOwnerLayer.android.kt:289)
  at androidx.compose.ui.graphics.drawscope.DrawScopeKt.draw-ymL40Pk$default (DrawScope.kt:343)
  at androidx.compose.ui.graphics.layer.GraphicsLayerV23.record (GraphicsLayerV23.android.kt:316)
  at androidx.compose.ui.graphics.layer.GraphicsLayer.recordInternal (AndroidGraphicsLayer.android.kt:430)
  at androidx.compose.ui.graphics.layer.GraphicsLayer.record-mL-hObY (AndroidGraphicsLayer.android.kt:423)
  at androidx.compose.ui.platform.GraphicsLayerOwnerLayer.updateDisplayList (GraphicsLayerOwnerLayer.android.kt:284)
  at androidx.compose.ui.platform.GraphicsLayerOwnerLayer.drawLayer (GraphicsLayerOwnerLayer.android.kt:229)
  at androidx.compose.ui.node.NodeCoordinator.draw (NodeCoordinator.kt:434)
  at androidx.compose.ui.node.LayoutNode.draw$ui_release (LayoutNode.kt:1000)
  at androidx.compose.ui.node.InnerNodeCoordinator.performDraw (InnerNodeCoordinator.kt:196)
  at androidx.compose.ui.node.NodeCoordinator.drawContainedDrawModifiers (NodeCoordinator.kt:447)
  at androidx.compose.ui.node.NodeCoordinator.draw (NodeCoordinator.kt:439)
  at androidx.compose.ui.node.LayoutNode.draw$ui_release (LayoutNode.kt:1000)
  at androidx.compose.ui.platform.AndroidComposeView.dispatchDraw (AndroidComposeView.android.kt:1564)
  at android.view.View.draw (View.java:19317)
  at android.view.View.updateDisplayListIfDirty (View.java:18250)
  at android.view.View.draw (View.java:19042)
  at android.view.ViewGroup.drawChild (ViewGroup.java:4271)
  at android.view.ViewGroup.dispatchDraw (ViewGroup.java:4054)
  at android.view.View.updateDisplayListIfDirty (View.java:18241)
  at android.view.View.draw (View.java:19042)
  at android.view.ViewGroup.drawChild (ViewGroup.java:4271)
  at androidx.fragment.app.FragmentContainerView.drawChild (FragmentContainerView.kt:235)
  at android.view.ViewGroup.dispatchDraw (ViewGroup.java:4054)
  at androidx.fragment.app.FragmentContainerView.dispatchDraw (FragmentContainerView.kt:225)
  at android.view.View.updateDisplayListIfDirty (View.java:18241)
  at android.view.View.draw (View.java:19042)
  at android.view.ViewGroup.drawChild (ViewGroup.java:4271)
  at androidx.fragment.app.FragmentContainerView.drawChild (FragmentContainerView.kt:235)
  at android.view.ViewGroup.dispatchDraw (ViewGroup.java:4054)
  at androidx.fragment.app.FragmentContainerView.dispatchDraw (FragmentContainerView.kt:225)
  at android.view.View.updateDisplayListIfDirty (View.java:18241)
  at android.view.View.draw (View.java:19042)
  at android.view.ViewGroup.drawChild (ViewGroup.java:4271)
  at android.view.ViewGroup.dispatchDraw (ViewGroup.java:4054)
  at androidx.constraintlayout.widget.ConstraintLayout.dispatchDraw (ConstraintLayout.java:1994)
  at android.view.View.updateDisplayListIfDirty (View.java:18241)
  at android.view.View.draw (View.java:19042)
  at android.view.ViewGroup.drawChild (ViewGroup.java:4271)
  at android.view.ViewGroup.dispatchDraw (ViewGroup.java:4054)
  at android.view.View.updateDisplayListIfDirty (View.java:18241)
  at android.view.View.draw (View.java:19042)
  at android.view.ViewGroup.drawChild (ViewGroup.java:4271)
  at android.view.ViewGroup.dispatchDraw (ViewGroup.java:4054)
  at android.view.View.updateDisplayListIfDirty (View.java:18241)
  at android.view.View.draw (View.java:19042)
  at android.view.ViewGroup.drawChild (ViewGroup.java:4271)
  at android.view.ViewGroup.dispatchDraw (ViewGroup.java:4054)
  at android.view.View.updateDisplayListIfDirty (View.java:18241)
  at android.view.View.draw (View.java:19042)
  at android.view.ViewGroup.drawChild (ViewGroup.java:4271)
  at android.view.ViewGroup.dispatchDraw (ViewGroup.java:4054)
  at android.view.View.updateDisplayListIfDirty (View.java:18241)
  at android.view.View.draw (View.java:19042)
  at android.view.ViewGroup.drawChild (ViewGroup.java:4271)
  at android.view.ViewGroup.dispatchDraw (ViewGroup.java:4054)
  at android.view.View.draw (View.java:19317)
  at com.android.internal.policy.DecorView.draw (DecorView.java:915)
  at android.view.View.updateDisplayListIfDirty (View.java:18250)
  at android.view.ThreadedRenderer.updateViewTreeDisplayList (ThreadedRenderer.java:684)
  at android.view.ThreadedRenderer.updateRootDisplayList (ThreadedRenderer.java:690)
  at android.view.ThreadedRenderer.draw (ThreadedRenderer.java:804)
  at android.view.ViewRootImpl.draw (ViewRootImpl.java:3206)
  at android.view.ViewRootImpl.performDraw (ViewRootImpl.java:3004)
  at android.view.ViewRootImpl.performTraversals (ViewRootImpl.java:2533)
  at android.view.ViewRootImpl.doTraversal (ViewRootImpl.java:1522)
  at android.view.ViewRootImpl$TraversalRunnable.run (ViewRootImpl.java:7292)
  at android.view.Choreographer$CallbackRecord.run (Choreographer.java:981)
  at android.view.Choreographer.doCallbacks (Choreographer.java:790)
  at android.view.Choreographer.doFrame (Choreographer.java:721)
  at android.view.Choreographer$FrameDisplayEventReceiver.run (Choreographer.java:967)
  at android.os.Handler.handleCallback (Handler.java:808)
  at android.os.Handler.dispatchMessage (Handler.java:101)
  at android.os.Looper.loop (Looper.java:166)
  at android.app.ActivityThread.main (ActivityThread.java:7529)
  at java.lang.reflect.Method.invoke (Native method)
  at com.android.internal.os.Zygote$MethodAndArgsCaller.run (Zygote.java:245)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:921)
@desugar-64
Copy link

The frame drops and ANRs issues happen because of this.
One way to fix this would be moving the blur calculations to a background thread, and stop blocking the main thread. While this would create a slight delay where the blurred image might be a few frames behind the actual content, it would at least prevent the app from freezing or dropping frames.
Hopefully, the library maintainer will take this into account and address these issues in future releases. 🙂

@skydoves
Copy link
Owner

skydoves commented Nov 8, 2024

Hey @desugar-64, thank you for pointing out the issue! Would you be interested in contributing to the project as well? If you’d like to collaborate further, feel free to let me know—I’d be happy to discuss more opportunities!

@desugar-64
Copy link

@skydoves It’s quite intriguing. I’ve never contributed to open source projects before and I notice there’s no contributing guide in your repository. How does this process usually work? I don’t have much personal time available, but I’d like to help if I can, even in small ways.

@skydoves
Copy link
Owner

skydoves commented Nov 8, 2024

Thank you so much for your interest! The process is simple: fork the repository, create a branch, work on your changes, and then submit a PR—that’s it. Your efforts, even just suggesting an idea or discussions, are already a valuable contribution. when you have a moment, feel free to turn your ideas into code :)

@ridvanozcan
Copy link

+1 I am experiencing anr on an android 8.0 device.

@MatthewCallery
Copy link

I'm also experiencing this issue on devices running Android 8.1 and below.

It looks like the use of runBlocking in CloudyModifierNode is the issue.

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

5 participants