Status Update
Comments
jo...@meterapp.co <jo...@meterapp.co> #2
Project: platform/frameworks/support
Branch: androidx-main
Author: Clara Fok <
Link:
Add clearBackStack non-reified overload for route from KClass
Expand for full commit details
Add clearBackStack non-reified overload for route from KClass
Test: ./gradlew navigation:navigation-runtime:cC
Bug: 381938808
Relnote: "Added non-reified overload for clearBackStack with KClass<*>"
Change-Id: I676443ef1ac6cbb7464fb5677c8639ef1786272d
Files:
- M
navigation/navigation-runtime/api/current.txt
- M
navigation/navigation-runtime/api/restricted_current.txt
- M
navigation/navigation-runtime/src/androidTest/java/androidx/navigation/NavControllerRouteTest.kt
- M
navigation/navigation-runtime/src/main/java/androidx/navigation/NavController.kt
Hash: e834d66344cf27e9ad880769c22c3a15ebd3cc86
Date: Mon Dec 02 16:18:06 2024
jo...@meterapp.co <jo...@meterapp.co> #3
Fixed internally, available in navigation-2.9.0-alpha04
bi...@gmail.com <bi...@gmail.com> #4
Project: platform/frameworks/support
Branch: androidx-main
Author: Clara Fok <
Link:
Add getBackStackEntry non-reified overload for route from KClass
Expand for full commit details
Add getBackStackEntry non-reified overload for route from KClass
Test: ./gradlew navigation:navigation-runtime:cC
Bug: 381938808
Relnote: "Added non-reified overload for getBackStackEntry with KClass<T>"
Change-Id: Icf9692ffcf3103b1ec0c6b98e436eec09f7f9d9d
Files:
- M
navigation/navigation-runtime/api/current.txt
- M
navigation/navigation-runtime/api/restricted_current.txt
- M
navigation/navigation-runtime/src/androidTest/java/androidx/navigation/NavControllerRouteTest.kt
- M
navigation/navigation-runtime/src/main/java/androidx/navigation/NavController.kt
Hash: ce52c0e24b075c532f4721756f831edbf91edeeb
Date: Tue Dec 03 17:04:04 2024
[Deleted User] <[Deleted User]> #5
Project: platform/frameworks/support
Branch: androidx-main
Author: Clara Fok <
Link:
Update non-reified clearBackStack and popBackStack
Expand for full commit details
Update non-reified clearBackStack and popBackStack
Added <T : Any> type parameter to the API
Test: existing tests
Bug: 381938808
Bug: 363225480
Relnote: "non-reified clearBackStack and popBackStack expects route from KClass<T> instead of KClass<*>"
Change-Id: I4d7436075cb46c8664ab670be483768e1528f17d
Files:
- M
navigation/navigation-runtime/api/current.txt
- M
navigation/navigation-runtime/api/restricted_current.txt
- M
navigation/navigation-runtime/src/androidTest/java/androidx/navigation/NavControllerRouteTest.kt
- M
navigation/navigation-runtime/src/main/java/androidx/navigation/NavController.kt
Hash: ae333139fec0719656bbf0f81943a6ee9e68a096
Date: Tue Dec 03 17:11:54 2024
8h...@gmail.com <8h...@gmail.com> #6
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.navigation:navigation-runtime:2.9.0-alpha04
jo...@meterapp.co <jo...@meterapp.co> #7
as I understand it doesn't happen with androidxNavigation = "2.7.7" version or lower, so let's not updated it until it's fixes
Yes this is correct, unfortunately I'm past the point of no return because I migrated my app to type safe navigation APIs, it would be very unfortunate to migrate back because this crash is not resolved. Does anyone know why this issue has not been assigned to anyone? It seems like a huge, top voted, issue.
pa...@wewell.app <pa...@wewell.app> #8
I confirm reverting to 2.7.7
fixes the issue. I'm not happy at all with this solution, I had to revert also Compose Destinations and Koin... Could we please get a proper fix?
jb...@google.com <jb...@google.com>
ap...@google.com <ap...@google.com> #9
Project: platform/frameworks/support
Branch: androidx-main
Author: Jeremy Woods <
Link:
Add conditional check inside NavHost PredictiveBackHandler
Expand for full commit details
Add conditional check inside NavHost PredictiveBackHandler
There is no way to guarantee that we will get a composition if a state
change and back callback get triggered in the same frame. This can
result in triggering the `PredictiveBackHandler`'s callback even though
it should actually be disabled.
The cleaner options of fixing this are to change the
`PredictiveBackHandler`'s `enabled` parameter to a Boolean producing
lambda that can be executed internally and retrieve the current value,
but that needs a new API. (see 379152996#comment2)
In the meantime, we just need to add the same check inside of the
`PredictiveBackHandler`'s lambda.
RelNote: "Fixed an issue where `NavHost` could throw an exception
inside of the `PredictiveBackHandler` if the back stack is popped down
to 1 entry and a system back are triggered in the same frame."
Test: added testDisabledInSameFramePredictiveBack
Bug: 375343407
Change-Id: I1a4297a10f2d0da8c8477644b9250c61e4792923
Files:
- M
navigation/navigation-compose/src/androidTest/java/androidx/navigation/compose/NavHostPredictiveBackTest.kt
- M
navigation/navigation-compose/src/main/java/androidx/navigation/compose/NavHost.kt
Hash: f724837c72814a08c4177004ae3e8f380eea8367
Date: Fri Nov 15 20:56:54 2024
[Deleted User] <[Deleted User]> #10
jb...@google.com <jb...@google.com> #11
This has ben fixed internally and will be available in the Navigation 2.8.5
release.
jo...@meterapp.co <jo...@meterapp.co> #12
Thank you so much for your hard work and persistence on this issue! Really excited for the 2.8.5 release :)
sh...@navi.com <sh...@navi.com> #13
by when can i expect 2.8.5 to hit stable and be available to use?
jo...@meterapp.co <jo...@meterapp.co> #14
by when can i expect 2.8.5 to hit stable and be available to use?
Based on the androidx release schedule, I'd assume it will be available December 11th. It looks like they skipped the thanksgiving release for most libraries and I'm hoping they'll be back with releases December 11th.
pr...@google.com <pr...@google.com> #15
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.navigation:navigation-compose:2.9.0-alpha04
androidx.navigation:navigation-compose:2.8.5
si...@gmail.com <si...@gmail.com> #16
I can confirm that our usual way of reproducing this issue with the debugger no longer crashes. Thanks a lot for this release!
sa...@gmail.com <sa...@gmail.com> #17
ma...@wm.rs <ma...@wm.rs> #18
Hi, I'm still facing the issue with 2.8.5
The stack trace:
Fatal Exception: java.lang.IndexOutOfBoundsException: Index -1 out of bounds for length 1
at jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64)
at jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70)
at jdk.internal.util.Preconditions.checkIndex(Preconditions.java:266)
at java.util.Objects.checkIndex(Objects.java:359)
at java.util.ArrayList.get(ArrayList.java:434)
at androidx.navigation.compose.NavHostKt$NavHost$28$1.invokeSuspend(NavHost.kt:620)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:101)
at androidx.compose.ui.platform.AndroidUiDispatcher.performTrampolineDispatch(AndroidUiDispatcher.android.kt:81)
at androidx.compose.ui.platform.AndroidUiDispatcher.access$performTrampolineDispatch(AndroidUiDispatcher.android.kt:41)
at androidx.compose.ui.platform.AndroidUiDispatcher$dispatchCallback$1.run(AndroidUiDispatcher.android.kt:57)
at android.os.Handler.handleCallback(Handler.java:958)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:230)
at android.os.Looper.loop(Looper.java:319)
at android.app.ActivityThread.main(ActivityThread.java:9063)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:588)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103)
It's seems the issue now is in val previousEntry = currentBackStack[currentBackStack.size - 2]
:
if (inPredictiveBack) {
LaunchedEffect(progress) {
val previousEntry = currentBackStack[currentBackStack.size - 2]
transitionState.seekTo(progress, previousEntry)
}
}
si...@gmail.com <si...@gmail.com> #19
Filed
Description
Component used: Activity
Versions used:
Devices/Android versions reproduced on: Pixel 7 API 35 (emulator)
Sample project:https://github.com/sindrenm/compose-navigation-crash-repro
This is a follow-up to 340202286 , since #39 requested we open a new issue. I have a sample project (linked above) that reproduces the issue consistently by using the debugger, but we're also seeing this crash happen for our users (same stack trace) in production builds with the same library versions. Note that we have not been able to reproduce it locally without using the debugger, but our users are.
The stack trace is as follows: