react-native-reanimated: [ios][2.3.0-alpha.3] App keeps crashing randomly
After updating my app from alpha.2 to alpha.3 my apps keeps crashing. I think I did clear/reset/rebuild everything correctly. I’m on RN 65.1 with hermes
Here some of the crash log from Flipper:
Crashed Thread: 9 Dispatch queue: com.facebook.react.ShadowQueue
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000700011e2f758
Exception Note: EXC_CORPSE_NOTIFY
Termination Signal: Segmentation fault: 11
Termination Reason: Namespace SIGNAL, Code 0xb
Terminating Process: exc handler [36476]
VM Regions Near 0x700011e2f758:
Stack 70000251f000-7000025a1000 [ 520K] rw-/rwx SM=NUL thread 26
-->
MALLOC_TINY 7fe870400000-7fe870500000 [ 1024K] rw-/rwx SM=PRV
Application Specific Information:
CoreSimulator 757.5 - Device: iPhone 12 mini (A48EDCBB-AC27-4092-8F16-AC0EB6872FC8) - Runtime: iOS 14.5 (18E182) - DeviceType: iPhone 12 mini
Thread 0:: Dispatch queue: com.apple.main-thread
0 com.happyfloat.abc.development 0x0000000101c50b4c std::__1::__compressed_pair<std::__1::allocator<facebook::jsi::Object>, facebook::jsi::Object>::__compressed_pair<std::__1::allocator<facebook::jsi::Object>&, facebook::jsi::Object&&>(std::__1::piecewise_construct_t, std::__1::tuple<std::__1::allocator<facebook::jsi::Object>&>, std::__1::tuple<facebook::jsi::Object&&>) + 12 (memory:2020)
1 com.happyfloat.abc.development 0x0000000101c50ab1 std::__1::__shared_ptr_emplace<facebook::jsi::Object, std::__1::allocator<facebook::jsi::Object> >::__shared_ptr_emplace<facebook::jsi::Object>(std::__1::allocator<facebook::jsi::Object>, facebook::jsi::Object&&) + 113 (memory:3297)
2 com.happyfloat.abc.development 0x0000000101c5070d std::__1::__shared_ptr_emplace<facebook::jsi::Object, std::__1::allocator<facebook::jsi::Object> >::__shared_ptr_emplace<facebook::jsi::Object>(std::__1::allocator<facebook::jsi::Object>, facebook::jsi::Object&&) + 29 (memory:3298)
3 com.happyfloat.abc.development 0x0000000101c3a25e std::__1::enable_if<!(is_array<facebook::jsi::Object>::value), std::__1::shared_ptr<facebook::jsi::Object> >::type std::__1::make_shared<facebook::jsi::Object, facebook::jsi::Object>(facebook::jsi::Object&&) + 190 (memory:4038)
4 com.happyfloat.abc.development 0x0000000101c39485 reanimated::ShareableValue::toJSValue(facebook::jsi::Runtime&) + 3093 (ShareableValue.cpp:333)
5 com.happyfloat.abc.development 0x0000000101c38630 reanimated::ShareableValue::getValue(facebook::jsi::Runtime&) + 320 (ShareableValue.cpp:187)
6 com.happyfloat.abc.development 0x0000000101bdb256 reanimated::NativeReanimatedModule::registerEventHandler(facebook::jsi::Runtime&, facebook::jsi::Value const&, facebook::jsi::Value const&)::$_4::operator()() const + 86 (NativeReanimatedModule.cpp:178)
7 com.happyfloat.abc.development 0x0000000101bdb1dd decltype(std::__1::forward<reanimated::NativeReanimatedModule::registerEventHandler(facebook::jsi::Runtime&, facebook::jsi::Value const&, facebook::jsi::Value const&)::$_4&>(fp)()) std::__1::__invoke<reanimated::NativeReanimatedModule::registerEventHandler(facebook::jsi::Runtime&, facebook::jsi::Value const&, facebook::jsi::Value const&)::$_4&>(reanimated::NativeReanimatedModule::registerEventHandler(facebook::jsi::Runtime&, facebook::jsi::Value const&, facebook::jsi::Value const&)::$_4&) + 29 (type_traits:3747)
8 com.happyfloat.abc.development 0x0000000101bdb18d void std::__1::__invoke_void_return_wrapper<void>::__call<reanimated::NativeReanimatedModule::registerEventHandler(facebook::jsi::Runtime&, facebook::jsi::Value const&, facebook::jsi::Value const&)::$_4&>(reanimated::NativeReanimatedModule::registerEventHandler(facebook::jsi::Runtime&, facebook::jsi::Value const&, facebook::jsi::Value const&)::$_4&) + 29 (__functional_base:348)
9 com.happyfloat.abc.development 0x0000000101bdb15d std::__1::__function::__alloc_func<reanimated::NativeReanimatedModule::registerEventHandler(facebook::jsi::Runtime&, facebook::jsi::Value const&, facebook::jsi::Value const&)::$_4, std::__1::allocator<reanimated::NativeReanimatedModule::registerEventHandler(facebook::jsi::Runtime&, facebook::jsi::Value const&, facebook::jsi::Value const&)::$_4>, void ()>::operator()() + 29 (functional:1553)
10 com.happyfloat.abc.development 0x0000000101bd9d8e std::__1::__function::__func<reanimated::NativeReanimatedModule::registerEventHandler(facebook::jsi::Runtime&, facebook::jsi::Value const&, facebook::jsi::Value const&)::$_4, std::__1::allocator<reanimated::NativeReanimatedModule::registerEventHandler(facebook::jsi::Runtime&, facebook::jsi::Value const&, facebook::jsi::Value const&)::$_4>, void ()>::operator()() + 30 (functional:1727)
11 com.happyfloat.abc.development 0x0000000101c59385 std::__1::__function::__value_func<void ()>::operator()() const + 53 (functional:1880)
12 com.happyfloat.abc.development 0x0000000101c59345 std::__1::function<void ()>::operator()() const + 21 (functional:2555)
13 com.happyfloat.abc.development 0x0000000101c30176 reanimated::Scheduler::triggerUI() + 118 (Scheduler.cpp:18)
14 com.happyfloat.abc.development 0x0000000101bf789c invocation function for block in reanimated::REAIOSScheduler::scheduleOnUI(std::__1::function<void ()>) + 108 (REAIOSScheduler.mm:33)
15 libdispatch.dylib 0x000000010d90370d _dispatch_call_block_and_release + 12
16 libdispatch.dylib 0x000000010d9048df _dispatch_client_callout + 8
17 libdispatch.dylib 0x000000010d911a27 _dispatch_main_queue_callback_4CF + 1045
18 com.apple.CoreFoundation 0x0000000109a138f8 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
19 com.apple.CoreFoundation 0x0000000109a0e169 __CFRunLoopRun + 2781
20 com.apple.CoreFoundation 0x0000000109a0d1a7 CFRunLoopRunSpecific + 567
21 com.apple.GraphicsServices 0x000000010efb6d85 GSEventRunModal + 139
22 com.apple.UIKitCore 0x000000011f79d4df -[UIApplication _run] + 912
23 com.apple.UIKitCore 0x000000011f7a239c UIApplicationMain + 101
24 com.happyfloat.abc.development 0x00000001014cccc0 main + 112 (main.m:7)
25 libdyld.dylib 0x000000010d98dbbd start + 1
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 9
- Comments: 17 (2 by maintainers)
I have the same issue with 2.3.0-beta.2 and RN 0.64.2 on iOS with enabled Hermes. In the whole app, only one component has code which use Reanimated 2 (rest animations still use methods from Reanimated 1).
My app immediately crash on start up.
After comment out that line:
The app works, of course, without scaling animation.
After downgrading to the 2.2.3 everything works perfectly. @piaskowyk maybe above example could help to solve this issue, let me know if I can help in any way.
I’m also experiencing random crashes on the new Beta 2 with Hermes enabled:
@piaskowyk Not OP but I am also experiencing something similar, here’s a repo: https://github.com/kamui545/reanimated-crash
Swipe a few pictures and it should crash with the same
EXC_BAD_ACCESS
error.