Repository navigation
Conversation
The app crashed with "LayoutNode N not found in RectList" while the transcript scrolled (Play: about 250 users across ~48 groups on 0.7.0 and 0.8.0). Compose UI 1.12.1 throws when a Row reads its children's baselines during measure while a lazy item swaps their content (b/549552303, fixed in 1.13.0). The markdown list item Row was that Row: its marker and body Boxes used alignByBaseline(). Both sides now align by the first baseline their Text reports in onTextLayout, so the Row no longer queries alignment lines and the marker still sits on the text's first baseline. Verified: scripts/check.sh passes; on the emulator with session-lab, before/after screenshots of bulleted, numbered, nested and task lists (light and dark, font scale 1.0 and 2.0) are pixel-identical apart from an animating spinner; streaming the showcase replies with lists while scrolling left logcat -b crash empty.
From review: a one-line comment so the list item isn't put back on alignByBaseline() before Compose 1.13, the parity row for the Android-only alignment, and a nullable onTextLayout so other text doesn't call an empty callback. The baselines stay in snapshot state. A throwaway Robolectric test showed a plain holder misaligns the marker when the body's baseline moves without the Row being remeasured (marker 13 px, text 33 px); state keeps them aligned for one extra Row measure. Verified: scripts/check.sh passes.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The transcript crashes with "LayoutNode N not found in RectList" while scrolling. In Play's 28-day data, 48 of the 51 readable groups for this crash share one layout chain: a full-width padded Row aligned by baseline, inside a lazy transcript item. Their per-group user counts add up to about 250; that double-counts people who hit several groups.
Compose UI 1.12.1 throws when a Row reads its children's baselines during measure while a lazy item swaps their content (b/549552303). The markdown list item is the likely trigger: it is the only Row in the transcript whose marker and body used
alignByBaseline()on that chain. I couldn't reproduce the crash with the real list item, so this is likely rather than confirmed.Now both sides align by the first baseline their text reports in
onTextLayout, so the Row never queries alignment lines.Moving to Compose 1.13 is the full fix, but it needs compileSdk 37.1, which we don't have yet. The composer's fold layout (#248) has the same cause and still waits on that upgrade.
Before (dev) on the left, after on the right:
logcat -b crashstayed empty.scripts/check.shpasses.Part of #242, #243, #250 and #254.