react-native-reanimated: App crashes with SIGABRT
Description
For some users using vivo, OPPO, Xiaomi, or Samsung phones, we are seeing a crash in the native code.
SIGABRT Abort program
/system/lib64/libc.so:139776 abort
/data/data/in.galaxycard.android/lib-0/libc++_shared.so:753960 0x6fa39be128
/data/data/in.galaxycard.android/lib-0/libc++_shared.so:738264 __gxx_personality_v0
/data/app/in.galaxycard.android-QuduRwrv5PtDhuDtyz0QSg==/split_config.arm64_v8a.apk!/lib/arm64-v8a/libreanimated.so:458916 0x6fa2c430a4
/data/app/in.galaxycard.android-QuduRwrv5PtDhuDtyz0QSg==/split_config.arm64_v8a.apk!/lib/arm64-v8a/libreanimated.so:460204 _Unwind_Resume
/data/app/in.galaxycard.android-QuduRwrv5PtDhuDtyz0QSg==/split_config.arm64_v8a.apk!/lib/arm64-v8a/libreanimated.so:412756 0x6fa2c37c54
/data/data/in.galaxycard.android/lib-0/libhermes.so:217704 std::__ndk1::function<facebook::jsi::Value (facebook::jsi::Runtime&, facebook::jsi::Value const&, facebook::jsi::Value const*, unsigned long)>::operator()(facebook::jsi::Runtime&, facebook::jsi::Value const&, facebook::jsi::Value const*, unsigned long) const
/data/data/in.galaxycard.android/lib-0/libhermes.so:216040 facebook::hermes::HermesRuntimeImpl::HFContext::func(void*, hermes::vm::Runtime*, hermes::vm::NativeArgs)
/data/data/in.galaxycard.android/lib-0/libhermes.so:257968 0x6fa33cefb0
/data/data/in.galaxycard.android/lib-0/libhermes.so:317940 0x6fa33dd9f4
/data/data/in.galaxycard.android/lib-0/libhermes.so:331320 0x6fa33e0e38
/data/data/in.galaxycard.android/lib-0/libhermes.so:321856 0x6fa33de940
/data/data/in.galaxycard.android/lib-0/libhermes.so:192780 facebook::hermes::HermesRuntimeImpl::call(facebook::jsi::Function const&, facebook::jsi::Value const&, facebook::jsi::Value const*, unsigned long)
/data/app/in.galaxycard.android-QuduRwrv5PtDhuDtyz0QSg==/split_config.arm64_v8a.apk!/lib/arm64-v8a/libreanimated.so:386972 0x6fa2c3179c
/data/data/in.galaxycard.android/lib-0/libhermes.so:217704 std::__ndk1::function<facebook::jsi::Value (facebook::jsi::Runtime&, facebook::jsi::Value const&, facebook::jsi::Value const*, unsigned long)>::operator()(facebook::jsi::Runtime&, facebook::jsi::Value const&, facebook::jsi::Value const*, unsigned long) const
/data/data/in.galaxycard.android/lib-0/libhermes.so:216040 facebook::hermes::HermesRuntimeImpl::HFContext::func(void*, hermes::vm::Runtime*, hermes::vm::NativeArgs)
/data/data/in.galaxycard.android/lib-0/libhermes.so:257968 0x6fa33cefb0
/data/data/in.galaxycard.android/lib-0/libhermes.so:317940 0x6fa33dd9f4
/data/data/in.galaxycard.android/lib-0/libhermes.so:331320 0x6fa33e0e38
/data/data/in.galaxycard.android/lib-0/libhermes.so:321856 0x6fa33de940
/data/data/in.galaxycard.android/lib-0/libhermes.so:192780 facebook::hermes::HermesRuntimeImpl::call(facebook::jsi::Function const&, facebook::jsi::Value const&, facebook::jsi::Value const*, unsigned long)
/data/app/in.galaxycard.android-QuduRwrv5PtDhuDtyz0QSg==/split_config.arm64_v8a.apk!/lib/arm64-v8a/libreanimated.so:386972 0x6fa2c3179c
/data/data/in.galaxycard.android/lib-0/libhermes.so:217704 std::__ndk1::function<facebook::jsi::Value (facebook::jsi::Runtime&, facebook::jsi::Value const&, facebook::jsi::Value const*, unsigned long)>::operator()(facebook::jsi::Runtime&, facebook::jsi::Value const&, facebook::jsi::Value const*, unsigned long) const
/data/data/in.galaxycard.android/lib-0/libhermes.so:216040 facebook::hermes::HermesRuntimeImpl::HFContext::func(void*, hermes::vm::Runtime*, hermes::vm::NativeArgs)
/data/data/in.galaxycard.android/lib-0/libhermes.so:257968 0x6fa33cefb0
/data/data/in.galaxycard.android/lib-0/libhermes.so:317940 0x6fa33dd9f4
/data/data/in.galaxycard.android/lib-0/libhermes.so:331320 0x6fa33e0e38
/data/data/in.galaxycard.android/lib-0/libhermes.so:321856 0x6fa33de940
/data/data/in.galaxycard.android/lib-0/libhermes.so:192780 facebook::hermes::HermesRuntimeImpl::call(facebook::jsi::Function const&, facebook::jsi::Value const&, facebook::jsi::Value const*, unsigned long)
/data/app/in.galaxycard.android-QuduRwrv5PtDhuDtyz0QSg==/split_config.arm64_v8a.apk!/lib/arm64-v8a/libreanimated.so:386872 0x6fa2c31738
/data/data/in.galaxycard.android/lib-0/libhermes.so:217704 std::__ndk1::function<facebook::jsi::Value (facebook::jsi::Runtime&, facebook::jsi::Value const&, facebook::jsi::Value const*, unsigned long)>::operator()(facebook::jsi::Runtime&, facebook::jsi::Value const&, facebook::jsi::Value const*, unsigned long) const
/data/data/in.galaxycard.android/lib-0/libhermes.so:216040 facebook::hermes::HermesRuntimeImpl::HFContext::func(void*, hermes::vm::Runtime*, hermes::vm::NativeArgs)
/data/data/in.galaxycard.android/lib-0/libhermes.so:257968 0x6fa33cefb0
/data/data/in.galaxycard.android/lib-0/libhermes.so:192780 facebook::hermes::HermesRuntimeImpl::call(facebook::jsi::Function const&, facebook::jsi::Value const&, facebook::jsi::Value const*, unsigned long)
/data/app/in.galaxycard.android-QuduRwrv5PtDhuDtyz0QSg==/split_config.arm64_v8a.apk!/lib/arm64-v8a/libreanimated.so:402364 reanimated::Mapper::execute(facebook::jsi::Runtime&)
/data/app/in.galaxycard.android-QuduRwrv5PtDhuDtyz0QSg==/split_config.arm64_v8a.apk!/lib/arm64-v8a/libreanimated.so:320564 reanimated::MapperRegistry::execute(facebook::jsi::Runtime&)
/data/app/in.galaxycard.android-QuduRwrv5PtDhuDtyz0QSg==/split_config.arm64_v8a.apk!/lib/arm64-v8a/libreanimated.so:294196 reanimated::NativeReanimatedModule::onRender(double)
/data/app/in.galaxycard.android-QuduRwrv5PtDhuDtyz0QSg==/split_config.arm64_v8a.apk!/lib/arm64-v8a/libreanimated.so:250924 0x6fa2c1042c
/data/app/in.galaxycard.android-QuduRwrv5PtDhuDtyz0QSg==/split_config.arm64_v8a.apk!/lib/arm64-v8a/libreanimated.so:272964 facebook::jni::detail::MethodWrapper<void (reanimated::AnimationFrameCallback::*)(double), &reanimated::AnimationFrameCallback::onAnimationFrame, reanimated::AnimationFrameCallback, void, double>::dispatch(facebook::jni::alias_ref<facebook::jni::detail::JTypeFor<facebook::jni::HybridClass<reanimated::AnimationFrameCallback, facebook::jni::detail::BaseHybridClass>::JavaPart, facebook::jni::JObject, void>::_javaobject*>, double&&)
/data/app/in.galaxycard.android-QuduRwrv5PtDhuDtyz0QSg==/split_config.arm64_v8a.apk!/lib/arm64-v8a/libreanimated.so:272796
ESE_vJdEE4callEP7_JNIEnvP8_jobjectd:4998792534810842000 0x5345456445656d61
Expected behavior
App should not crash or at least stacktrace should point to the error in the JS land, to allow for debugging.
Actual behavior & steps to reproduce
App crashes randomly.
Snack or minimal code example
We haven’t found a way to replicate this on any of our test devices.
Package versions
- React Native: 0.63.4
- React Native Reanimated: 2.0.1
- NodeJS: 12.20.0
- Xcode: NA
- Java & Gradle: 1.8.0_181 gradle 6.5
Affected platforms
- Android
- iOS
- Web
About this issue
- Original URL
- State: open
- Created 3 years ago
- Reactions: 4
- Comments: 42 (7 by maintainers)
Im using reanimated
v3.6.2
along with react-native0.73.4
and this issue is still happening to me. most likely related to app being updated due expo-updates and conflicting somehow with reanimated.Any suggestions to get this one fixed? affecting 16% of our user base
imo this is still an issue and should be reopened
It happens when App was reloaded in JSContext(restart by react-native-codepush, react-native-exit-app, …etc) and EventHandler was not clear (it keeps Java mNodesManager listener but in Cpp was destroyed). It should be clear when NativeProxy was destroyed. Here is the patch for react-native-reanimated@2.12.0. (We patched it by removing the pre-built aar and applying the fix. And no crash in our production app occurs.)
Maybe it was fixed in the latest release. If not, ping me then I will send a PR.
Seeing similar crashes:
moto e (XT2052DL)
RN 0.64.0 react-native-reanimated 2.2.0
I have not found that the patch prevents this error, unfortunately.
@spsaucier Basically I applied the fix from the comment I refered to using patch-package, no changes to the contents. On top of that you will need to rebuild the .aar files on android, which you can enable by adding the following to your app/build.gradle file:
This did the trick for me in terms of backporting this fix for 2.x. But we’re quite eager to upgrade to 3.x since there’s still some unexplainable crashes happening 😅
Samsung here
I’m also experiencing this with RN 0.64.0, react-native-reanimated 2.0.1, gradle 6.7, gradle tools 4.1.3, AS 4.1.3.
I’m forcing fb soloader like this:
and getting this crash on a Pixel3
Getting this issue with reanimated
3.8.1
and RN0.73.6
also.I have the same issue “react-native-reanimated”: “3.8.1”, “react-native”: “0.73.6”,
I get a similar message in my expo dev client on startup:
it points to this:
with v2.14.4
Further investigations lead me to a somewhat unrelated thread (different crash with drawer) that advises to use the
useLegacyImplementation
, which indeed worked in my case too:Same issue here on android with:
"react-native": "0.67.3",
"react-native-reanimated": "^2.9.1",