google / accompanist

A collection of extension libraries for Jetpack Compose
https://google.github.io/accompanist
Apache License 2.0
7.38k stars 596 forks source link

[Navigation Material] NavController crash in 2.6.0-alpha08 #1638

Closed martynamaron closed 1 year ago

martynamaron commented 1 year ago

Description

In the fix for https://github.com/google/accompanist/issues/1493 the navigation dependency was updated to 2.6.0-alpha08.

There's a known issue with this version: https://issuetracker.google.com/issues/275258161, which was fixed in 2.6.0-alpha09.

The issue is the bottom navigation crashing, when changing tabs.

Fatal Exception: java.util.NoSuchElementException: ArrayDeque is empty.
       at kotlin.collections.ArrayDeque.removeLast(ArrayDeque.java:38)
       at androidx.navigation.NavController.launchSingleTopInternal(NavController.java:214)
       at androidx.navigation.NavController.navigate(NavController.java:214)
       at androidx.navigation.NavController.navigate(NavController.java:74)
       at androidx.navigation.NavController.navigate(NavController.java:74)
       at androidx.navigation.NavController.navigate$default(NavController.java:74)
       at androidx.navigation.NavController.navigate(NavController.java:28)

Steps to reproduce As per the issue tracker bug

Expected behavior No crash 🙃

Additional context