-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ANDROID] A TON of crashes on Android Fabric when using entering/exiting animations #6908
Comments
Hey! 👋 The issue doesn't seem to contain a minimal reproduction. Could you provide a snack or a link to a GitHub repository under your username that reproduces the problem? |
Probably won't help, but I'm seeing this as well. Even in the "Pre-launch report" feature of Play Store it seems to crash sometimes. I cannot replicate with my own devices. Stacktraces look the same as yours, with startLayoutAnimation. I'm using Expo 52 btw |
We're using Expo (v. 52.0.9) and are also experiencing the same issues on Android. We've only observed the crashes on login/logout so far, but if it has something to do with entering/exiting animations that could explain that. The crashes only happen on production builds, nothing when running the app in development. We also have startLayoutAnimation at the top of the stacktrace:
Versions"expo": "^52.0.9", WorkaroundDisabling Fabric by setting |
@bartlomiejbloniarz I can confirm that this patch fixing 100% of crashes, thank you |
In the meantime, for expo users, here is a patch for the PR Fix. react-native-reanimated@3.16.6.patch
|
## Summary This PR adds a `contains` check for layout animation config. When we schedule the start of an animation, we check if an animation is configured for the given view. But it might happen that before the `LayoutAnimationsManager::startLayoutAnimation` function gets executed, the view gets removed. When the view is removed we clear the config, so the `startLayoutAnimation` function will get a `nullptr` config, resulting in a crash. fixes #6908 ## Test plan
Description
Hi, a quick overview:
After enabling Fabirc on our Android app, we have started receiving a ton of crashes from our Prod monitoring. Around 5% of users experienced a crash and 99% of them were reanimated related.
The errors are not very readable as most of them happen in some C++ code.
Here is few examples:
And thousands more similar ones.
Steps to reproduce
We figured out that it has to be related to entering/exiting animations as most crashes would appear when user would interact with component like this:
Keep in mind this is just one of the structures that would cause problems.
The worst part is that there is no consistent repro, user would interact with X of those components just fine, when suddenly one of them would cause a crash.
No idea what is the cause, but one thing is certain, it's due to the entering/exiting.
How do I know that? Well after applying this patch:
The crashes are gone, almost no more logs appearing in Prod monitoring.
Only few remain, and I have a suspicion it might be related to
LinearTransition
, which we are also using. But the total number of crashes got reduced by 99% with the patch mentioned above, so that's what I would like to focus on in this Issue.Snack or a link to a repository
No constant repro, just observed through prod logs
Reanimated version
3.16.4
React Native version
0.76.6
Platforms
Android
JavaScript runtime
Hermes
Workflow
React Native
Architecture
Fabric (New Architecture)
Build type
Release app & production bundle
Device
Real device
Device model
All
Acknowledgements
Yes
The text was updated successfully, but these errors were encountered: