Thread
#compose
    bohregard

    bohregard

    1 year ago
    What would cause this exception? I’ve narrowed it down to an ExoPlayer view, but the problem is I don’t know why it’s doing it
    java.lang.IllegalArgumentException: LayoutNode@8939720 children: 0 measurePolicy: androidx.compose.ui.viewinterop.AndroidViewHolder$toLayoutNode$5@9e67c8b is not ready. layoutState is NeedsRemeasure
            at androidx.compose.ui.node.InnerPlaceable.performDraw(InnerPlaceable.kt:119)
            at androidx.compose.ui.node.LayoutNodeWrapper.draw(LayoutNodeWrapper.kt:195)
            at androidx.compose.ui.node.ModifiedLayoutNode.performDraw(ModifiedLayoutNode.kt:80)
            at androidx.compose.ui.node.LayoutNodeWrapper.draw(LayoutNodeWrapper.kt:195)
            at androidx.compose.ui.node.ModifiedLayoutNode.performDraw(ModifiedLayoutNode.kt:80)
            at androidx.compose.ui.node.LayoutNodeWrapper.draw(LayoutNodeWrapper.kt:195)
            at androidx.compose.ui.node.LayoutNode.draw$ui_release(LayoutNode.kt:790)
            at androidx.compose.ui.node.InnerPlaceable.performDraw(InnerPlaceable.kt:122)
            at androidx.compose.ui.node.LayoutNodeWrapper.draw(LayoutNodeWrapper.kt:195)
            at androidx.compose.ui.node.LayoutNode.draw$ui_release(LayoutNode.kt:790)
            at androidx.compose.ui.node.InnerPlaceable.performDraw(InnerPlaceable.kt:122)
            at androidx.compose.ui.node.LayoutNodeWrapper$invoke$2.invoke(LayoutNodeWrapper.kt:209)
            at androidx.compose.ui.node.LayoutNodeWrapper$invoke$2.invoke(LayoutNodeWrapper.kt:208)
            at androidx.compose.runtime.snapshots.SnapshotStateObserver.observeReads(SnapshotStateObserver.kt:121)
            at androidx.compose.ui.node.OwnerSnapshotObserver.observeReads$ui_release(OwnerSnapshotObserver.kt:75)
            at androidx.compose.ui.node.LayoutNodeWrapper.invoke(LayoutNodeWrapper.kt:208)
            at androidx.compose.ui.node.LayoutNodeWrapper.invoke(LayoutNodeWrapper.kt:50)
            at androidx.compose.ui.platform.RenderNodeApi29.record(RenderNodeApi29.android.kt:156)
            at androidx.compose.ui.platform.RenderNodeLayer.updateDisplayList(RenderNodeLayer.android.kt:196)
            at androidx.compose.ui.platform.RenderNodeLayer.drawLayer(RenderNodeLayer.android.kt:177)
            at androidx.compose.ui.node.LayoutNodeWrapper.draw(LayoutNodeWrapper.kt:190)
            at androidx.compose.ui.node.ModifiedLayoutNode.performDraw(ModifiedLayoutNode.kt:80)
            at androidx.compose.ui.node.LayoutNodeWrapper.draw(LayoutNodeWrapper.kt:195)
            at androidx.compose.ui.node.LayoutNodeDrawScope.drawContent(LayoutNodeDrawScope.kt:42)
            at androidx.compose.foundation.Background.draw(Background.kt:107)
            at androidx.compose.ui.node.ModifiedDrawNode.performDraw(ModifiedDrawNode.kt:109)
            at androidx.compose.ui.node.LayoutNodeWrapper$invoke$2.invoke(LayoutNodeWrapper.kt:209)
            at androidx.compose.ui.node.LayoutNodeWrapper$invoke$2.invoke(LayoutNodeWrapper.kt:208)
            at androidx.compose.runtime.snapshots.SnapshotStateObserver.observeReads(SnapshotStateObserver.kt:121)
            at androidx.compose.ui.node.OwnerSnapshotObserver.observeReads$ui_release(OwnerSnapshotObserver.kt:75)
            at androidx.compose.ui.node.LayoutNodeWrapper.invoke(LayoutNodeWrapper.kt:208)
            at androidx.compose.ui.node.LayoutNodeWrapper.invoke(LayoutNodeWrapper.kt:50)
            at androidx.compose.ui.platform.RenderNodeApi29.record(RenderNodeApi29.android.kt:156)
            at androidx.compose.ui.platform.RenderNodeLayer.updateDisplayList(RenderNodeLayer.android.kt:196)
            at androidx.compose.ui.platform.RenderNodeLayer.drawLayer(RenderNodeLayer.android.kt:177)
            at androidx.compose.ui.node.LayoutNodeWrapper.draw(LayoutNodeWrapper.kt:190)
            at androidx.compose.ui.node.ModifiedLayoutNode.performDraw(ModifiedLayoutNode.kt:80)
            at androidx.compose.ui.node.LayoutNodeWrapper.draw(LayoutNodeWrapper.kt:195)
            at androidx.compose.ui.node.ModifiedLayoutNode.performDraw(ModifiedLayoutNode.kt:80)
            at androidx.compose.ui.node.LayoutNodeWrapper$invoke$2.invoke(LayoutNodeWrapper.kt:209)
            at androidx.compose.ui.node.LayoutNodeWrapper$invoke$2.invoke(LayoutNodeWrapper.kt:208)
            at androidx.compose.runtime.snapshots.SnapshotStateObserver.observeReads(SnapshotStateObserver.kt:121)
            at androidx.compose.ui.node.OwnerSnapshotObserver.observeReads$ui_release(OwnerSnapshotObserver.kt:75)
    Andrey Kulikov

    Andrey Kulikov

    1 year ago
    if it is possible for you to share the sources of the project where it is reproducible and file a bug with it we can try to fix it
    bohregard

    bohregard

    1 year ago
    I can try to do that. I’ve narrowed it down to setting the exoplayer’s
    player.playwhenready = true
    If I delay that by a few 100 milliseconds, it works without issues