Uploaded image for project: 'Realm JavaScript SDK'
  1. Realm JavaScript SDK
  2. RJS-1308

Hermes: EXC_BAD_ACCESS on iOS

    • Type: Icon: Bug Bug
    • Resolution: Works as Designed
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None

      Description

      Trying to run an existing app with hermes enabled + realm@hermes and getting a crash.

      Stacktrace & log output

      Unable to find source-code formatter for language: shell. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
      realm::js::RealmClass<realm::js::hermes::Types>::create_constructor(realm::js::JsiEnv)
      
      com.facebook.react.JavaScript (11): EXC_BAD_ACCESS (code=2, address=0x7fff522d9a55)
      
      #0	0x000000010c3de9cf in bool std::__1::__cxx_atomic_compare_exchange_strong<std::__1::__thread_id>(std::__1::__cxx_atomic_base_impl<std::__1::__thread_id>*, std::__1::__thread_id*, std::__1::__thread_id, std::__1::memory_order, std::__1::memory_order) at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/usr/include/c++/v1/atomic:1025
      #1	0x000000010c3de7fa in std::__1::__atomic_base<std::__1::__thread_id, false>::compare_exchange_strong(std::__1::__thread_id&, std::__1::__thread_id, std::__1::memory_order) at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/usr/include/c++/v1/atomic:1653
      #2	0x000000010c3de664 in facebook::react::(anonymous namespace)::ReentrancyCheck::before() at /Users/som32/Code/paced-ios/node_modules/react-native/ReactCommon/hermes/executor/HermesExecutorFactory.cpp:105
      #3	0x000000010c3de615 in facebook::jsi::detail::BeforeCaller<facebook::react::(anonymous namespace)::ReentrancyCheck, void>::before(facebook::react::(anonymous namespace)::ReentrancyCheck&) at /Users/som32/Code/paced-ios/ios/Pods/Headers/Public/React-jsi/jsi/decorator.h:415
      #4	0x000000010c3de5f3 in facebook::jsi::WithRuntimeDecorator<facebook::react::(anonymous namespace)::ReentrancyCheck, facebook::jsi::Runtime, facebook::jsi::Runtime>::Around::Around(facebook::react::(anonymous namespace)::ReentrancyCheck&) at /Users/som32/Code/paced-ios/ios/Pods/Headers/Public/React-jsi/jsi/decorator.h:740
      #5	0x000000010c3de59d in facebook::jsi::WithRuntimeDecorator<facebook::react::(anonymous namespace)::ReentrancyCheck, facebook::jsi::Runtime, facebook::jsi::Runtime>::Around::Around(facebook::react::(anonymous namespace)::ReentrancyCheck&) at /Users/som32/Code/paced-ios/ios/Pods/Headers/Public/React-jsi/jsi/decorator.h:739
      #6	0x000000010c3d4304 in facebook::jsi::WithRuntimeDecorator<facebook::react::(anonymous namespace)::ReentrancyCheck, facebook::jsi::Runtime, facebook::jsi::Runtime>::drainMicrotasks(int) at /Users/som32/Code/paced-ios/ios/Pods/Headers/Public/React-jsi/jsi/decorator.h:498
      #7	0x000000010c61b674 in realm::js::hermes::ObjectWrap<realm::js::ObservableClass<realm::js::hermes::Types> >::create_constructor(realm::js::JsiEnv) ()
      #8	0x000000010c6140c4 in realm::js::RealmClass<realm::js::hermes::Types>::create_constructor(realm::js::JsiEnv) ()
      #9	0x000000010c613f4d in realm_hermes_init ()
      #10	0x000000010c51417a in __24-[RealmReact setBridge:]_block_invoke at /Users/som32/Code/paced-ios/node_modules/realm/react-native/ios/RealmReact/RealmReact.mm:133
      #11	0x000000010c0f5da1 in decltype(std::__1::forward<void () block_pointer __strong&>(fp)()) std::__1::__invoke<void () block_pointer __strong&>(&&, decltype(std::__1::forward<void () block_pointer __strong&>(fp)())&&...) at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/usr/include/c++/v1/type_traits:3747
      #12	0x000000010c0f5d4d in void std::__1::__invoke_void_return_wrapper<void>::__call<void () block_pointer __strong&>(void () block_pointer __strong&) at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/usr/include/c++/v1/__functional_base:348
      #13	0x000000010c0f5d1d in std::__1::__function::__alloc_func<void () block_pointer __strong, std::__1::allocator<std::__1::allocator>, void ()>::operator()() at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/usr/include/c++/v1/functional:1553
      #14	0x000000010c0f496e in std::__1::__function::__func<void () block_pointer __strong, std::__1::allocator<std::__1::allocator>, void ()>::operator()() at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/usr/include/c++/v1/functional:1727
      #15	0x000000010c0f8355 in std::__1::__function::__value_func<void ()>::operator()() const at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/usr/include/c++/v1/functional:1880
      #16	0x000000010c0f8315 in std::__1::function<void ()>::operator()() const at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/usr/include/c++/v1/functional:2555
      #17	0x000000010c1131e5 in facebook::react::tryAndReturnError(std::__1::function<void ()> const&) at /Users/som32/Code/paced-ios/node_modules/react-native/React/CxxModule/RCTCxxUtils.mm:74
      #18	0x000000010c0da470 in -[RCTCxxBridge _tryAndHandleError:] at /Users/som32/Code/paced-ios/node_modules/react-native/React/CxxBridge/RCTCxxBridge.mm:333
      #19	0x00007fff2597de42 in __NSThreadPerformPerform ()
      #20	0x00007fff23da1c91 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ ()
      #21	0x00007fff23da1bbc in __CFRunLoopDoSource0 ()
      #22	0x00007fff23da1394 in __CFRunLoopDoSources0 ()
      #23	0x00007fff23d9bf8e in __CFRunLoopRun ()
      #24	0x00007fff23d9b8a4 in CFRunLoopRunSpecific ()
      #25	0x000000010c0da231 in +[RCTCxxBridge runRunLoop] at /Users/som32/Code/paced-ios/node_modules/react-native/React/CxxBridge/RCTCxxBridge.mm:324
      #26	0x00007fff2597d9eb in __NSThread__start__ ()
      #27	0x00007fff523098fc in _pthread_start ()
      #28	0x00007fff52305443 in thread_start ()
      

      Can you reproduce a bug?

      Yes, always

      Reproduction Steps

      I know this is not a very useful report right now, but if you point me in a right direction to give you more info then would be happy to do that.

      Also, looks like realm is the only JSI lib currently installed, I have reanimated in the project, but it is 1.x

      Version

      realm@hermes

      What SDK flavour are you using?

      Local Database only

      Are you using encryption?

      No, not using encryption

      Platform OS and version(s)

      RN 0.65.1
      iOS 13.5 simulator

            Assignee:
            Unassigned Unassigned
            Reporter:
            unitosyncbot Unito Sync Bot
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: