Status Update
Comments
jb...@google.com <jb...@google.com> #2
Please provide a minimal sample project that reproduces this issue.
kr...@gmail.com <kr...@gmail.com> #3
Sure, I created a minimal sample app for you:
Just click "Next Fragment" multiple times, then press the back button or perform the back gesture multiple times in quick succession.
Note: I tested this on a Pixel 8 with Android 14. Also, I have the predictive back animations enabled in the developer options.
jb...@google.com <jb...@google.com>
kr...@gmail.com <kr...@gmail.com> #4
Just FYI: Still happens on fragment library version 1.7.1
.
kr...@gmail.com <kr...@gmail.com> #5
Still crashing with fragment 1.8.0
. I have updated my example github repo with all latest libraries.
kr...@gmail.com <kr...@gmail.com> #6
Still crashing with fragment 1.8.1
. Example GitHub Repo was updated again.
th...@gmail.com <th...@gmail.com> #7
Any plan to get this done in time for Android 15's enabling of back gesture animations?
ap...@google.com <ap...@google.com> #8
Branch: androidx-main
commit 8b1990bc47272275051da2b252189adafde79124
Author: Jeremy Woods <jbwoods@google.com>
Date: Fri Jun 28 02:56:56 2024
Fix issue with predictive back cancellation
When a Predictive back gesture that is not seekable is interrupted by
another fragment operation, fragment manager loses it state and fails to
display the proper fragment.
We should make it so that when a Predictive back gesture that is not
seekable is interrupt we still move to the correct state.
This ignores the fact that the system will continue to dispatch calls,
but that is okay, we should ignore any calls after our cancellation.
RelNote: "Fixed an issue in fragments where interrupting a predictive
back gesture would send the fragment manager into an undefined state and
even up showing the wrong fragment."
Test: modified and added tests
Bug: 338624457
Change-Id: If82e2cd540a5319faa2e40d4a28ce31026e2e19d
M fragment/fragment/src/androidTest/java/androidx/fragment/app/FragmentAnimatorTest.kt
M fragment/fragment/src/androidTest/java/androidx/fragment/app/OnBackStackChangedListenerTest.kt
M fragment/fragment/src/main/java/androidx/fragment/app/BackStackRecord.java
M fragment/fragment/src/main/java/androidx/fragment/app/FragmentManager.java
M fragment/fragment/src/main/java/androidx/fragment/app/SpecialEffectsController.kt
M transition/transition/src/androidTest/java/androidx/transition/FragmentTransitionSeekingTest.kt
ap...@google.com <ap...@google.com> #9
Branch: androidx-main
commit 27a398bdc622236b84683d7a1c036803d77fe0d3
Author: George Mount <mount@google.com>
Date: Thu Jul 11 15:39:01 2024
Delay start of animateToStart/End() until Transition is ready.
Bug: 338624457
When a seekable transition has animateToStart() or animateToEnd()
called before the transition is ready, it was previously not
animating. Now, it waits until the transition is ready
before starting the animation.
Test: New tests, manual testing
Change-Id: I44d9618604c29659e1f6ae7e966cd1533369b18c
M transition/transition/src/androidTest/java/androidx/transition/SeekTransitionTest.kt
M transition/transition/src/main/java/androidx/transition/Transition.java
jb...@google.com <jb...@google.com> #10
This was actually an error specific to Androidx Transition, was addressed internally, and will be released in the Transition 1.5.1
version.
kr...@gmail.com <kr...@gmail.com> #11
Seems to be not fixed. My sample app is still crashing after updating to the latest libraries:
material = "1.12.0"
activity = "1.9.1"
fragment = "1.8.2"
transition = "1.5.1"
I have pushed an update to my sample library. To reproduce:
- click multiple times on "Next Fragment" (adding a fragment to the back stack)
- repeatedly perform the back gesture in a short period of time -> crash
kr...@gmail.com <kr...@gmail.com> #12
It's still crashing with the latest libraries:
material = "1.13.0-alpha05"
activity = "1.9.2"
fragment = "1.8.3"
navigation = "2.8.0"
my github repo was updated
jb...@google.com <jb...@google.com> #13
Are you seeing a new crash or is it the same trace from above? If it is a new crash can you file a separate bug with your project and the new crash?
jb...@google.com <jb...@google.com> #14
Nevermind I see
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.fragment:fragment:1.8.4
pr...@google.com <pr...@google.com> #16
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.transition:transition:1.6.0-alpha01
Description
Component used: Fragment
Versions used:
Setup in Fragment:
Im getting this crash, when I navigate forward multiple times (
navigate(FragFooDirections.actionFooBar())
) and then repeatedly fast use the back gesture or back button (popBackStack()
).The same happens with a SharedAxisTransition: