-
-
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
[IOS] Random app crash on production build #2327
Comments
Issue validatorThe issue is valid! |
Same here |
Same here |
Hey, we are facing the same problem. When running on physical devices (ios) we get this crash randomly |
maybe similar: #2366 |
Could you try to update to 2.2.1 version? |
Still happens for us @piaskowyk |
Still happens in 2.2.3 |
In my case it happens when a screen that contains some worklets that are being used in animated styles gets unmounted. I'm hosting my shared values in react context, so that these values can later be accessed by various components on the screen. The context gets erased, along with all components having animated styles, but the worklet is still being called after that. |
What features your application uses?
|
Is the screen where you are seeing the crash your home screen or another screen you navigate to? I am running into this same issue. In our app, our shared values are also initialized in context on our home screen. We notice this issue whenever we remount the home screen. (from a push notification while the app is already running) It doesn't happen every time, but it does happen from time to time and crashes the application. Still trying to wrap my head around completely why it happens as well. As a workaround for now we are considering initializing our shared values outside of the components (using makeMutable) and then also maintaining them. It's not ideal but it might potentially prevent the crash when the screen holding those shared values unmounts. |
Exact same crash happened on production using Not sure if this is relevant (or true), but I have reason to believe screens is related because sentry tells me it happens in a transaction called (crashlytics reports the exact same error message as in #2327 (comment)) |
After upgrading to reanimated 2.3.0 and no longer reseting routes in react-navigation (not sure which one helped), we have gone from around 1000 total of these crashes in multiple releases to 0. |
@MingaudasVagonis We are seeing this issue as well in release builds, currently attempting to upgrade to 2.3.0. If you don't mind me asking, what version of react-navigation are you on? |
|
We also had experimented some crashes and screen freeze when navigate back using navigation.popToTop() or navigation.goBack(). The solution, basically, was use of InteractionManager and remove Layout Animations. Packges:
|
This issue is still happening on
|
I realize this might not fit everyone's situation, but we also started seeing a crash with this error in production builds only, running Looking at the Swift we wrote for this, I noticed we were signaling to the main thread within our background thread with I won't pretend I know much about what I could be making all of this up but just going off of what I could, we seemed to have gotten around this crash for our use case after removing the Definitely feels like there is a bug, or at least an opportunity for a more useful error message, however since signaling back to the main thread is a common/often required process. |
Same here.
|
Ran into the same error using:
|
Same error here, using:
Collected crash log:
|
I can reliably reproduce <Animated.View exiting={SlideInDown} /> {
"react-native-reanimated": "~2.3.1",
} |
If it helps anyone, check the component where you use reanimated/gestures is not rendering more than necessary. I was running into an issue with quite a lot of freezing, hanging and crashes from having reanimated shared values set with in a FlatList item components. Noticed that there were a lot of unnecessary renders with my FlatList item components and after fixing this, with the use of memorisation, my app has become more stable and have not seen any reported app freezing since. This might be similar to some of the earlier comments in regards to noticing this issue happens more when mounting/unmounting more complex screens |
Our issues was fixed when I refactored react-navigation. Crash happened when mounting new stack navigator with a screen, that heavily uses reanimated features. So after some refactoring (remove extra stack navigator, put a problematic screen in navigator above) it kinda stopped happening. Maybe this will be helpful for someone. |
same problem here "react-native": "0.69.4", |
Any updates here ? we are experiencing the same issue for months now. |
@arinjay They have release a new version some hours ago. I'm installing and testing. Hope it is solved in this version. |
same issue, I have random crashes on iOS release build
ENV: and I use @gorhom/bottom-sheet based on reanimated2 |
I found a solution, i just enable |
Any updates on this? We are seeing this issue with Hermes enabled, so unlikely it's due to that. |
@RomanTsegelskyi anything else you've updated or enabled? I've noticed this issue happening for quite some time on even on XCode 13. |
@declanelcocks not sure. We only started seeing it after we had first built with XCode 14 and haven't seen this error before. Hermes has been enabled for a while |
We are also experiencing this: And the reason seems obvious. An unchecked null ptr access. The reanimated code is riddled with unchecked access to pointers and could really need a thorough linting cure.
|
gqrdcujrclsvvkajsamfabzowwpi/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RNReanimated.build/Objects-normal/x86_64/UIResponder+Reanimated.dia:1:1: warning: Could not read serialized diagnostics file: error("Failed to open diagnostics file") (in target 'RNReanimated' from project 'Pods') "react-native-reanimated": "^2.11.0", Not able to run ios build |
More detailed logs:
|
I fixed the issue with the following patch. I had the following error when running the app in "release mode" with XCODE : workletFun.bind is undefined... Here is the patch package :
|
Fixed with #4239, the fix is available since 3.+ versions 🚀 |
@piaskowyk thanks for your awesome fix, is there any plan to get this fix back-ported into v2? |
We have limited capacity unfortunately 😕 So it is hard to maintain two branches of versions. I really recommend an update to Reanimated 3 because is much more stable than Rea 2. |
Appreciate all the work you do. We are working towards v3 right now. Thank you. |
Thank you for understanding 😊 |
Tools like expo doctor still recommend v2. Maybe upgrading the version there will improve adoption @piaskowyk |
Hello. seems to be an issue here |
Description
Getting app crash on random places with reanimated 2
Expected behavior
No crash
Actual behavior & steps to reproduce
Random behaviour
Snack or minimal code example
Package versions
Affected platforms
The text was updated successfully, but these errors were encountered: