Fixed
Status Update
Comments
jb...@google.com <jb...@google.com> #2
Please upload a sample project that recreates this issue.
wi...@gmail.com <wi...@gmail.com> #4
Upload it for direct download
jb...@google.com <jb...@google.com>
ap...@google.com <ap...@google.com> #5
Project: platform/frameworks/support
Branch: androidx-main
commit 2e36de7a65cbbf0ff7d81d82842b0e4836629819
Author: Jeremy Woods <jbwoods@google.com>
Date: Wed Aug 18 14:34:35 2021
Fix indexOutOfBounds error for setGraph
For for loop in setGraph is currently attempting to access the array out
of bounds. It only fails when using 13 or 29 destinations in the graph.
RelNote: "There will no longer be an `ArrayIndexOutOfBoundsException`
when calling `setGraph` with a graph with 13 or 29 destinations."
Test: add navControllerRouteTest
Bug: 195171984
Change-Id: I1a9f17c4616bc38dd3dd89cb1da29814c3dfd512
M navigation/navigation-runtime/src/androidTest/java/androidx/navigation/NavControllerRouteTest.kt
M navigation/navigation-runtime/src/main/java/androidx/navigation/NavController.kt
https://android-review.googlesource.com/1801108
Branch: androidx-main
commit 2e36de7a65cbbf0ff7d81d82842b0e4836629819
Author: Jeremy Woods <jbwoods@google.com>
Date: Wed Aug 18 14:34:35 2021
Fix indexOutOfBounds error for setGraph
For for loop in setGraph is currently attempting to access the array out
of bounds. It only fails when using 13 or 29 destinations in the graph.
RelNote: "There will no longer be an `ArrayIndexOutOfBoundsException`
when calling `setGraph` with a graph with 13 or 29 destinations."
Test: add navControllerRouteTest
Bug: 195171984
Change-Id: I1a9f17c4616bc38dd3dd89cb1da29814c3dfd512
M navigation/navigation-runtime/src/androidTest/java/androidx/navigation/NavControllerRouteTest.kt
M navigation/navigation-runtime/src/main/java/androidx/navigation/NavController.kt
jb...@google.com <jb...@google.com> #6
This has been fixed internally and will be available in the Navigation 2.4.0-alpha08
release.
Description
Component used: Navigation Version used: Component used: Navigation Version used: 2.4.0-alpha05 Devices/Android versions reproduced on: XIAOMI 11Lite
Because of the feature of SparseArrayCompat The crash happens when the NavGraph has 13 or 29 or... NavDestination.
This could be caused by the following code in NavController.setGraph()