iOS Crash - EXC_BAD_ACCESS
See original GitHub issueGoals
- 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
Code Sample
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
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:7 (4 by maintainers)
Top Results From Across the Web
EXC_BAD_ACCESS crash error: Understanding and solving it
EXC_BAD_ACCESS is an exception raised as a result of accessing bad memory. We're constantly working with pointers to memory in Swift that link ......
Read more >Investigating memory access crashes - Apple Developer
For example, consider the following iOS crash report on an arm64 CPU: Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Subtype: KERN_INVALID_ADDRESS at ...
Read more >EXC_BAD_ACCESS signal received - Stack Overflow
In my experience, this is generally caused by an illegal memory access. Check all pointers, especially object pointers, to make sure they're ...
Read more >What Is EXC_BAD_ACCESS and How to Debug It - Code
Whenever you encounter EXC_BAD_ACCESS, it means that you are sending a message to an object that has already been released. This is the...
Read more >iOS app crashes with EXC_BAD_ACCESS ... - GitHub
Description After upgrading from 2.2.0 to 2.3.1, a lot of the same crash has been reported in crashlytics for our users. The crash...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
We’re also experiencing this each time we force quit the simulator or on a real device. Stacktrace:
We are approaching the point where our new JSI based implementation will take over, so I take the liberty to close the issue.