-
Type: Bug
-
Resolution: Gone away
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
3 - M (<= 1 month)
-
SDK FY21-Q3.
-
3112
<!---
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 offline use (no syncing)
Expected Results
No crashes
Actual Results
Random crash due to garbage / null reference.
The following crash was reported from Realm code.
EXC_BAD_ACCESS Attempted to dereference null pointer. Tenant Move-In realm::jsc::ObjectWrap<realm::js::SessionClass<realm::jsc::Types> >::set_readonly_property(OpaqueJSContext const*, OpaqueJSValue*, OpaqueJSString*, OpaqueJSValue const*, OpaqueJSValue const**) Tenant Move-In bool realm::js::wrap<&realm::js::ListClass<realm::jsc::Types>::set_index>(OpaqueJSContext const*, OpaqueJSValue*, unsigned int, OpaqueJSValue const*, OpaqueJSValue const**) Tenant Move-In bool realm::js::wrap<&realm::js::ListClass<realm::jsc::Types>::set_index>(OpaqueJSContext const*, OpaqueJSValue*, unsigned int, OpaqueJSValue const*, OpaqueJSValue const**) Tenant Move-In OpaqueJSValue const* realm::js::wrap<&realm::js::RealmClass<realm::jsc::Types>::get_is_partial_realm>(OpaqueJSContext const*, OpaqueJSValue*, OpaqueJSString*, OpaqueJSValue const**) Tenant Move-In OpaqueJSValue const* realm::js::wrap<&realm::js::RealmClass<realm::jsc::Types>::object_for_primary_key>(OpaqueJSContext const*, OpaqueJSValue*, OpaqueJSValue*, unsigned long, OpaqueJSValue const* const*, OpaqueJSValue const**) Frameworks/JavaScriptCore.framework/JavaScriptCore long long JSC::APICallbackFunction::call<JSC::JSCallbackFunction>(JSC::JSGlobalObject*, JSC::CallFrame*) 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::JSGlobalObject*, JSC::JSObject*, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) Frameworks/JavaScriptCore.framework/JavaScriptCore JSC::profiledCall(JSC::JSGlobalObject*, JSC::ProfilingReason, JSC::JSValue, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) Frameworks/JavaScriptCore.framework/JavaScriptCore _JSObjectCallAsFunction Tenant Move-In OpaqueJSValue const* realm::js::wrap<&realm::js::RealmClass<realm::jsc::Types>::get_is_partial_realm>(OpaqueJSContext const*, OpaqueJSValue*, OpaqueJSString*, OpaqueJSValue const**) Tenant Move-In 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::JSGlobalObject*, JSC::CallFrame*) 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::JSGlobalObject*, JSC::JSObject*, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) Frameworks/JavaScriptCore.framework/JavaScriptCore JSC::boundThisNoArgsFunctionCall(JSC::JSGlobalObject*, JSC::CallFrame*) Frameworks/JavaScriptCore.framework/JavaScriptCore _vmEntryToNative Frameworks/JavaScriptCore.framework/JavaScriptCore JSC::Interpreter::executeCall(JSC::JSGlobalObject*, JSC::JSObject*, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) Frameworks/JavaScriptCore.framework/JavaScriptCore JSC::profiledCall(JSC::JSGlobalObject*, JSC::ProfilingReason, JSC::JSValue, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) Frameworks/JavaScriptCore.framework/JavaScriptCore _JSObjectCallAsFunction Tenant Move-In 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> > ()>) Tenant Move-In 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> > ()>) Tenant Move-In 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> > ()>) Tenant Move-In 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> > ()>) Tenant Move-In 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> > ()>) Tenant Move-In 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> > ()>) Tenant Move-In 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> > ()>) Tenant Move-In 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 Tenant Move-In 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__start__ /usr/lib/system/libsystem_pthread.dylib __pthread_start
While I understand this is probably extremely hard to debug/reproduce in a controlled environment, it would be great for Realm to attempt to handle null pointer exceptions in a way that won't crash the whole app, but rather cause a query error or something. This is probably one out of 10 different realm-related native crashes that are reported daily from our crash reporting tool.
Similar crashes:
https://github.com/realm/realm-js/issues/3111
https://github.com/realm/realm-js/issues/2853
https://github.com/realm/realm-js/issues/2828
https://github.com/realm/realm-js/issues/2713
Steps to Reproduce
<!--- What are steps we can follow to reproduce this issue? -->
Regular realm usage without any sync/online features.
Code Sample
Regular offline use, no special code required.
<!---
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: ? 6.0.3
- Node or React Native: ? React Native 0.61.5
- Client OS & Version: ? iOS 13.6 / iPhone 8
- Which debugger for React Native: None - production build
- related to
-
RJS-1079 iOS realm crash on production jsc_value.hpp line 31
- Closed