I got ArrayIndexOutOfBoundsException in compositio...
# compose
p
I got ArrayIndexOutOfBoundsException in composition. The problem is that I do not know at which function this error occurs. I have a view with bottomSheetLayout and sometimes I got this ugly error that crash my app. More in 🧵
java.lang.ArrayIndexOutOfBoundsException: length=16; index=16 at androidx.compose.runtime.collection.IdentityArrayMap.remove(IdentityArrayMap.kt:100) at androidx.compose.runtime.RecomposeScopeImpl$end$1$2.invoke(RecomposeScopeImpl.kt:282) at androidx.compose.runtime.RecomposeScopeImpl$end$1$2.invoke(RecomposeScopeImpl.kt:271) at androidx.compose.runtime.ComposerImpl$endRestartGroup$1$1.invoke(Composer.kt:2468) at androidx.compose.runtime.ComposerImpl$endRestartGroup$1$1.invoke(Composer.kt:2468) at androidx.compose.runtime.CompositionImpl.applyChanges(Composition.kt:629) at androidx.compose.runtime.Recomposer$runRecomposeAndApplyChanges$2$2.invoke(Recomposer.kt:479) at androidx.compose.runtime.Recomposer$runRecomposeAndApplyChanges$2$2.invoke(Recomposer.kt:416) at androidx.compose.ui.platform.AndroidUiFrameClock$withFrameNanos$2$callback$1.doFrame(AndroidUiFrameClock.android.kt:34) at androidx.compose.ui.platform.AndroidUiDispatcher.performFrameDispatch(AndroidUiDispatcher.android.kt:109) at androidx.compose.ui.platform.AndroidUiDispatcher.access$performFrameDispatch(AndroidUiDispatcher.android.kt:41) at androidx.compose.ui.platform.AndroidUiDispatcher$dispatchCallback$1.doFrame(AndroidUiDispatcher.android.kt:69) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:970) at android.view.Choreographer.doCallbacks(Choreographer.java:796) at android.view.Choreographer.doFrame(Choreographer.java:727) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:957) at android.os.Handler.handleCallback(Handler.java:938) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:223) at android.app.ActivityThread.main(ActivityThread.java:7664) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
My bottomSheet has a column, that is vertically scrollable, but I do not have any list of 16 elements there. I do not know where to start in terms of debugging this thing. Any thoughts?
compose version 1.0.1
m
I have the same issue, did you fix it?
p
I updated compose constraint layout that was inside. This fixed it