Closed mahramane closed 3 months ago
Hello! Thank you for submitting the issue. Could you please provide the minimal reproducer?
Hi, I have exactly the same case.
I have HorizontalPager
with LazyColumn
that updates the content data by fetching the data from Room
.
In the beginning, everything starts OK, but after swiping a few times it crashes with this Exception
FATAL EXCEPTION: main Process: com.manookian.scs, PID: 16348 java.lang.IllegalArgumentException: onReuse is only expected on attached node at androidx.compose.ui.node.LayoutNode.onReuse(LayoutNode.kt:1326) at androidx.compose.runtime.ComposerImpl$useNode$2.invoke(Composer.kt:1637) at androidx.compose.runtime.ComposerImpl$useNode$2.invoke(Composer.kt:1636) at androidx.compose.runtime.CompositionImpl.applyChangesInLocked(Composition.kt:818) at androidx.compose.runtime.CompositionImpl.applyChanges(Composition.kt:849) at androidx.compose.runtime.Recomposer$runRecomposeAndApplyChanges$2$1.invoke(Recomposer.kt:625) at androidx.compose.runtime.Recomposer$runRecomposeAndApplyChanges$2$1.invoke(Recomposer.kt:537) at androidx.compose.ui.platform.AndroidUiFrameClock$withFrameNanos$2$callback$1.doFrame(AndroidUiFrameClock.android.kt:41) at androidx.compose.ui.platform.AndroidUiDispatcher.performFrameDispatch(AndroidUiDispatcher.android.kt:109) at androidx.compose.ui.platform.AndroidUiDispatcher.access$performFrameDispatch(AndroidUiDispatcher.android.kt:41) at androidx.compose.ui.platform.AndroidUiDispatcher$dispatchCallback$1.doFrame(AndroidUiDispatcher.android.kt:69) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1319) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1329) at android.view.Choreographer.doCallbacks(Choreographer.java:930) at android.view.Choreographer.doFrame(Choreographer.java:854) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1303) at android.os.Handler.handleCallback(Handler.java:942) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loopOnce(Looper.java:226) at android.os.Looper.loop(Looper.java:313) at android.app.ActivityThread.main(ActivityThread.java:8810) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:604) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067) Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [androidx.compose.runtime.PausableMonotonicFrameClock@833f024, androidx.compose.ui.platform.MotionDurationScaleImpl@120678d, StandaloneCoroutine{Cancelling}@e673d42, AndroidUiDispatcher@9ab6153]
I noticed that when I swipe slowly everything works fine, but when I swipe quicker it crashes. It seems that when it's not finishing the first fetch you swipe and it's starting a new fetch happens the crash.
Hello @RoustamManookian! The same question for you: could you please provide a reproducible example for that? And could you also provide info about your setup (versions, OS, etc.)? Or they're the same as @mahramane has?
Hello, i have the same issue with ScalingLazyColumn on Wear OS. in My Galaxy Watch 4 device. It happens randomly ( but often ) while scrolling process effectively.
Versions
Did you find a solution it about ?
@mazunin-v-jb My issue was that I was making a DB fetch in DisposableEffect of the element composable. I fixed it by collecting all the data for all elements in the viewModel and providing the corresponding data to each element to it's contsructor.
Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.
Describe the bug Hi I use a
LazyColumn
in aTabRow
with 3Tab
and Load a list from server and show it inLazyColumn
. also i reload data when tab change. When I change tab more than 4 or 5 times i get the following error:I get it only in jvm (windows).
Affected platforms Select one of the platforms below:
Versions