Can anyone help me in finding the root cause of the following error ? It is intermittent and happens...
a
Can anyone help me in finding the root cause of the following error ? It is intermittent and happens when i scroll the lazyverticalgrid very fast. Compose version -
1.2.0-beta02
Copy code
java.lang.IllegalStateException: Reading a state that was created after the snapshot was taken or in a snapshot that has not yet been applied
        at androidx.compose.runtime.snapshots.SnapshotKt.readError(Snapshot.kt:1827)
        at androidx.compose.runtime.snapshots.SnapshotKt.readable(Snapshot.kt:1822)
        at androidx.compose.runtime.snapshots.SnapshotKt.readable(Snapshot.kt:1813)
        at androidx.compose.runtime.SnapshotMutableStateImpl.getValue(SnapshotState.kt:130)
        at androidx.compose.animation.core.AnimationState.getValue(AnimationState.kt:344)
        at androidx.compose.animation.core.SuspendAnimationKt.animateDecay(SuspendAnimation.kt:190)
        at androidx.compose.animation.core.SuspendAnimationKt.animateDecay$default(SuspendAnimation.kt:182)
        at androidx.compose.foundation.gestures.DefaultFlingBehavior.performFling(Scrollable.kt:442)
        at androidx.compose.foundation.gestures.ScrollingLogic$doFlingAnimation$2.invokeSuspend(Scrollable.kt:358)
        at androidx.compose.foundation.gestures.ScrollingLogic$doFlingAnimation$2.invoke(Unknown Source:8)
        at androidx.compose.foundation.gestures.ScrollingLogic$doFlingAnimation$2.invoke(Unknown Source:4)
        at androidx.compose.foundation.gestures.DefaultScrollableState$scroll$2$1.invokeSuspend(ScrollableState.kt:148)
        at androidx.compose.foundation.gestures.DefaultScrollableState$scroll$2$1.invoke(Unknown Source:8)
        at androidx.compose.foundation.gestures.DefaultScrollableState$scroll$2$1.invoke(Unknown Source:4)
        at androidx.compose.foundation.MutatorMutex$mutateWith$2.invokeSuspend(MutatorMutex.kt:160)
        at androidx.compose.foundation.MutatorMutex$mutateWith$2.invoke(Unknown Source:8)
        at androidx.compose.foundation.MutatorMutex$mutateWith$2.invoke(Unknown Source:4)
        at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:89)
        at kotlinx.coroutines.CoroutineScopeKt.coroutineScope(CoroutineScope.kt:264)
        at androidx.compose.foundation.MutatorMutex.mutateWith(MutatorMutex.kt:153)
        at androidx.compose.foundation.gestures.DefaultScrollableState$scroll$2.invokeSuspend(ScrollableState.kt:145)
        at androidx.compose.foundation.gestures.DefaultScrollableState$scroll$2.invoke(Unknown Source:8)
        at androidx.compose.foundation.gestures.DefaultScrollableState$scroll$2.invoke(Unknown Source:4)
        at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:89)
        at kotlinx.coroutines.CoroutineScopeKt.coroutineScope(CoroutineScope.kt:264)
        at androidx.compose.foundation.gestures.DefaultScrollableState.scroll(ScrollableState.kt:144)
        at androidx.compose.foundation.lazy.grid.LazyGridState.scroll(LazyGridState.kt:279)
        at androidx.compose.foundation.gestures.ScrollableState$DefaultImpls.scroll$default(ScrollableState.kt:51)
        at androidx.compose.foundation.gestures.ScrollingLogic.doFlingAnimation-QWom1Mo(Scrollable.kt:345)
        at androidx.compose.foundation.gestures.ScrollingLogic.onDragStopped(Scrollable.kt:335)
        at androidx.compose.foundation.gestures.ScrollableKt$pointerScrollable$4$1.invokeSuspend(Scrollable.kt:216)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
        at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
        at androidx.compose.ui.platform.AndroidUiDispatcher.performTrampolineDispatch(AndroidUiDispatcher.android.kt:81)
        at androidx.compose.ui.platform.AndroidUiDispatcher.access$performTrampolineDispatch(AndroidUiDispatcher.android.kt:41)
        at androidx.compose.ui.platform.AndroidUiDispatcher$dispatchCallback$1.doFrame(AndroidUiDispatcher.android.kt:68)
        at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1225)
        at android.view.Choreographer.doCallbacks(Choreographer.java:1024)
        at android.view.ChoreographerExtImpl.checkScrollOptSceneEnable(ChoreographerExtImpl.java:319)
        at android.view.Choreographer.doFrame(Choreographer.java:913)
        at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1212)
E/AndroidRuntime:     at android.os.Handler.handleCallback(Handler.java:938)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loopOnce(Looper.java:233)
        at android.os.Looper.loop(Looper.java:344)
        at android.app.ActivityThread.main(ActivityThread.java:8191)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:584)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1034)
    	Suppressed: kotlinx.coroutines.DiagnosticCoroutineContextException: [androidx.compose.ui.platform.MotionDurationScaleImpl@31e98ee, androidx.compose.runtime.BroadcastFrameClock@cb3d18f, StandaloneCoroutine{Cancelling}@603fc1c, AndroidUiDispatcher@2b1025]
๐Ÿงต 12
f
z