Status Update
Comments
so...@google.com <so...@google.com>
jo...@google.com <jo...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
Author: Louis Pullen-Freilich <
Link:
Adds OverscrollEffect#withoutDrawing and OverscrollEffect#withoutEventHandling
Expand for full commit details
Adds OverscrollEffect#withoutDrawing and OverscrollEffect#withoutEventHandling
These APIs allow overscroll to have events dispatched to it by one component, and rendered in a separate component.
Fixes: b/266550551
Fixes: b/204650733
Fixes: b/255554340
Fixes: b/229537244
Test: OverscrollTest
Relnote: "Adds OverscrollEffect#withoutDrawing and OverscrollEffect#withoutEventHandling APIs - these APIs create a wrapped instance of the provided overscroll effect that doesn't draw / handle events respectively, which allows for rendering overscroll in a separate component from the component that is dispatching events. For example, disabling drawing the overscroll inside a lazy list, and then drawing the overscroll separately on top / elsewhere."
Change-Id: Idbb3d91546b49c1987a041f959bce4b2b09a9f61
Files:
- M
compose/foundation/foundation/api/current.txt
- M
compose/foundation/foundation/api/restricted_current.txt
- M
compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/OverscrollDemo.kt
- M
compose/foundation/foundation/samples/src/main/java/androidx/compose/foundation/samples/OverscrollSample.kt
- M
compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/OverscrollTest.kt
- M
compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/Overscroll.kt
Hash: f64e25b7a473c757d080521e7dd97b3f6670f60d
Date: Fri Nov 01 18:43:56 2024
gl...@gmail.com <gl...@gmail.com> #3
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.compose.foundation:foundation:1.8.0-alpha06
androidx.compose.foundation:foundation-android:1.8.0-alpha06
androidx.compose.foundation:foundation-jvmstubs:1.8.0-alpha06
androidx.compose.foundation:foundation-linuxx64stubs:1.8.0-alpha06
to...@gmail.com <to...@gmail.com> #5
I am now getting the same crash (with Anchored) using snapshot 10839053 from today.
java.lang.IllegalStateException: The offset was read before being initialized. Did you access the offset in a phase before layout, like effects or composition?
at androidx.compose.material3.AnchoredDraggableState.requireOffset(AnchoredDraggable.kt:345)
at androidx.compose.material3.DismissState.requireOffset(SwipeToDismiss.kt:145)
at androidx.compose.material3.SwipeToDismissKt$SwipeToDismiss$3$1.invoke-Bjo55l4(SwipeToDismiss.kt:355)
at androidx.compose.material3.SwipeToDismissKt$SwipeToDismiss$3$1.invoke(SwipeToDismiss.kt:355)
at androidx.compose.foundation.layout.OffsetPxNode$measure$1.invoke(Offset.kt:247)
at androidx.compose.foundation.layout.OffsetPxNode$measure$1.invoke(Offset.kt:246)
at androidx.compose.ui.layout.MeasureScope$layout$1.placeChildren(MeasureScope.kt:70)
at androidx.compose.ui.node.LookaheadDelegate.placeChildren(LookaheadDelegate.kt:178)
at androidx.compose.ui.node.LookaheadDelegate.placeAt-f8xVGno(LookaheadDelegate.kt:156)
at androidx.compose.ui.layout.Placeable.access$placeAt-f8xVGno(Placeable.kt:34)
at androidx.compose.ui.layout.Placeable$PlacementScope.place-70tqf50(Placeable.kt:463)
at androidx.compose.ui.layout.Placeable$PlacementScope.place-70tqf50$default(Placeable.kt:231)
at androidx.compose.ui.node.LayoutNodeLayoutDelegate$LookaheadPassDelegate$placeAt$1.invoke(LayoutNodeLayoutDelegate.kt:1317)
at androidx.compose.ui.node.LayoutNodeLayoutDelegate$LookaheadPassDelegate$placeAt$1.invoke(LayoutNodeLayoutDelegate.kt:1315)
at androidx.compose.runtime.snapshots.Snapshot$Companion.observe(Snapshot.kt:2303)
at androidx.compose.runtime.snapshots.SnapshotStateObserver$ObservedScopeMap.observe(SnapshotStateObserver.kt:496)
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.OwnerSnapshotObserver.observeLayoutModifierSnapshotReads$ui_release(OwnerSnapshotObserver.kt:96)
at androidx.compose.ui.node.OwnerSnapshotObserver.observeLayoutModifierSnapshotReads$ui_release$default(OwnerSnapshotObserver.kt:90)
at androidx.compose.ui.node.LayoutNodeLayoutDelegate$LookaheadPassDelegate.placeAt-f8xVGno(LayoutNodeLayoutDelegate.kt:1315)
at androidx.compose.ui.layout.Placeable.access$placeAt-f8xVGno(Placeable.kt:34)
at androidx.compose.ui.layout.Placeable$PlacementScope.place-70tqf50(Placeable.kt:463)
at androidx.compose.ui.layout.Placeable$PlacementScope.place-70tqf50$default(Placeable.kt:231)
at androidx.compose.foundation.layout.BoxKt.placeInBox(Box.kt:185)
at androidx.compose.foundation.layout.BoxKt.access$placeInBox(Box.kt:1)
at androidx.compose.foundation.layout.BoxKt$boxMeasurePolicy$1$5.invoke(Box.kt:166)
at androidx.compose.foundation.layout.BoxKt$boxMeasurePolicy$1$5.invoke(Box.kt:162)
at androidx.compose.ui.layout.MeasureScope$layout$1.placeChildren(MeasureScope.kt:70)
at androidx.compose.ui.node.LayoutNodeLayoutDelegate$LookaheadPassDelegate$layoutChildren$1.invoke(LayoutNodeLayoutDelegate.kt:1093)
at androidx.compose.ui.node.LayoutNodeLayoutDelegate$LookaheadPassDelegate$layoutChildren$1.invoke(LayoutNodeLayoutDelegate.kt:1088)
at androidx.compose.runtime.snapshots.Snapshot$Companion.observe(Snapshot.kt:2303)
at androidx.compose.runtime.snapshots.SnapshotStateObserver$ObservedScopeMap.observe(SnapshotStateObserver.kt:496)
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.OwnerSnapshotObserver.observeLayoutSnapshotReads$ui_release(OwnerSnapshotObserver.kt:81)
at androidx.compose.ui.node.OwnerSnapshotObserver.observeLayoutSnapshotReads$ui_release$default(OwnerSnapshotObserver.kt:75)
08:33:23.331 Crash app.symfonik.music.player.debug E at androidx.compose.ui.node.LayoutNodeLayoutDelegate$LookaheadPassDelegate.layoutChildren(LayoutNodeLayoutDelegate.kt:1088)
at androidx.compose.ui.node.LayoutNodeLayoutDelegate$LookaheadPassDelegate.onNodePlaced$ui_release(LayoutNodeLayoutDelegate.kt:1470)
at androidx.compose.ui.node.InnerNodeCoordinator$LookaheadDelegateImpl.placeChildren(InnerNodeCoordinator.kt:97)
at androidx.compose.ui.node.LookaheadDelegate.placeAt-f8xVGno(LookaheadDelegate.kt:156)
at androidx.compose.ui.layout.Placeable.access$placeAt-f8xVGno(Placeable.kt:34)
at androidx.compose.ui.layout.Placeable$PlacementScope.place-70tqf50(Placeable.kt:463)
at androidx.compose.ui.layout.Placeable$PlacementScope.place-70tqf50$default(Placeable.kt:231)
at androidx.compose.ui.node.LayoutNodeLayoutDelegate$LookaheadPassDelegate$placeAt$1.invoke(LayoutNodeLayoutDelegate.kt:1317)
at androidx.compose.ui.node.LayoutNodeLayoutDelegate$LookaheadPassDelegate$placeAt$1.invoke(LayoutNodeLayoutDelegate.kt:1315)
at androidx.compose.runtime.snapshots.Snapshot$Companion.observe(Snapshot.kt:2303)
at androidx.compose.runtime.snapshots.SnapshotStateObserver$ObservedScopeMap.observe(SnapshotStateObserver.kt:496)
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.OwnerSnapshotObserver.observeLayoutModifierSnapshotReads$ui_release(OwnerSnapshotObserver.kt:96)
at androidx.compose.ui.node.OwnerSnapshotObserver.observeLayoutModifierSnapshotReads$ui_release$default(OwnerSnapshotObserver.kt:90)
at androidx.compose.ui.node.LayoutNodeLayoutDelegate$LookaheadPassDelegate.placeAt-f8xVGno(LayoutNodeLayoutDelegate.kt:1315)
at androidx.compose.ui.layout.Placeable.access$placeAt-f8xVGno(Placeable.kt:34)
at androidx.compose.ui.layout.Placeable$PlacementScope.place-70tqf50(Placeable.kt:463)
at androidx.compose.ui.layout.Placeable$PlacementScope.place-70tqf50$default(Placeable.kt:231)
at androidx.compose.foundation.layout.BoxKt.placeInBox(Box.kt:185)
at androidx.compose.foundation.layout.BoxKt.access$placeInBox(Box.kt:1)
at androidx.compose.foundation.layout.BoxKt$boxMeasurePolicy$1$2.invoke(Box.kt:125)
at androidx.compose.foundation.layout.BoxKt$boxMeasurePolicy$1$2.invoke(Box.kt:124)
at androidx.compose.ui.layout.MeasureScope$layout$1.placeChildren(MeasureScope.kt:70)
at androidx.compose.ui.layout.LayoutNodeSubcompositionsState$createMeasurePolicy$1$measure-3p2s80s$$inlined$createMeasureResult$2.placeChildren(SubcomposeLayout.kt:951)
at androidx.compose.ui.node.LayoutNodeLayoutDelegate$LookaheadPassDelegate$layoutChildren$1.invoke(LayoutNodeLayoutDelegate.kt:1093)
at androidx.compose.ui.node.LayoutNodeLayoutDelegate$LookaheadPassDelegate$layoutChildren$1.invoke(LayoutNodeLayoutDelegate.kt:1088)
at androidx.compose.runtime.snapshots.Snapshot$Companion.observe(Snapshot.kt:2303)
at androidx.compose.runtime.snapshots.SnapshotStateObserver$ObservedScopeMap.observe(SnapshotStateObserver.kt:496)
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.OwnerSnapshotObserver.observeLayoutSnapshotReads$ui_release(OwnerSnapshotObserver.kt:81)
at androidx.compose.ui.node.OwnerSnapshotObserver.observeLayoutSnapshotReads$ui_release$default(OwnerSnapshotObserver.kt:75)
at androidx.compose.ui.node.LayoutNodeLayoutDelegate$LookaheadPassDelegate.layoutChildren(LayoutNodeLayoutDelegate.kt:1088)
at androidx.compose.ui.node.LayoutNodeLayoutDelegate$LookaheadPassDelegate.onNodePlaced$ui_release(LayoutNodeLayoutDelegate.kt:1470)
at androidx.compose.ui.node.InnerNodeCoordinator$LookaheadDelegateImpl.placeChildren(InnerNodeCoordinator.kt:97)
at androidx.compose.ui.node.LookaheadDelegate.placeAt-f8xVGno(LookaheadDelegate.kt:156)
08:33:23.340 Crash app.symfonik.music.player.debug E at androidx.compose.ui.layout.Placeable.access$placeAt-f8xVGno(Placeable.kt:34)
at androidx.compose.ui.layout.Placeable$PlacementScope.place-70tqf50(Placeable.kt:463)
at androidx.compose.ui.layout.Placeable$PlacementScope.place-70tqf50$default(Placeable.kt:231)
at androidx.compose.ui.node.LayoutNodeLayoutDelegate$LookaheadPassDelegate$placeAt$1.invoke(LayoutNodeLayoutDelegate.kt:1317)
at androidx.compose.ui.node.LayoutNodeLayoutDelegate$LookaheadPassDelegate$placeAt$1.invoke(LayoutNodeLayoutDelegate.kt:1315)
at androidx.compose.runtime.snapshots.Snapshot$Companion.observe(Snapshot.kt:2303)
at androidx.compose.runtime.snapshots.SnapshotStateObserver$ObservedScopeMap.observe(SnapshotStateObserver.kt:496)
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.OwnerSnapshotObserver.observeLayoutModifierSnapshotReads$ui_release(OwnerSnapshotObserver.kt:96)
at androidx.compose.ui.node.OwnerSnapshotObserver.observeLayoutModifierSnapshotReads$ui_release$default(OwnerSnapshotObserver.kt:90)
at androidx.compose.ui.node.LayoutNodeLayoutDelegate$LookaheadPassDelegate.placeAt-f8xVGno(LayoutNodeLayoutDelegate.kt:1315)
at androidx.compose.ui.layout.Placeable.access$placeAt-f8xVGno(Placeable.kt:34)
at androidx.compose.ui.layout.Placeable$PlacementScope.place-70tqf50(Placeable.kt:463)
at androidx.compose.ui.layout.Placeable$PlacementScope.place-70tqf50$default(Placeable.kt:231)
at androidx.compose.foundation.layout.BoxKt.placeInBox(Box.kt:185)
at androidx.compose.foundation.layout.BoxKt.access$placeInBox(Box.kt:1)
at androidx.compose.foundation.layout.BoxKt$boxMeasurePolicy$1$2.invoke(Box.kt:125)
at androidx.compose.foundation.layout.BoxKt$boxMeasurePolicy$1$2.invoke(Box.kt:124)
at androidx.compose.ui.layout.MeasureScope$layout$1.placeChildren(MeasureScope.kt:70)
at androidx.compose.ui.node.LayoutNodeLayoutDelegate$LookaheadPassDelegate$layoutChildren$1.invoke(LayoutNodeLayoutDelegate.kt:1093)
at androidx.compose.ui.node.LayoutNodeLayoutDelegate$LookaheadPassDelegate$layoutChildren$1.invoke(LayoutNodeLayoutDelegate.kt:1088)
at androidx.compose.runtime.snapshots.Snapshot$Companion.observe(Snapshot.kt:2303)
at androidx.compose.runtime.snapshots.SnapshotStateObserver$ObservedScopeMap.observe(SnapshotStateObserver.kt:496)
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.OwnerSnapshotObserver.observeLayoutSnapshotReads$ui_release(OwnerSnapshotObserver.kt:81)
at androidx.compose.ui.node.OwnerSnapshotObserver.observeLayoutSnapshotReads$ui_release$default(OwnerSnapshotObserver.kt:75)
at androidx.compose.ui.node.LayoutNodeLayoutDelegate$LookaheadPassDelegate.layoutChildren(LayoutNodeLayoutDelegate.kt:1088)
at androidx.compose.ui.node.LayoutNodeLayoutDelegate$LookaheadPassDelegate.onNodePlaced$ui_release(LayoutNodeLayoutDelegate.kt:1470)
at androidx.compose.ui.node.InnerNodeCoordinator$LookaheadDelegateImpl.placeChildren(InnerNodeCoordinator.kt:97)
at androidx.compose.ui.node.LookaheadDelegate.placeAt-f8xVGno(LookaheadDelegate.kt:156)
at androidx.compose.ui.layout.Placeable.access$placeAt-f8xVGno(Placeable.kt:34)
at androidx.compose.ui.layout.Placeable$PlacementScope.place-70tqf50(Placeable.kt:463)
at androidx.compose.ui.layout.Placeable$PlacementScope.place-70tqf50$default(Placeable.kt:231)
at androidx.compose.ui.node.LayoutNodeLayoutDelegate$LookaheadPassDelegate$placeAt$1.invoke(LayoutNodeLayoutDelegate.kt:1317)
at androidx.compose.ui.node.LayoutNodeLayoutDelegate$LookaheadPassDelegate$placeAt$1.invoke(LayoutNodeLayoutDelegate.kt:1315)
at androidx.compose.runtime.snapshots.Snapshot$Companion.observe(Snapshot.kt:2303)
08:33:23.348 Crash app.symfonik.music.player.debug E at androidx.compose.runtime.snapshots.SnapshotStateObserver$ObservedScopeMap.observe(SnapshotStateObserver.kt:496)
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.OwnerSnapshotObserver.observeLayoutModifierSnapshotReads$ui_release(OwnerSnapshotObserver.kt:96)
at androidx.compose.ui.node.OwnerSnapshotObserver.observeLayoutModifierSnapshotReads$ui_release$default(OwnerSnapshotObserver.kt:90)
at androidx.compose.ui.node.LayoutNodeLayoutDelegate$LookaheadPassDelegate.placeAt-f8xVGno(LayoutNodeLayoutDelegate.kt:1315)
at androidx.compose.ui.layout.Placeable.access$placeAt-f8xVGno(Placeable.kt:34)
at androidx.compose.ui.layout.Placeable$PlacementScope.placeWithLayer-aW-9-wM(Placeable.kt:489)
at androidx.compose.ui.layout.Placeable$PlacementScope.placeWithLayer-aW-9-wM$default(Placeable.kt:320)
at androidx.compose.foundation.lazy.LazyListMeasuredItem.place(LazyListMeasuredItem.kt:182)
at androidx.compose.foundation.lazy.LazyListMeasureKt$measureLazyList$8.invoke(LazyListMeasure.kt:353)
at androidx.compose.foundation.lazy.LazyListMeasureKt$measureLazyList$8.invoke(LazyListMeasure.kt:350)
at androidx.compose.ui.layout.MeasureScope$layout$1.placeChildren(MeasureScope.kt:70)
at androidx.compose.foundation.lazy.LazyListMeasureResult.placeChildren(Unknown Source:2)
at androidx.compose.ui.layout.LayoutNodeSubcompositionsState$createMeasurePolicy$1$measure-3p2s80s$$inlined$createMeasureResult$2.placeChildren(SubcomposeLayout.kt:951)
at androidx.compose.ui.node.LayoutNodeLayoutDelegate$LookaheadPassDelegate$layoutChildren$1.invoke(LayoutNodeLayoutDelegate.kt:1093)
at androidx.compose.ui.node.LayoutNodeLayoutDelegate$LookaheadPassDelegate$layoutChildren$1.invoke(LayoutNodeLayoutDelegate.kt:1088)
at androidx.compose.runtime.snapshots.Snapshot$Companion.observe(Snapshot.kt:2303)
at androidx.compose.runtime.snapshots.SnapshotStateObserver$ObservedScopeMap.observe(SnapshotStateObserver.kt:496)
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.OwnerSnapshotObserver.observeLayoutSnapshotReads$ui_release(OwnerSnapshotObserver.kt:81)
at androidx.compose.ui.node.OwnerSnapshotObserver.observeLayoutSnapshotReads$ui_release$default(OwnerSnapshotObserver.kt:75)
at androidx.compose.ui.node.LayoutNodeLayoutDelegate$LookaheadPassDelegate.layoutChildren(LayoutNodeLayoutDelegate.kt:1088)
at androidx.compose.ui.node.LayoutNodeLayoutDelegate$LookaheadPassDelegate.onNodePlaced$ui_release(LayoutNodeLayoutDelegate.kt:1470)
at androidx.compose.ui.node.InnerNodeCoordinator$LookaheadDelegateImpl.placeChildren(InnerNodeCoordinator.kt:97)
at androidx.compose.ui.node.LookaheadDelegate.placeAt-f8xVGno(LookaheadDelegate.kt:156)
at androidx.compose.ui.layout.Placeable.access$placeAt-f8xVGno(Placeable.kt:34)
at androidx.compose.ui.layout.Placeable$PlacementScope.place(Placeable.kt:460)
at androidx.compose.ui.layout.Placeable$PlacementScope.place$default(Placeable.kt:218)
at androidx.compose.foundation.AndroidOverscrollKt$StretchOverscrollNonClippingLayer$2$1.invoke(AndroidOverscroll.kt:589)
at androidx.compose.foundation.AndroidOverscrollKt$StretchOverscrollNonClippingLayer$2$1.invoke(AndroidOverscroll.kt:588)
at androidx.compose.ui.layout.MeasureScope$layout$1.placeChildren(MeasureScope.kt:70)
at androidx.compose.ui.node.LookaheadDelegate.placeChildren(LookaheadDelegate.kt:178)
at androidx.compose.ui.node.LookaheadDelegate.placeAt-f8xVGno(LookaheadDelegate.kt:156)
at androidx.compose.ui.layout.Placeable.access$placeAt-f8xVGno(Placeable.kt:34)
at androidx.compose.ui.layout.Placeable$PlacementScope.placeWithLayer(Placeable.kt:486)
08:33:23.353 Crash app.symfonik.music.player.debug E at androidx.compose.ui.layout.Placeable$PlacementScope.placeWithLayer$default(Placeable.kt:299)
at androidx.compose.foundation.AndroidOverscrollKt$StretchOverscrollNonClippingLayer$1$1.invoke(AndroidOverscroll.kt:577)
at androidx.compose.foundation.AndroidOverscrollKt$StretchOverscrollNonClippingLayer$1$1.invoke(AndroidOverscroll.kt:570)
at androidx.compose.ui.layout.MeasureScope$layout$1.placeChildren(MeasureScope.kt:70)
at androidx.compose.ui.node.LookaheadDelegate.placeChildren(LookaheadDelegate.kt:178)
at androidx.compose.ui.node.LookaheadDelegate.placeAt-f8xVGno(LookaheadDelegate.kt:156)
at androidx.compose.ui.layout.Placeable.access$placeAt-f8xVGno(Placeable.kt:34)
at androidx.compose.ui.layout.Placeable$PlacementScope.placeWithLayer(Placeable.kt:486)
at androidx.compose.ui.layout.Placeable$PlacementScope.placeWithLayer$default(Placeable.kt:299)
at androidx.compose.ui.graphics.SimpleGraphicsLayerModifier$measure$1.invoke(GraphicsLayerModifier.kt:648)
at androidx.compose.ui.graphics.SimpleGraphicsLayerModifier$measure$1.invoke(GraphicsLayerModifier.kt:647)
at androidx.compose.ui.layout.MeasureScope$layout$1.placeChildren(MeasureScope.kt:70)
at androidx.compose.ui.node.LookaheadDelegate.placeChildren(LookaheadDelegate.kt:178)
at androidx.compose.ui.node.LookaheadDelegate.placeAt-f8xVGno(LookaheadDelegate.kt:156)
at androidx.compose.ui.layout.Placeable.access$placeAt-f8xVGno(Placeable.kt:34)
at androidx.compose.ui.layout.Placeable$PlacementScope.place-70tqf50(Placeable.kt:463)
at androidx.compose.ui.layout.Placeable$PlacementScope.place-70tqf50$default(Placeable.kt:231)
at androidx.compose.ui.node.LayoutNodeLayoutDelegate$LookaheadPassDelegate$placeAt$1.invoke(LayoutNodeLayoutDelegate.kt:1317)
at androidx.compose.ui.node.LayoutNodeLayoutDelegate$LookaheadPassDelegate$placeAt$1.invoke(LayoutNodeLayoutDelegate.kt:1315)
at androidx.compose.runtime.snapshots.Snapshot$Companion.observe(Snapshot.kt:2303)
at androidx.compose.runtime.snapshots.SnapshotStateObserver$ObservedScopeMap.observe(SnapshotStateObserver.kt:496)
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.OwnerSnapshotObserver.observeLayoutModifierSnapshotReads$ui_release(OwnerSnapshotObserver.kt:96)
at androidx.compose.ui.node.OwnerSnapshotObserver.observeLayoutModifierSnapshotReads$ui_release$default(OwnerSnapshotObserver.kt:90)
at androidx.compose.ui.node.LayoutNodeLayoutDelegate$LookaheadPassDelegate.placeAt-f8xVGno(LayoutNodeLayoutDelegate.kt:1315)
at androidx.compose.ui.node.LayoutNodeLayoutDelegate$LookaheadPassDelegate.replace(LayoutNodeLayoutDelegate.kt:1552)
at androidx.compose.ui.node.LayoutNode.lookaheadReplace$ui_release(LayoutNode.kt:926)
at androidx.compose.ui.node.MeasureAndLayoutDelegate.measureAndLayout-0kLqBqw(MeasureAndLayoutDelegate.kt:413)
at androidx.compose.ui.platform.AndroidComposeView.measureAndLayout-0kLqBqw(AndroidComposeView.android.kt:966)
at androidx.compose.ui.node.LayoutNode.forceRemeasure(LayoutNode.kt:1221)
at androidx.compose.foundation.lazy.LazyListState.onScroll$foundation_release(LazyListState.kt:318)
at androidx.compose.foundation.lazy.LazyListState$scrollableState$1.invoke(LazyListState.kt:179)
at androidx.compose.foundation.lazy.LazyListState$scrollableState$1.invoke(LazyListState.kt:179)
at androidx.compose.foundation.gestures.DefaultScrollableState$scrollScope$1.scrollBy(ScrollableState.kt:166)
at androidx.compose.foundation.gestures.ScrollingLogic$dispatchScroll$performScroll$1.invoke-MK-Hz9U(Scrollable.kt:762)
at androidx.compose.foundation.gestures.ScrollingLogic$dispatchScroll$performScroll$1.invoke(Scrollable.kt:752)
at androidx.compose.foundation.AndroidEdgeEffectOverscrollEffect.applyToScroll-Rhakbz0(AndroidOverscroll.kt:184)
at androidx.compose.foundation.gestures.ScrollingLogic.dispatchScroll-3eAAhYA(Scrollable.kt:778)
08:33:23.355 Crash app.symfonik.music.player.debug E at androidx.compose.foundation.gestures.ScrollingLogic$doFlingAnimation$2$outerScopeScroll$1.invoke-MK-Hz9U(Scrollable.kt:833)
at androidx.compose.foundation.gestures.ScrollingLogic$doFlingAnimation$2$outerScopeScroll$1.invoke(Scrollable.kt:832)
at androidx.compose.foundation.gestures.ScrollingLogic$doFlingAnimation$2$scope$1.scrollBy(Scrollable.kt:837)
at androidx.compose.foundation.gestures.DefaultFlingBehavior$performFling$2$1.invoke(Scrollable.kt:967)
at androidx.compose.foundation.gestures.DefaultFlingBehavior$performFling$2$1.invoke(Scrollable.kt:965)
at androidx.compose.animation.core.SuspendAnimationKt.doAnimationFrame(SuspendAnimation.kt:361)
at androidx.compose.animation.core.SuspendAnimationKt.doAnimationFrameWithScale(SuspendAnimation.kt:339)
at androidx.compose.animation.core.SuspendAnimationKt.access$doAnimationFrameWithScale(SuspendAnimation.kt:1)
at androidx.compose.animation.core.SuspendAnimationKt$animate$9.invoke(SuspendAnimation.kt:279)
at androidx.compose.animation.core.SuspendAnimationKt$animate$9.invoke(SuspendAnimation.kt:278)
at androidx.compose.animation.core.SuspendAnimationKt$callWithFrameNanos$2.invoke(SuspendAnimation.kt:304)
at androidx.compose.animation.core.SuspendAnimationKt$callWithFrameNanos$2.invoke(SuspendAnimation.kt:303)
at androidx.compose.runtime.BroadcastFrameClock$FrameAwaiter.resume(BroadcastFrameClock.kt:42)
at androidx.compose.runtime.BroadcastFrameClock.sendFrame(BroadcastFrameClock.kt:71)
at androidx.compose.runtime.Recomposer$runRecomposeAndApplyChanges$2$1.invoke(Recomposer.kt:555)
at androidx.compose.runtime.Recomposer$runRecomposeAndApplyChanges$2$1.invoke(Recomposer.kt:548)
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:1229)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1239)
at android.view.Choreographer.doCallbacks(Choreographer.java:899)
at android.view.Choreographer.doFrame(Choreographer.java:827)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1214)
at android.os.Handler.handleCallback(Handler.java:942)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7918)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
jo...@google.com <jo...@google.com> #6
#5, can you give us an isolated repro?
04...@mail.ru <04...@mail.ru> #7
04...@mail.ru <04...@mail.ru> #8
jo...@google.com <jo...@google.com> #9
#8, can you please share an isolated repro with us? Thanks!
04...@mail.ru <04...@mail.ru> #10
Scaffold inside another Scaffold
SwipeToDismiss with animation
Delete items quickly from the center of a large list.
I will be waiting for feedback.
The main code is located in fun Screen1()
jo...@google.com <jo...@google.com> #11
Thank you, this is very helpful! We will take a look.
04...@mail.ru <04...@mail.ru> #12
jo...@google.com <jo...@google.com>
04...@mail.ru <04...@mail.ru> #13
in androidx.compose.material3:material3-android:1.2.0-alpha10 the error is reproduced instantly, the previous version is more stable
ap...@google.com <ap...@google.com> #14
Branch: androidx-main
commit 8e2e8a6e390fe188f013f1e6b45bb1af3aa3e488
Author: Jossi Wolf <jossiwolf@google.com>
Date: Mon Oct 23 12:09:34 2023
[M3] Report SwipeToDismiss Anchors from Lookahead pass
Previously, we were not reporting the anchors for SwipeToDismiss from lookahead measure, causing issues for scenarios where lookahead place ran before main measure. This could cause issues with Lookahead + Lazy.
Test: swipeToDismiss_reportsAnchors_inNestedLazyAndLookahead
Relnote: Fixed an issue where SwipeToDismiss would crash in certain scenarios with nested Lookahead and Lazy layouts.
Bug: 297226562
Change-Id: Ica8d19764426a0b8d6f7033a03d28687eab77d17
M compose/material3/material3/src/androidInstrumentedTest/kotlin/androidx/compose/material3/SwipeToDismissTest.kt
M compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/SwipeToDismissBox.kt
gl...@gmail.com <gl...@gmail.com> #15
I think this has been fixed in the latest compose version 1.2.0-beta
04...@mail.ru <04...@mail.ru> #16
This is very good news. I'll try it if of course the library is already available. I will write about results later.
Description
Jetpack Compose version:
Jetpack Compose component(s) used:
Android Studio Build: Build #AI-223.8836.35.2231.10671973, built on August 17, 2023
Kotlin version: 1.9.0
Code snippet to reproduce this issue:
Stack trace (if applicable):