Closed joseffilzmaier closed 1 year ago
I am using a AnimatedNavHost that hosts another AnimatedNavHost as one of its tabs (Material3 NavigationBar)
This is generally always the wrong way to do things, but we shouldn't crash in any case.
If this behavior is not reproducible on your side i can try to create a minimal example showcasing the bug if necessary.
Yes, this would be really helpful - ideally a repository that we can run to reproduce it directly.
I have created a minimal example showcasing the bug:
https://github.com/joseffilzmaier/accompanistIssue1544Demo
You can trigger the crash by pressing on the "second" tab in the bottom NavigationBar twice.
I do use nested NavHost's as i want to share a toolbar between all the screens. Also the "second" screen has a different layout depending on the available screen space (resizable on Desktop). I don't see a way to achieve this by using nested navigation
. I have already read quite a few articles about navigation and nested navigation, but i could not find a way to achieve what i wanted without nesting NavHost {}
s. If you have any further insights i would appreciate any hints on how to achieve such a thing :).
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
The issue is fixed in the accompanist navigation-animation 0.31.3-beta
.
Alternatively, latest accompanist navigation-animation has been migrated back into androidx base navigation available in navigation 2.7.0-alpha01
.
Description
After upgrading to 0.29.2-rc i now get the crash shown below.
Steps to reproduce
I am using a AnimatedNavHost that hosts another AnimatedNavHost as one of its tabs (Material3 NavigationBar) The crash happens when calling
navcontroller.navigate(...)
on the outer navhostcontroller with the route that is currently the destination twice. The crash seems to be happening in the code of the inner AnimatedNavHost. The first time i visit the route the crash never occurs. The second time this route is visited, it always occurs.If this behavior is not reproducible on your side i can try to create a minimal example showcasing the bug if necessary.
Expected behavior
The app should not crash, as it was the case with 0.29.1-alpha
Additional context