https://kotlinlang.org logo
#compose
Title
# compose
g

Gabriel

03/01/2021, 9:58 PM
I'm having a weird crash, an alert dialog with a textfield and some state to decide whether the alert is open, dismissing the dialog without editing anything in the textfield works ok, after I edit the textfield dismissing the dialog crashes the app
Copy code
java.lang.ArrayIndexOutOfBoundsException: length=5120; index=-2
        at androidx.compose.runtime.SlotTableKt.groupSize(SlotTable.kt:2558)
Copy code
2021-03-01 21:57:37.057 6327-6327/co.g403.sushigoscoretracker E/AndroidRuntime: FATAL EXCEPTION: main
    Process: co.g403.sushigoscoretracker, PID: 6327
    java.lang.ArrayIndexOutOfBoundsException: length=5120; index=-2
        at androidx.compose.runtime.SlotTableKt.groupSize(SlotTable.kt:2558)
        at androidx.compose.runtime.SlotTableKt.access$groupSize(SlotTable.kt:1)
        at androidx.compose.runtime.SlotReader.groupSize(SlotTable.kt:596)
        at androidx.compose.runtime.ComposerImpl.recomposeToGroupEnd(Composer.kt:2215)
        at androidx.compose.runtime.ComposerImpl.skipCurrentGroup(Composer.kt:2499)
        at androidx.compose.runtime.ComposerImpl.recompose$runtime_release(Composer.kt:2625)
        at androidx.compose.runtime.CompositionImpl.recompose(Composition.kt:406)
        at androidx.compose.runtime.Recomposer.performRecompose(Recomposer.kt:724)
        at androidx.compose.runtime.Recomposer.access$performRecompose(Recomposer.kt:100)
        at androidx.compose.runtime.Recomposer$runRecomposeAndApplyChanges$2$2.invoke(Recomposer.kt:437)
        at androidx.compose.runtime.Recomposer$runRecomposeAndApplyChanges$2$2.invoke(Recomposer.kt:411)
        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:112)
        at androidx.compose.ui.platform.AndroidUiDispatcher.access$performFrameDispatch(AndroidUiDispatcher.android.kt:43)
        at androidx.compose.ui.platform.AndroidUiDispatcher$dispatchCallback$1.doFrame(AndroidUiDispatcher.android.kt:72)
        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:7656)
        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)
2021-03-01 21:57:37.107 6327-6327/co.g403.sushigoscoretracker I/Process: Sending signal. PID: 6327 SIG: 9
i

itnoles

03/01/2021, 10:56 PM
I seen this errors before when I was trying to dismiss keyboard from textfields
g

Gabriel

03/01/2021, 10:59 PM
Did you figure out the issue?
s

steelahhh

03/02/2021, 6:55 AM
Should have been fixed already, and the fix will probably get into beta02 https://issuetracker.google.com/issues/180124293
g

Gabriel

03/02/2021, 8:39 AM
Nice!!
j

JulianK

03/15/2021, 12:54 PM
Well seems it didn't get into beta02 😞 Still in alpha11 because of this, but i guess i will replace those Dialogs so i can upgrade.. Edit: Android Studio tricked me! Of course it's fixed. Thank you, compose team 🙏
g

Gabriel

03/15/2021, 2:17 PM
I was about to say, it's fixed for me! :D
24 Views