Crash in [@ java.lang.IllegalStateException: at androidx.compose.ui.node.LookaheadCapablePlaceable.layout(LookaheadDelegate.kt:38)]
Categories
(Firefox for Android :: Homepage, defect, P1)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox124 | --- | unaffected |
| firefox125 | --- | unaffected |
| firefox126 | + | fixed |
People
(Reporter: dmeehan, Assigned: towhite)
References
(Regression)
Details
(Keywords: crash, regression, regressionwindow-wanted, Whiteboard: [fxdroid][group2])
Crash Data
Attachments
(1 file)
Crash report: https://crash-stats.mozilla.org/report/index/04aaa2cd-42bc-4528-8512-84d2e0240402
Java stack trace:
java.lang.IllegalStateException
at androidx.compose.ui.node.LookaheadCapablePlaceable.layout(LookaheadDelegate.kt:38)
at org.mozilla.fenix.compose.StaggeredHorizontalGridKt$StaggeredHorizontalGrid$1$1.measure-3p2s80s(StaggeredHorizontalGrid.kt:210)
at androidx.compose.ui.node.InnerNodeCoordinator.measure-BRTryo0(InnerNodeCoordinator.kt:39)
at androidx.compose.ui.node.LayoutNodeLayoutDelegate$performMeasureBlock$1.invoke(LayoutNodeLayoutDelegate.kt:9)
at androidx.compose.runtime.snapshots.Snapshot$Companion.observe(Snapshot.kt:60)
at androidx.compose.runtime.snapshots.SnapshotStateObserver$ObservedScopeMap.observe(SnapshotStateObserver.kt:48)
at androidx.compose.runtime.snapshots.SnapshotStateObserver.observeReads(SnapshotStateObserver.kt:154)
at androidx.compose.ui.node.OwnerSnapshotObserver.observeReads$ui_release(OwnerSnapshotObserver.kt:3)
at androidx.compose.ui.node.LayoutNodeLayoutDelegate$MeasurePassDelegate.remeasure-BRTryo0(LayoutNodeLayoutDelegate.kt:108)
at androidx.compose.ui.node.LayoutNodeLayoutDelegate$MeasurePassDelegate.measure-BRTryo0(LayoutNodeLayoutDelegate.kt:104)
at androidx.compose.foundation.layout.BoxMeasurePolicy.measure-3p2s80s(Box.kt:113)
at androidx.compose.ui.node.InnerNodeCoordinator.measure-BRTryo0(InnerNodeCoordinator.kt:39)
at androidx.compose.foundation.layout.FillNode.measure-3p2s80s(Size.kt:101)
at androidx.compose.ui.node.LayoutModifierNodeCoordinator.measure-BRTryo0(LayoutModifierNodeCoordinator.kt:15)
at androidx.compose.ui.node.LayoutNodeLayoutDelegate$performMeasureBlock$1.invoke(LayoutNodeLayoutDelegate.kt:9)
at androidx.compose.runtime.snapshots.Snapshot$Companion.observe(Snapshot.kt:60)
at androidx.compose.runtime.snapshots.SnapshotStateObserver$ObservedScopeMap.observe(SnapshotStateObserver.kt:48)
at androidx.compose.runtime.snapshots.SnapshotStateObserver.observeReads(SnapshotStateObserver.kt:154)
at androidx.compose.ui.node.OwnerSnapshotObserver.observeReads$ui_release(OwnerSnapshotObserver.kt:3)
at androidx.compose.ui.node.LayoutNodeLayoutDelegate$MeasurePassDelegate.remeasure-BRTryo0(LayoutNodeLayoutDelegate.kt:108)
at androidx.compose.ui.node.LayoutNodeLayoutDelegate$MeasurePassDelegate.measure-BRTryo0(LayoutNodeLayoutDelegate.kt:104)
at androidx.compose.foundation.layout.RowColumnMeasurementHelper.measureWithoutPlacing-_EkL_-Y(RowColumnMeasurementHelper.kt:116)
at androidx.compose.foundation.layout.RowColumnMeasurePolicy.measure-3p2s80s(RowColumnImpl.kt:45)
at androidx.compose.ui.node.InnerNodeCoordinator.measure-BRTryo0(InnerNodeCoordinator.kt:39)
at androidx.compose.ui.node.LayoutNodeLayoutDelegate$performMeasureBlock$1.invoke(LayoutNodeLayoutDelegate.kt:9)
at androidx.compose.runtime.snapshots.Snapshot$Companion.observe(Snapshot.kt:60)
at androidx.compose.runtime.snapshots.SnapshotStateObserver$ObservedScopeMap.observe(SnapshotStateObserver.kt:48)
at androidx.compose.runtime.snapshots.SnapshotStateObserver.observeReads(SnapshotStateObserver.kt:154)
at androidx.compose.ui.node.OwnerSnapshotObserver.observeReads$ui_release(OwnerSnapshotObserver.kt:3)
at androidx.compose.ui.node.LayoutNodeLayoutDelegate$MeasurePassDelegate.remeasure-BRTryo0(LayoutNodeLayoutDelegate.kt:108)
at androidx.compose.ui.node.LayoutNodeLayoutDelegate$MeasurePassDelegate.measure-BRTryo0(LayoutNodeLayoutDelegate.kt:104)
at androidx.compose.foundation.layout.RowColumnMeasurementHelper.measureWithoutPlacing-_EkL_-Y(RowColumnMeasurementHelper.kt:116)
at androidx.compose.foundation.layout.RowColumnMeasurePolicy.measure-3p2s80s(RowColumnImpl.kt:45)
at androidx.compose.ui.node.InnerNodeCoordinator.measure-BRTryo0(InnerNodeCoordinator.kt:39)
at androidx.compose.ui.node.LayoutNodeLayoutDelegate$performMeasureBlock$1.invoke(LayoutNodeLayoutDelegate.kt:9)
at androidx.compose.runtime.snapshots.Snapshot$Companion.observe(Snapshot.kt:60)
at androidx.compose.runtime.snapshots.SnapshotStateObserver$ObservedScopeMap.observe(SnapshotStateObserver.kt:48)
at androidx.compose.runtime.snapshots.SnapshotStateObserver.observeReads(SnapshotStateObserver.kt:154)
at androidx.compose.ui.node.OwnerSnapshotObserver.observeReads$ui_release(OwnerSnapshotObserver.kt:3)
at androidx.compose.ui.node.LayoutNodeLayoutDelegate$MeasurePassDelegate.remeasure-BRTryo0(LayoutNodeLayoutDelegate.kt:108)
at androidx.compose.ui.node.LayoutNodeLayoutDelegate$MeasurePassDelegate.measure-BRTryo0(LayoutNodeLayoutDelegate.kt:104)
at androidx.compose.ui.layout.RootMeasurePolicy.measure-3p2s80s(RootMeasurePolicy.kt:39)
at androidx.compose.ui.node.InnerNodeCoordinator.measure-BRTryo0(InnerNodeCoordinator.kt:39)
at androidx.compose.ui.node.LayoutNodeLayoutDelegate$performMeasureBlock$1.invoke(LayoutNodeLayoutDelegate.kt:9)
at androidx.compose.runtime.snapshots.Snapshot$Companion.observe(Snapshot.kt:60)
at androidx.compose.runtime.snapshots.SnapshotStateObserver$ObservedScopeMap.observe(SnapshotStateObserver.kt:48)
at androidx.compose.runtime.snapshots.SnapshotStateObserver.observeReads(Snap...
Comment 1•1 year ago
|
||
This crash looks like a regression in Fx 126.
java.lang.IllegalStateException: Size(1328 x -56) is out of range. Each dimension must be between 0 and 16777215.
| Reporter | ||
Comment 2•1 year ago
|
||
:twhite could this be triaged?
Looks like it started in 20240322093041, not sure about the regressor.
Next week is the final week of nightly for Fx126 before we go to beta.
Updated•1 year ago
|
Looking at the commits that went into build 20240322093041, the commit that stands out to me as a possible cause is Update AndroidX Compose BOM to 2024.03.00.
:mcarare wdyt?
Comment 4•1 year ago
|
||
The timeline fits with the first occurrence of the bug. That specific update has some poorly documented changes in terms of positioning for composable elements.
We do make some calculations in our custom composable StaggeredHorizontalGrid and pass the values that cause the crash so I think some assumptions those calculations are based on must have changed in the Compose update.
Thanks :mcarare. I think I've narrowed it down to this line, I believe that totalHeight is 0 and then having verticalItemsSpacingPixels subtracted, thus creating a negative number with is passed to layout which uses a checkMeasuredSize function which ultimately throws the exception we're seeing from the following block
check(width and MaxLayoutMask == 0 && height and MaxLayoutMask == 0) {
"Size($width x $height) is out of range. Each dimension must be between 0 and " +
"$MaxLayoutDimension."
}
I'll try to patch this asap
| Reporter | ||
Updated•1 year ago
|
I'm not certain of the reason (I believe a race condition in the observable state in pocketStoriesCategories) but it appears that we are attempting to use an empty categories list to populate the 'topic categories' Composable thus creating the negative value detailed in comment 5.
For any potential reviewer, there are STR in code - replace categories here with an emptyList() and the same error log will be generated when run and scrolled. Note categories may need logging or used in some capacity in order to build
Comment 9•1 year ago
|
||
Copying crash signatures from duplicate bugs.
Comment 10•1 year ago
|
||
Comment 11•1 year ago
|
||
| bugherder | ||
| Comment hidden (Intermittent Failures Robot) |
Description
•