What is the cause for this crash? This happens whe...
# compose
s
What is the cause for this crash? This happens when I click on a LazyColumn item to navigate to a Composable screen destination, it happens randomly..
Copy code
java.util.NoSuchElementException: Key LayoutNode@8c58436 children: 0 measurePolicy: androidx.compose.ui.node.LayoutNode$Companion$ErrorMeasurePolicy$1@2c7a10a is missing in the map.
        at kotlin.collections.MapsKt__MapWithDefaultKt.getOrImplicitDefaultNullable(MapWithDefault.kt:24)
        at kotlin.collections.MapsKt__MapsKt.getValue(Maps.kt:344)
        at androidx.compose.ui.layout.SubcomposeLayoutState.takeNodeFromReusables(SubcomposeLayout.kt:297)
        at androidx.compose.ui.layout.SubcomposeLayoutState.precompose(SubcomposeLayout.kt:380)
        at androidx.compose.foundation.lazy.LazyListPrefetcher.subcompose(LazyListPrefetcher.android.kt:198)
        at androidx.compose.foundation.lazy.LazyListPrefetcher.run(LazyListPrefetcher.android.kt:170)
        at android.os.Handler.handleCallback(Handler.java:938)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loop(Looper.java:223)
        at android.app.ActivityThread.main(ActivityThread.java:7660)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
d
Hah! I just upgraded to beta08 today and had the similar looking bug, but in
Swipeable
, and the key was a simple 'Float' value. Otherwise it looked the same. Also happened randomly. Not sure if this is a coincidence.
👍 1
a
d
@Andrey Kulikov Hi! I have a similar looking crash randomly reproducing in
Swipeable
, after leaving and entering an app on Android 11 (seemingly). This is
beta09
.
Copy code
Fatal Exception: java.util.NoSuchElementException: Key 337.99997 is missing in the map.
       at kotlin.collections.MapsKt__MapWithDefaultKt.getOrImplicitDefaultNullable(MapsKt__MapWithDefaultKt.java:24)
       at kotlin.collections.MapsKt__MapsKt.getValue(MapsKt__MapsKt.java:344)
       at androidx.compose.material.SwipeableState.getProgress(SwipeableState.java:275)
       at ru.myapp.main.PortfolioMainController.ContentReadyState(PortfolioMainController.java:153)
Can this be related somehow?
a
No, this one is different. Please file a bug if you don’t mind
👌 1
d