Has anyone encountered this iOS-only crash with `L...
# multiplatform
s
Has anyone encountered this iOS-only crash with
LazyVerticalStaggeredGrid
+ Paging3? Crash:
kotlin.NoSuchElementException
in
SortedSet.nonJvm.kt:98
-
removeLast()
called on empty list Context: - Crash happens 1-2 seconds after launch when scrolling a
LazyVerticalStaggeredGrid
- Using Paging3 with
collectAsLazyPagingItems()
- Crash is in framework code (
compose-multiplatform-core
), not app code - Android works fine with identical code Versions: - Compose Multiplatform: 1.9.3 - Kotlin: 2.2.21 - Paging Compose: 3.4.0-alpha03 - Device: iPhone 16 Pro (iPhone18,3), iOS 18.1 Stack trace:
Copy code
kotlin.NoSuchElementException
  kfun:kotlin.collections#removeLast (MutableCollections.kt:257)
  kfun:androidx.compose.ui.node.SortedSet#remove (SortedSet.nonJvm.kt:98)
  kfun:androidx.compose.ui.node.DepthSortedSet#remove (DepthSortedSet.kt:78)
  kfun:androidx.compose.ui.node.MeasureAndLayoutDelegate#onNodeDetached (MeasureAndLayoutDelegate.kt:755)
  ...
  kfun:androidx.compose.foundation.lazy.staggeredgrid.LazyStaggeredGridState.onScroll (LazyStaggeredGridState.kt:312)
The crash flow: scroll gesture →
onScroll
forceRemeasure()
subcompose()
LayoutNode.detach()
DepthSortedSet.remove()
SortedSet.remove()
removeLast()
on empty list I couldn't find an existing issue for this. Has anyone seen this or know of a workaround? Planning to file on YouTrack if this is new.
i
CMP-8935 "NoSuchElementException: List is empty" when detaching LayoutNode
this crash is blocking my iOS app release 😢
@Ivan Matkov Is the fix release already released for the above issue?
Any ETA on when the
1.10.0-rc02
with the fix will drop?
cc @Ekaterina Zaitseva
e
Hi! Thank you for sharing your case. ETA for
1.10.0-rc02
~ today/tomorrow, in an exceptional case - next week
s
Is there a workaround for this fix without waiting for
1.10.0-rc02
next week in case of an exceptional case? As it's blocking my v1 release for the Apple App Store and thanks for the responsive replies 🙏
i
This fix is a workaround itself for the issue in stdlib. Nothing to do aside for update from app side. But I don't think that it will be an "exceptional case": This version is already built and you can use it from our dev repo (not maven central) even now
1
🙏 1
s
thank you frog thank you frog thank you frog
e
1.10.0-rc02 released
👀 1
s
I'm working on it, testing against the new version. Hopefully, it doesn't crash now
thank you color 1
Its not crashing at all!!! Thanks a bunch 🙌
🎉 3
thank you color 1