-
-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
App Crashes on iOS when navigating, after upgrading to Kotlin 1.9.20 #244
Comments
On 1.0.0-rc08 this I will investigate it. Can you also share your Navigator setup? Describe more how you are using Voyager. The ScreenModelStore uses a ThreadSafeMap so |
Can you try this PR? Just checkout to the branch and run |
Sure, I'll check it |
It crashed on rc-08 as well Navigator(startScreen) {
this.navigator = it
Scaffold(
modifier = modifier,
content = {
Box(modifier = Modifier.padding(it)) {
CurrentScreen()
}
},
topBar = {
if (it.lastItem.key in screensWithoutAppBar) return@Scaffold
if (it.lastItem.key == SearchScreen.key)
searchBarData?.let { data -> SearchBar(data) } ?: MedialAppBar(scrollBehavior)
else MedialAppBar(scrollBehavior)
},
)
} |
Running this task fails
I've even tried changing my java version, gradle JDK version to 21, nothing works |
I also have this problem when using the latest version of the library. How to solve it? |
Fixed in |
Unfortunately, this bug does not seem to be resolved Uncaught Kotlin exception: kotlin.ConcurrentModificationException
at 0 Chat 0x10538b9af kfun:kotlin.Exception#<init>(kotlin.String?;kotlin.Throwable?){} + 143
at 1 Chat 0x10538bbcf kfun:kotlin.RuntimeException#<init>(kotlin.String?;kotlin.Throwable?){} + 143
at 2 Chat 0x10538cc77 kfun:kotlin.ConcurrentModificationException#<init>(kotlin.String?;kotlin.Throwable?){} + 143
at 3 Chat 0x10538cceb kfun:kotlin.ConcurrentModificationException#<init>(){} + 95
at 4 Chat 0x1053f1f97 kfun:kotlin.collections.HashMap.Itr#checkForComodification(){} + 243
at 5 Chat 0x1053f211f kfun:kotlin.collections.HashMap.KeysItr#next(){}1:0 + 203
at 6 Chat 0x1054997ff kfun:kotlin.collections.Iterator#next(){}1:0-trampoline + 99
at 7 Chat 0x105473a13 kfun:kotlin.sequences.FilteringSequence.object-1.calcNext#internal + 223
at 8 Chat 0x105473d5f kfun:kotlin.sequences.FilteringSequence.object-1.hasNext#internal + 123
at 9 Chat 0x10549972f kfun:kotlin.collections.Iterator#hasNext(){}kotlin.Boolean-trampoline + 91
at 10 Chat 0x1056f342f kfun:cafe.adriel.voyager.navigator.Navigator#dispose(cafe.adriel.voyager.core.screen.Screen){} + 703
at 11 Chat 0x1056fbda3 kfun:cafe.adriel.voyager.navigator.internal.object-2.dispose#internal + 1331
at 12 Chat 0x1056d7acb kfun:androidx.compose.runtime.DisposableEffectResult#dispose(){}-trampoline + 91
at 13 Chat 0x10560314f kfun:androidx.compose.runtime.DisposableEffectImpl.onForgotten#internal + 183
withContext(Dispatchers.Main.immediate) {
navigator.replaceAll(LoginSceen())
}
or
navigator.replaceAll(LoginSceen()) Will report an error |
Now it is broken in another place :S It will be fixed soon.
|
Thanks for the fix @DevSrSouza , looking forward to the release 🙂. I am still not sure why is this crash related to 1.9.20 kotlin update, if anyone can explain the solution that would be great for learning. |
Ah, this would fix the crash that I'm seeing. Also looking forward to the next release since I'm on Kotlin 1.9.20. :) |
I have reproduced here and fix it on #249 . |
Fixed on |
Crash on iOS When Navigating, after upgrade to Kotlin 1.9.20
After upgrading to Kotlin 1.9.20
App is crashing in iOS, when it navigates
On Android, its working fine
Stack Trace:
The text was updated successfully, but these errors were encountered: