[SOLVED] I updated Compose in my sample (<example-...
# compose
z
[SOLVED] I updated Compose in my sample (example-dogs) to 1.0.0-beta08, now if I tap 4 dogs at the same time (thus "opening 4 pages quickly"), the app crashes with the following exception (see in thread) this crash is new and was not present in 1.0.0-beta07
z
This channel has thousands of people and lots of discussions. Please post long code snippets and logs in threads.
f
👆 yes. It's like 10 pages long on mobile 😅
z
Copy code
2021-06-04 17:09:49.968 30674-30674/? E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.zhuinden.simplestackcomposedogexample, PID: 30674
    java.lang.IllegalArgumentException: Invalid start index
        at androidx.compose.runtime.Pending.<init>(Composer.kt:92)
        at androidx.compose.runtime.ComposerImpl.start(Composer.kt:1852)
        at androidx.compose.runtime.ComposerImpl.startReplaceableGroup(Composer.kt:1102)
        at com.zhuinden.simplestackcomposeintegration.core.ComposeStateChanger$BackstackState.RenderScreen(ComposeIntegrationCore.kt:241)
        at com.zhuinden.simplestackcomposeintegration.core.ComposeStateChanger.RenderScreen(ComposeIntegrationCore.kt:287)
        at com.zhuinden.simplestackcomposeintegration.core.ComposeStateChanger$RenderScreen$1.invoke(Unknown Source:10)
        at com.zhuinden.simplestackcomposeintegration.core.ComposeStateChanger$RenderScreen$1.invoke(Unknown Source:10)
        at androidx.compose.runtime.RecomposeScopeImpl.compose(RecomposeScopeImpl.kt:140)
        at androidx.compose.runtime.ComposerImpl.recomposeToGroupEnd(Composer.kt:2156)
        at androidx.compose.runtime.ComposerImpl.skipCurrentGroup(Composer.kt:2399)
        at androidx.compose.runtime.ComposerImpl$doCompose$2$5.invoke(Composer.kt:2574)
        at androidx.compose.runtime.ComposerImpl$doCompose$2$5.invoke(Composer.kt:2567)
        at androidx.compose.runtime.SnapshotStateKt.observeDerivedStateRecalculations(SnapshotState.kt:523)
        at androidx.compose.runtime.ComposerImpl.doCompose(Composer.kt:2560)
        at androidx.compose.runtime.ComposerImpl.recompose$runtime_release(Composer.kt:2536)
        at androidx.compose.runtime.CompositionImpl.recompose(Composition.kt:613)
        at androidx.compose.runtime.Recomposer.performRecompose(Recomposer.kt:763)
        at androidx.compose.runtime.Recomposer.access$performRecompose(Recomposer.kt:102)
        at androidx.compose.runtime.Recomposer$runRecomposeAndApplyChanges$2$2.invoke(Recomposer.kt:446)
        at androidx.compose.runtime.Recomposer$runRecomposeAndApplyChanges$2$2.invoke(Recomposer.kt:415)
        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:964)
ok now the exception log is here
🙏🏻 1
either way, i do not know what to do with composer crashes, so it might take a Googler to know what's up
the code worked from 1.0.0-beta03 to 1.0.0-beta07
z
You can try to rewrite your code to avoid the crash condition, if you can isolate what’s actually causing it in the first place. Isolating the crash condition has two purposes: allowing you to work around it, and also providing a minimal reproducer for your bug report. Sometimes it can be hard to do, but often it’s easier than you’d think.
z
actually, i managed to figure out that Compose 1.0.0-beta08 was added as libraries, but the Compiler that was running was still 1.0.0-beta07, hence the crash. So this is solved
Copy code
composeOptions {
        kotlinCompilerExtensionVersion "1.0.0-beta08"
    }
n
always fun when we realize that after the bug report 😄
z
yep 😓
the benefit is that if someone else finds an exception like this, they'll just find that their compiler and compose versions are mismatched
👍 5