Sagar Khurana
02/24/2026, 11:45 AMArrayIndexOutOfBoundsException in LazyStaggeredGridMeasure during LookaheadPass with StaggeredGridCells.Adaptive inside AnimatedPane
50+ crashes for 41 users in the last 7 daysSagar Khurana
02/24/2026, 11:47 AMkotlin.ArrayIndexOutOfBoundsException at LazyStaggeredGridMeasure.kt:269
Setup:
- LazyVerticalStaggeredGrid(columns = StaggeredGridCells.Adaptive(150.dp))
- Hosted in ListDetailPaneScaffold -> AnimatedPane
- Crash commonly occurs on back navigation (Detail -> Home)
Top of stack:
ThrowArrayIndexOutOfBoundsException (RuntimeUtils.kt:41)
LazyStaggeredGridMeasure.measure (LazyStaggeredGridMeasure.kt:269)
rememberStaggeredGridMeasurePolicy (LazyStaggeredGridMeasure.kt:184)
LazyLayout (Composer.kt:189)
InnerNodeCoordinator.LookaheadDelegateImpl.measure (MeasurePolicy.kt:88)
CupertinoOverscrollNode.measure (Measurable.kt:30)
LayoutModifierNodeCoordinator.LookaheadDelegateForLayoutModifierNode.measure
LookaheadPassDelegate.remeasure (OwnerSnapshotObserver.kt:138)
LookaheadPassDelegate.measure (LookaheadPassDelegate.kt:404)
BoxMeasurePolicy.measure (Measurable.kt:30)
No app code at throw site, entirely within Compose framework.
Questions:
1) Is this a known issue for LookaheadScope + LazyVerticalStaggeredGrid + Adaptive columns on iOS?
2) Is there an existing issue ID / planned fix?
3) Should staggered grid measure guard lane-count changes across lookahead/actual passes?