Skip to content

SIGABRT in <array>/folly after upgrading to react-native 0.80.1 #52366

Description

@mrousavy

Description

After upgrading my app from react-native 0.78.2 to 0.80.1, it no longer started.

The bundle loaded successfully, but on initialization it crashes with a SIGABRT signal in <array>, called from folly's jsi::valueFromDynamic(...), which is called from ReactInstance::callFunctionOnModule(...)

Image

... __n seems to be underflowed? it's 105553156317496

The module / method being called is RCTDeviceEventEmitter.emit(...):

Image

jsArgs here has 1 element in it, I haven't debugged further what type or value it is (folly dynamics / jsi::Values are hard to debug)

Steps to reproduce

  1. Run NitroExample from feat: Upgrade NitroExample to react-native 0.80 mrousavy/nitro#704

I haven't tried reproducing it in a blank app yet.

React Native Version

0.80.1

Affected Platforms

Runtime - iOS

Output of npx @react-native-community/cli info

info Fetching system and libraries information...
System:
  OS: macOS 15.5
  CPU: (10) arm64 Apple M1 Max
  Memory: 167.06 MB / 32.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 18.18.0
    path: ~/.nvm/versions/node/v18.18.0/bin/node
  Yarn: Not Found
  npm:
    version: 10.8.3
    path: ~/.nvm/versions/node/v18.18.0/bin/npm
  Watchman:
    version: 2025.06.30.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.16.2
    path: /usr/local/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 24.5
      - iOS 18.5
      - macOS 15.5
      - tvOS 18.5
      - visionOS 2.5
      - watchOS 11.5
  Android SDK:
    API Levels:
      - "28"
      - "29"
      - "30"
      - "31"
      - "32"
      - "33"
      - "34"
      - "35"
    Build Tools:
      - 28.0.3
      - 30.0.2
      - 30.0.3
      - 31.0.0
      - 32.0.0
      - 32.1.0
      - 33.0.0
      - 33.0.1
      - 34.0.0
      - 35.0.0
    System Images:
      - android-32 | Google APIs ARM 64 v8a
      - android-33 | Google APIs ARM 64 v8a
      - android-33 | Google Play ARM 64 v8a
      - android-35 | Google Play ARM 64 v8a
    Android NDK: 25.1.8937393
IDEs:
  Android Studio: 2025.1 AI-251.25410.109.2511.13665796
  Xcode:
    version: 16.4/16F6
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.15
    path: /opt/homebrew/opt/openjdk@17/bin/javac
  Ruby:
    version: 2.6.10
    path: /usr/bin/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react: Not Found
  react-native: Not Found
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: true
  newArchEnabled: true

Stacktrace or Logs

#0	0x0000000100528874 in __pthread_kill ()
#1	0x00000001001662ec in pthread_kill ()
#2	0x0000000180171ea8 in abort ()
#3	0x0000000105eae6a4 in std::__1::array<std::__1::aligned_storage<8ul, 8ul>::type, 14ul>::operator[][abi:de190102] at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.5.sdk/usr/include/c++/v1/array:243
#4	0x0000000105eae664 in folly::f14::detail::F14Chunk<std::__1::pair<folly::dynamic const, folly::dynamic>*>::itemAddr at /Users/mrousavy/Projects/nitro/example/ios/Pods/Headers/Public/RCT-Folly/folly/container/detail/F14Table.h:752
#5	0x0000000105eae5bc in folly::f14::detail::F14Chunk<std::__1::pair<folly::dynamic const, folly::dynamic>*>::owner at /Users/mrousavy/Projects/nitro/example/ios/Pods/Headers/Public/RCT-Folly/folly/container/detail/F14Table.h:770
#6	0x0000000105eae25c in folly::f14::detail::F14ItemIter<folly::f14::detail::F14Chunk<std::__1::pair<folly::dynamic const, folly::dynamic>*>*>::chunk at /Users/mrousavy/Projects/nitro/example/ios/Pods/Headers/Public/RCT-Folly/folly/container/detail/F14Table.h:1009
#7	0x0000000105eadff0 in folly::f14::detail::NodeContainerIterator<std::__1::pair<folly::dynamic const, folly::dynamic> const*>::operator++ [inlined] folly::f14::detail::F14ItemIter<folly::f14::detail::F14Chunk<std::__1::pair<folly::dynamic const, folly::dynamic>*>*>::advanceImpl(bool, bool) [inlined] at /Users/mrousavy/Projects/nitro/example/ios/Pods/Headers/Public/RCT-Folly/folly/container/detail/F14Table.h:945
#8	0x0000000105eadfec in folly::f14::detail::NodeContainerIterator<std::__1::pair<folly::dynamic const, folly::dynamic> const*>::operator++ [inlined] folly::f14::detail::F14ItemIter<folly::f14::detail::F14Chunk<std::__1::pair<folly::dynamic const, folly::dynamic>*>*>::advance() [inlined] at /Users/mrousavy/Projects/nitro/example/ios/Pods/Headers/Public/RCT-Folly/folly/container/detail/F14Table.h:1003
#9	0x0000000105eadfec in folly::f14::detail::NodeContainerIterator<std::__1::pair<folly::dynamic const, folly::dynamic> const*>::operator++ at /Users/mrousavy/Projects/nitro/example/ios/Pods/Headers/Public/RCT-Folly/folly/container/detail/F14Policy.h:710
#10	0x0000000105eadfa8 in folly::detail::IteratorAdaptor<folly::dynamic::const_item_iterator, folly::f14::detail::NodeContainerIterator<std::__1::pair<folly::dynamic const, folly::dynamic> const*>, std::__1::pair<folly::dynamic const, folly::dynamic> const, std::__1::forward_iterator_tag>::increment at /Users/mrousavy/Projects/nitro/example/ios/Pods/Headers/Public/RCT-Folly/folly/detail/Iterators.h:140
#11	0x0000000105eac52c in folly::detail::IteratorFacade<folly::dynamic::const_item_iterator, std::__1::pair<folly::dynamic const, folly::dynamic> const, std::__1::forward_iterator_tag>::operator++ at /Users/mrousavy/Projects/nitro/example/ios/Pods/Headers/Public/RCT-Folly/folly/detail/Iterators.h:89
#12	0x0000000106972790 in facebook::jsi::valueFromDynamic at /Users/mrousavy/Projects/nitro/node_modules/react-native/ReactCommon/jsi/jsi/JSIDynamic.cpp:87
#13	0x000000010688e2a4 in facebook::react::ReactInstance::callFunctionOnModule(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, folly::dynamic&&)::$_0::operator()(facebook::jsi::Runtime&) const at /Users/mrousavy/Projects/nitro/node_modules/react-native/ReactCommon/react/runtime/ReactInstance.cpp:324
#14	0x000000010688dc90 in std::__1::__invoke[abi:de190102]<facebook::react::ReactInstance::callFunctionOnModule(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, folly::dynamic&&)::$_0&, facebook::jsi::Runtime&> at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.5.sdk/usr/include/c++/v1/__type_traits/invoke.h:149
#15	0x000000010688dc40 in std::__1::__invoke_void_return_wrapper<void, true>::__call[abi:de190102]<facebook::react::ReactInstance::callFunctionOnModule(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, folly::dynamic&&)::$_0&, facebook::jsi::Runtime&> at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.5.sdk/usr/include/c++/v1/__type_traits/invoke.h:224
#16	0x000000010688dc14 in std::__1::__function::__alloc_func<facebook::react::ReactInstance::callFunctionOnModule(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, folly::dynamic&&)::$_0, std::__1::allocator<facebook::react::ReactInstance::callFunctionOnModule(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, folly::dynamic&&)::$_0>, void (facebook::jsi::Runtime&)>::operator()[abi:de190102] at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.5.sdk/usr/include/c++/v1/__functional/function.h:171
#17	0x000000010688c93c in std::__1::__function::__func<facebook::react::ReactInstance::callFunctionOnModule(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, folly::dynamic&&)::$_0, std::__1::allocator<facebook::react::ReactInstance::callFunctionOnModule(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, folly::dynamic&&)::$_0>, void (facebook::jsi::Runtime&)>::operator() at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.5.sdk/usr/include/c++/v1/__functional/function.h:313
#18	0x00000001061ccec4 in std::__1::__function::__value_func<void (facebook::jsi::Runtime&)>::operator()[abi:de190102] at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.5.sdk/usr/include/c++/v1/__functional/function.h:430
#19	0x00000001061cb338 in std::__1::function<void (facebook::jsi::Runtime&)>::operator() at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.5.sdk/usr/include/c++/v1/__functional/function.h:989
#20	0x0000000106a852c4 in facebook::react::Task::execute at /Users/mrousavy/Projects/nitro/node_modules/react-native/ReactCommon/react/renderer/runtimescheduler/Task.cpp:48
#21	0x0000000106a6bb48 in facebook::react::RuntimeScheduler_Modern::executeTask at /Users/mrousavy/Projects/nitro/node_modules/react-native/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler_Modern.cpp:374
#22	0x0000000106a6c880 in facebook::react::RuntimeScheduler_Modern::runEventLoopTick at /Users/mrousavy/Projects/nitro/node_modules/react-native/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler_Modern.cpp:323
#23	0x0000000106a6c468 in facebook::react::RuntimeScheduler_Modern::runEventLoop at /Users/mrousavy/Projects/nitro/node_modules/react-native/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler_Modern.cpp:269
#24	0x0000000106a73810 in facebook::react::RuntimeScheduler_Modern::scheduleEventLoop()::$_0::operator()(facebook::jsi::Runtime&) const at /Users/mrousavy/Projects/nitro/node_modules/react-native/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler_Modern.cpp:251
#25	0x0000000106a737d8 in std::__1::__invoke[abi:de190102]<facebook::react::RuntimeScheduler_Modern::scheduleEventLoop()::$_0&, facebook::jsi::Runtime&> at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.5.sdk/usr/include/c++/v1/__type_traits/invoke.h:149
#26	0x0000000106a73788 in std::__1::__invoke_void_return_wrapper<void, true>::__call[abi:de190102]<facebook::react::RuntimeScheduler_Modern::scheduleEventLoop()::$_0&, facebook::jsi::Runtime&> at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.5.sdk/usr/include/c++/v1/__type_traits/invoke.h:224
#27	0x0000000106a7375c in std::__1::__function::__alloc_func<facebook::react::RuntimeScheduler_Modern::scheduleEventLoop()::$_0, std::__1::allocator<facebook::react::RuntimeScheduler_Modern::scheduleEventLoop()::$_0>, void (facebook::jsi::Runtime&)>::operator()[abi:de190102] at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.5.sdk/usr/include/c++/v1/__functional/function.h:171
#28	0x0000000106a725f4 in std::__1::__function::__func<facebook::react::RuntimeScheduler_Modern::scheduleEventLoop()::$_0, std::__1::allocator<facebook::react::RuntimeScheduler_Modern::scheduleEventLoop()::$_0>, void (facebook::jsi::Runtime&)>::operator() at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.5.sdk/usr/include/c++/v1/__functional/function.h:313
#29	0x00000001061ccec4 in std::__1::__function::__value_func<void (facebook::jsi::Runtime&)>::operator()[abi:de190102] at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.5.sdk/usr/include/c++/v1/__functional/function.h:430
#30	0x00000001061cb338 in std::__1::function<void (facebook::jsi::Runtime&)>::operator() at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.5.sdk/usr/include/c++/v1/__functional/function.h:989
#31	0x0000000106875920 in _ZZZN8facebook5react13ReactInstanceC1ENSt3__110unique_ptrINS0_9JSRuntimeENS2_14default_deleteIS4_EEEENS2_10shared_ptrINS0_18MessageQueueThreadEEENS8_INS0_12TimerManagerEEENS2_8functionIFvRNS_3jsi7RuntimeERKNS0_14JsErrorHandler14ProcessedErrorEEEEPNS0_18jsinspector_modern10HostTargetEENK3$_0clINSD_IFvSG_EEEEEDaT_ENKUlvE_clEv at /Users/mrousavy/Projects/nitro/node_modules/react-native/ReactCommon/react/runtime/ReactInstance.cpp:83
#32	0x0000000106875870 in _ZNSt3__18__invokeB8de190102IRZZN8facebook5react13ReactInstanceC1ENS_10unique_ptrINS2_9JSRuntimeENS_14default_deleteIS5_EEEENS_10shared_ptrINS2_18MessageQueueThreadEEENS9_INS2_12TimerManagerEEENS_8functionIFvRNS1_3jsi7RuntimeERKNS2_14JsErrorHandler14ProcessedErrorEEEEPNS2_18jsinspector_modern10HostTargetEENK3$_0clINSE_IFvSH_EEEEEDaT_EUlvE_JEEEDTclclsr3stdE7declvalISW_EEspclsr3stdE7declvalIT0_EEEEOSW_DpOSZ_ at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.5.sdk/usr/include/c++/v1/__type_traits/invoke.h:149
#33	0x0000000106875828 in _ZNSt3__128__invoke_void_return_wrapperIvLb1EE6__callB8de190102IJRZZN8facebook5react13ReactInstanceC1ENS_10unique_ptrINS4_9JSRuntimeENS_14default_deleteIS7_EEEENS_10shared_ptrINS4_18MessageQueueThreadEEENSB_INS4_12TimerManagerEEENS_8functionIFvRNS3_3jsi7RuntimeERKNS4_14JsErrorHandler14ProcessedErrorEEEEPNS4_18jsinspector_modern10HostTargetEENK3$_0clINSG_IFvSJ_EEEEEDaT_EUlvE_EEEvDpOT_ at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.5.sdk/usr/include/c++/v1/__type_traits/invoke.h:224
#34	0x0000000106875804 in _ZNSt3__110__function12__alloc_funcIZZN8facebook5react13ReactInstanceC1ENS_10unique_ptrINS3_9JSRuntimeENS_14default_deleteIS6_EEEENS_10shared_ptrINS3_18MessageQueueThreadEEENSA_INS3_12TimerManagerEEENS_8functionIFvRNS2_3jsi7RuntimeERKNS3_14JsErrorHandler14ProcessedErrorEEEEPNS3_18jsinspector_modern10HostTargetEENK3$_0clINSF_IFvSI_EEEEEDaT_EUlvE_NS_9allocatorISY_EEFvvEEclB8de190102Ev at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.5.sdk/usr/include/c++/v1/__functional/function.h:171
#35	0x0000000106874544 in _ZNSt3__110__function6__funcIZZN8facebook5react13ReactInstanceC1ENS_10unique_ptrINS3_9JSRuntimeENS_14default_deleteIS6_EEEENS_10shared_ptrINS3_18MessageQueueThreadEEENSA_INS3_12TimerManagerEEENS_8functionIFvRNS2_3jsi7RuntimeERKNS3_14JsErrorHandler14ProcessedErrorEEEEPNS3_18jsinspector_modern10HostTargetEENK3$_0clINSF_IFvSI_EEEEEDaT_EUlvE_NS_9allocatorISY_EEFvvEEclEv at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.5.sdk/usr/include/c++/v1/__functional/function.h:313
#36	0x0000000105bcc560 in std::__1::__function::__value_func<void ()>::operator()[abi:de190102] at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.5.sdk/usr/include/c++/v1/__functional/function.h:430
#37	0x0000000105ba85ac in std::__1::function<void ()>::operator() at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.5.sdk/usr/include/c++/v1/__functional/function.h:989
#38	0x00000001061a9004 in facebook::react::tryAndReturnError at /Users/mrousavy/Projects/nitro/node_modules/react-native/React/CxxModule/RCTCxxUtils.mm:73
#39	0x00000001061d5fd0 in facebook::react::RCTMessageThread::tryFunc at /Users/mrousavy/Projects/nitro/node_modules/react-native/React/CxxBridge/RCTMessageThread.mm:68
#40	0x00000001061da948 in facebook::react::RCTMessageThread::runOnQueue(std::__1::function<void ()>&&)::$_0::operator()() const at /Users/mrousavy/Projects/nitro/node_modules/react-native/React/CxxBridge/RCTMessageThread.mm:81
#41	0x00000001061da8ec in std::__1::__invoke[abi:de190102]<facebook::react::RCTMessageThread::runOnQueue(std::__1::function<void ()>&&)::$_0&> at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.5.sdk/usr/include/c++/v1/__type_traits/invoke.h:149
#42	0x00000001061da8a4 in std::__1::__invoke_void_return_wrapper<void, true>::__call[abi:de190102]<facebook::react::RCTMessageThread::runOnQueue(std::__1::function<void ()>&&)::$_0&> at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.5.sdk/usr/include/c++/v1/__type_traits/invoke.h:224
#43	0x00000001061da880 in std::__1::__function::__alloc_func<facebook::react::RCTMessageThread::runOnQueue(std::__1::function<void ()>&&)::$_0, std::__1::allocator<facebook::react::RCTMessageThread::runOnQueue(std::__1::function<void ()>&&)::$_0>, void ()>::operator()[abi:de190102] at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.5.sdk/usr/include/c++/v1/__functional/function.h:171
#44	0x00000001061d95b0 in std::__1::__function::__func<facebook::react::RCTMessageThread::runOnQueue(std::__1::function<void ()>&&)::$_0, std::__1::allocator<facebook::react::RCTMessageThread::runOnQueue(std::__1::function<void ()>&&)::$_0>, void ()>::operator() at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.5.sdk/usr/include/c++/v1/__functional/function.h:313
#45	0x0000000105bcc560 in std::__1::__function::__value_func<void ()>::operator()[abi:de190102] at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.5.sdk/usr/include/c++/v1/__functional/function.h:430
#46	0x0000000105ba85ac in std::__1::function<void ()>::operator() at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.5.sdk/usr/include/c++/v1/__functional/function.h:989
#47	0x00000001061d5d70 in invocation function for block in facebook::react::RCTMessageThread::runAsync(std::__1::function<void ()>) at /Users/mrousavy/Projects/nitro/node_modules/react-native/React/CxxBridge/RCTMessageThread.mm:44
#48	0x0000000180429134 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ ()
#49	0x0000000180428898 in __CFRunLoopDoBlocks ()
#50	0x0000000180423a2c in __CFRunLoopRun ()
#51	0x0000000180422cec in CFRunLoopRunSpecific ()
#52	0x000000010686048c in +[RCTJSThreadManager runRunLoop] at /Users/mrousavy/Projects/nitro/node_modules/react-native/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTJSThreadManager.mm:102
#53	0x0000000180f35148 in __NSThread__start__ ()
#54	0x00000001001665f0 in _pthread_start ()

MANDATORY Reproducer

mrousavy/nitro#704

Screenshots and Videos

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs: Triage 🔍StaleThere has been a lack of activity on this issue and it may be closed soon.

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions