Hii, Im facing this Crash - iOS fatal: `ArrayIndex...
# compose
s
Hii, Im facing this Crash - iOS fatal:
ArrayIndexOutOfBoundsException
in LazyStaggeredGridMeasure during LookaheadPass with StaggeredGridCells.Adaptive inside AnimatedPane
50+ crashes for 41 users in the last 7 days
We're hitting a fatal crash in production on iOS (Compose Multiplatform 1.10.1, Compose Foundation 1.10.1):
Copy code
kotlin.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:
Copy code
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?