Fixed
Status Update
Comments
il...@google.com <il...@google.com> #2
Please upgrade to Fragment 1.3.2 and include a sample project that reproduces your issue.
my...@gmail.com <my...@gmail.com> #3
I updated Fragment to 1.3.2, but I still get this crash.
my...@gmail.com <my...@gmail.com> #4
I can confirm it with Firebase Crashlytics, but I do not know the condition of occurrence yet, and there is no sample project yet.
il...@google.com <il...@google.com> #5
Having plenty of such crashes with fragment 1.3.3
il...@google.com <il...@google.com>
ap...@google.com <ap...@google.com> #6
Not exactly, but quite similar
```
java.lang.NullPointerException: Attempt to invoke virtual method 'float android.view.View.getAlpha()' on a null object reference
at androidx.fragment.app.SpecialEffectsController$Operation$State.from(SpecialEffectsController$Operation.java:409)
at androidx.fragment.app.SpecialEffectsController.markPostponedState(SpecialEffectsController.java:236)
at androidx.fragment.app.FragmentManager.executeOpsTogether(FragmentManager.java:2201)
at androidx.fragment.app.FragmentManager.removeRedundantOperationsAndExecute(FragmentManager.java:2100)
at androidx.fragment.app.FragmentManager.execPendingActions(FragmentManager.java:2002)
at androidx.fragment.app.FragmentManager$5.run(FragmentManager.java:524)
at android.os.Handler.handleCallback(Handler.java:873)
```
```
java.lang.NullPointerException: Attempt to invoke virtual method 'float android.view.View.getAlpha()' on a null object reference
at androidx.fragment.app.SpecialEffectsController$Operation$State.from(SpecialEffectsController$Operation.java:409)
at androidx.fragment.app.SpecialEffectsController.markPostponedState(SpecialEffectsController.java:236)
at androidx.fragment.app.FragmentManager.executeOpsTogether(FragmentManager.java:2201)
at androidx.fragment.app.FragmentManager.removeRedundantOperationsAndExecute(FragmentManager.java:2100)
at androidx.fragment.app.FragmentManager.execPendingActions(FragmentManager.java:2002)
at androidx.fragment.app.FragmentManager$5.run(FragmentManager.java:524)
at android.os.Handler.handleCallback(Handler.java:873)
```
il...@google.com <il...@google.com> #7
Re #5 - if you have a sample project that reproduces this issue, we'd be happy to take a look.
an...@google.com <an...@google.com> #8
I've never been able to reproduce this crash myself, just observing crashlytics reports for our company's app
[Deleted User] <[Deleted User]> #9
I suspect this could be related to removing hidden fragment (i.e. tx.hide(fragment)) in a started state (onPause was called). We also have Slide exit transition on it
[Deleted User] <[Deleted User]> #10
We're seeing this a fair amount, on Android 9, 10, and 11, across a broad spectrum of devices. The ratio of users to events is only about 2:3, so this isn't something that seems tied to specific devices or user behaviors. No luck reproducing it so far. And with our own code nowhere in the stack, we have no clear way to protect against this crash.
Looking at BugSnag breadcrumbs, the crash always occurs immediately after a Fragment is destroyed. Not always the same fragment... I'm seeing a variety of fragments, which I suspect correspond to our most-used features.
Timing of the earliest occurrences of this crash seem to line up with our having upgraded androidx.fragment:fragment-ktx from 1.2.5 to 1.3.3, but I have no strong evidence this is the cause.
Looking at BugSnag breadcrumbs, the crash always occurs immediately after a Fragment is destroyed. Not always the same fragment... I'm seeing a variety of fragments, which I suspect correspond to our most-used features.
Timing of the earliest occurrences of this crash seem to line up with our having upgraded androidx.fragment:fragment-ktx from 1.2.5 to 1.3.3, but I have no strong evidence this is the cause.
an...@google.com <an...@google.com> #11
the crash is also gone with FragmentManager.enableNewStateManager(false)
ap...@google.com <ap...@google.com> #12
Thank you, I'll try it.
Description
Version used: 1.2.0
Devices/Android versions reproduced on: N/A
Fragment constructor is removed once we use add/replace<MyFragment>(...).