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

iOS Crash - EXC_BAD_ACCESS

      <!---

      Questions: If you have questions about HOW TO use Realm, please ask on
      StackOverflow: http://stackoverflow.com/questions/ask?tags=realm
      We monitor the realm tag.

      Feature Request: Just fill in the first two sections below.

      Bugs: To help you as fast as possible with an issue please describe your issue
      and the steps you have taken to reproduce it in as much detail as possible.

      -->

      Goals

      • Regular use

      Expected Results

      • Regular use

      Actual Results

      Our crash reporting tool reported the following iOS crash/exception coming from RealmJS. While I do not have any steps to reproduce or anything specific to share (just regular use, no sync), the crash happened right before the "app will terminate" event.

      Below is the crash log:

      EXC_BAD_ACCESS Attempted to dereference garbage pointer 0x10. 
          Frameworks/JavaScriptCore.framework/JavaScriptCore JSC::JSGlobalObject::getOwnPropertySlot(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&)
          Frameworks/JavaScriptCore.framework/JavaScriptCore JSC::JSProxy::getOwnPropertySlot(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&)
          Frameworks/JavaScriptCore.framework/JavaScriptCore JSC::JSObject::get(JSC::ExecState*, JSC::PropertyName) const
          Frameworks/JavaScriptCore.framework/JavaScriptCore _JSObjectGetProperty
          zinspector3 void std::__1::__call_once_proxy<std::__1::tuple<realm::SyncManager& realm::js::syncManagerShared<realm::jsc::Types>(realm::jsc::Types::Context&)::{lambda()#1}&&> >(void*)
          zinspector3 void std::__1::__call_once_proxy<std::__1::tuple<realm::SyncManager& realm::js::syncManagerShared<realm::jsc::Types>(realm::jsc::Types::Context&)::{lambda()#1}&&> >(void*)
          zinspector3 realm::jsc::ObjectWrap<realm::js::AsyncOpenTaskClass<realm::jsc::Types> >::set_readonly_property(OpaqueJSContext const*, OpaqueJSValue*, OpaqueJSString*, OpaqueJSValue const*, OpaqueJSValue const**)
          zinspector3 OpaqueJSValue const* realm::js::wrap<&realm::js::RealmClass<realm::jsc::Types>::create>(OpaqueJSContext const*, OpaqueJSValue*, OpaqueJSValue*, unsigned long, OpaqueJSValue const* const*, OpaqueJSValue const**)
          Frameworks/JavaScriptCore.framework/JavaScriptCore long long JSC::APICallbackFunction::call<JSC::JSCallbackFunction>(JSC::ExecState*)
          Frameworks/JavaScriptCore.framework/JavaScriptCore _llint_entry
          Frameworks/JavaScriptCore.framework/JavaScriptCore _llint_entry
          Frameworks/JavaScriptCore.framework/JavaScriptCore _llint_entry
          Frameworks/JavaScriptCore.framework/JavaScriptCore _vmEntryToJavaScript
          Frameworks/JavaScriptCore.framework/JavaScriptCore JSC::Interpreter::executeCall(JSC::ExecState*, JSC::JSObject*, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&)
          Frameworks/JavaScriptCore.framework/JavaScriptCore JSC::profiledCall(JSC::ExecState*, JSC::ProfilingReason, JSC::JSValue, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&)
          Frameworks/JavaScriptCore.framework/JavaScriptCore _JSObjectCallAsFunction
          zinspector3 realm::jsc::ObjectWrap<realm::js::AsyncOpenTaskClass<realm::jsc::Types> >::set_readonly_property(OpaqueJSContext const*, OpaqueJSValue*, OpaqueJSString*, OpaqueJSValue const*, OpaqueJSValue const**)
          zinspector3 OpaqueJSValue const* realm::js::wrap<&realm::js::RealmClass<realm::jsc::Types>::write>(OpaqueJSContext const*, OpaqueJSValue*, OpaqueJSValue*, unsigned long, OpaqueJSValue const* const*, OpaqueJSValue const**)
          Frameworks/JavaScriptCore.framework/JavaScriptCore long long JSC::APICallbackFunction::call<JSC::JSCallbackFunction>(JSC::ExecState*)
          Frameworks/JavaScriptCore.framework/JavaScriptCore _llint_entry
          Frameworks/JavaScriptCore.framework/JavaScriptCore _llint_entry
          Frameworks/JavaScriptCore.framework/JavaScriptCore _llint_entry
          Frameworks/JavaScriptCore.framework/JavaScriptCore _llint_entry
          Frameworks/JavaScriptCore.framework/JavaScriptCore _llint_entry
          Frameworks/JavaScriptCore.framework/JavaScriptCore _llint_entry
          Frameworks/JavaScriptCore.framework/JavaScriptCore _llint_entry
          Frameworks/JavaScriptCore.framework/JavaScriptCore _llint_entry
          Frameworks/JavaScriptCore.framework/JavaScriptCore _vmEntryToJavaScript
          Frameworks/JavaScriptCore.framework/JavaScriptCore JSC::Interpreter::executeCall(JSC::ExecState*, JSC::JSObject*, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&)
          Frameworks/JavaScriptCore.framework/JavaScriptCore JSC::boundThisNoArgsFunctionCall(JSC::ExecState*)
          Frameworks/JavaScriptCore.framework/JavaScriptCore _vmEntryToNative
          Frameworks/JavaScriptCore.framework/JavaScriptCore JSC::Interpreter::executeCall(JSC::ExecState*, JSC::JSObject*, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&)
          Frameworks/JavaScriptCore.framework/JavaScriptCore JSC::profiledCall(JSC::ExecState*, JSC::ProfilingReason, JSC::JSValue, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&)
          Frameworks/JavaScriptCore.framework/JavaScriptCore _JSObjectCallAsFunction
          zinspector3 facebook::react::JSIExecutor::defaultTimeoutInvoker(std::__1::function<void ()> const&, std::__1::function<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > ()>)
          zinspector3 facebook::react::JSIExecutor::defaultTimeoutInvoker(std::__1::function<void ()> const&, std::__1::function<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > ()>)
          zinspector3 facebook::react::JSIExecutor::defaultTimeoutInvoker(std::__1::function<void ()> const&, std::__1::function<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > ()>)
          zinspector3 facebook::react::JSIExecutor::defaultTimeoutInvoker(std::__1::function<void ()> const&, std::__1::function<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > ()>)
          zinspector3 facebook::react::JSIExecutor::defaultTimeoutInvoker(std::__1::function<void ()> const&, std::__1::function<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > ()>)
          zinspector3 facebook::react::JSIExecutor::defaultTimeoutInvoker(std::__1::function<void ()> const&, std::__1::function<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > ()>)
          zinspector3 facebook::react::JSIExecutor::defaultTimeoutInvoker(std::__1::function<void ()> const&, std::__1::function<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > ()>)
          zinspector3 facebook::react::JSIExecutor::defaultTimeoutInvoker(std::__1::function<void ()> const&, std::__1::function<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > ()>)
          Frameworks/CoreFoundation.framework/CoreFoundation ___CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__
          Frameworks/CoreFoundation.framework/CoreFoundation ___CFRunLoopDoBlocks
          Frameworks/CoreFoundation.framework/CoreFoundation ___CFRunLoopRun
          Frameworks/CoreFoundation.framework/CoreFoundation _CFRunLoopRunSpecific
          zinspector3 facebook::react::JSIExecutor::defaultTimeoutInvoker(std::__1::function<void ()> const&, std::__1::function<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > ()>)
          Frameworks/Foundation.framework/Foundation -[NSThread main]
          Frameworks/Foundation.framework/Foundation ___NSThread__start__
          /usr/lib/system/libsystem_pthread.dylib __pthread_start
      

      Steps to Reproduce

      <!--- What are steps we can follow to reproduce this issue? -->

      Code Sample

      <!---
      Please provide a code sample or test case that highlights the issue.
      If relevant, include your model definitions.
      For larger code samples, links to external gists/repositories are preferred.
      Full projects that we can compile and run ourselves are ideal!
      -->

      Version of Realm and Tooling

      • Realm JS SDK Version: 3.6.3
      • Node or React Native: 0.61.5
      • Client OS & Version: iOS 13.3
      • Which debugger for React Native: None

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

              Created:
              Updated:
              Resolved: