-
Type: Bug
-
Resolution: Won't Fix
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
SDK FY21-Q3.
-
3206
Using Chrome Debugger and using sorted or filtered on Realm Collection kills the Application
Goals
Using the Chrome Debugger with Realm and sorting/filtering Realm Objects
Expected Results
App not crashing ...
Actual Results
App crashes as soon as the Debugger connects and the filtered or sorted action happens.
2020-09-10 11:43:16.821 297-5036/? E/android.hardware.audio@6.0-impl.ranchu: WriteThread::doWriteImpl:226: pcm_write failed with Operation not permitted 2020-09-10 11:43:16.834 9701-9765/com.realmtest E/unknown:ReactContextBaseJavaModule: Unhandled SoftException java.lang.RuntimeException: Catalyst Instance has already disappeared: requested by WebSocketModule at com.facebook.react.bridge.ReactContextBaseJavaModule.getReactApplicationContextIfActiveOrWarn(ReactContextBaseJavaModule.java:67) at com.facebook.react.modules.websocket.WebSocketModule.sendEvent(WebSocketModule.java:62) at com.facebook.react.modules.websocket.WebSocketModule.access$100(WebSocketModule.java:40) at com.facebook.react.modules.websocket.WebSocketModule$1.onMessage(WebSocketModule.java:190) at okhttp3.internal.ws.RealWebSocket.onReadMessage(RealWebSocket.java:323) at okhttp3.internal.ws.WebSocketReader.readMessageFrame(WebSocketReader.java:219) at okhttp3.internal.ws.WebSocketReader.processNextFrame(WebSocketReader.java:105) at okhttp3.internal.ws.RealWebSocket.loopReader(RealWebSocket.java:274) at okhttp3.internal.ws.RealWebSocket$2.onResponse(RealWebSocket.java:214) at okhttp3.RealCall$AsyncCall.execute(RealCall.java:206) at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at java.lang.Thread.run(Thread.java:923) 2020-09-10 11:43:16.835 9701-9765/com.realmtest I/chatty: uid=10166(com.realmtest) .0.2.2:8081/... identical 1 line 2020-09-10 11:43:16.835 9701-9765/com.realmtest E/unknown:ReactContextBaseJavaModule: Unhandled SoftException java.lang.RuntimeException: Catalyst Instance has already disappeared: requested by WebSocketModule at com.facebook.react.bridge.ReactContextBaseJavaModule.getReactApplicationContextIfActiveOrWarn(ReactContextBaseJavaModule.java:67) at com.facebook.react.modules.websocket.WebSocketModule.sendEvent(WebSocketModule.java:62) at com.facebook.react.modules.websocket.WebSocketModule.access$100(WebSocketModule.java:40) at com.facebook.react.modules.websocket.WebSocketModule$1.onMessage(WebSocketModule.java:190) at okhttp3.internal.ws.RealWebSocket.onReadMessage(RealWebSocket.java:323) at okhttp3.internal.ws.WebSocketReader.readMessageFrame(WebSocketReader.java:219) at okhttp3.internal.ws.WebSocketReader.processNextFrame(WebSocketReader.java:105) at okhttp3.internal.ws.RealWebSocket.loopReader(RealWebSocket.java:274) at okhttp3.internal.ws.RealWebSocket$2.onResponse(RealWebSocket.java:214) at okhttp3.RealCall$AsyncCall.execute(RealCall.java:206) at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at java.lang.Thread.run(Thread.java:923) 2020-09-10 11:43:16.836 297-5036/? E/android.hardware.audio@6.0-impl.ranchu: WriteThread::doWriteImpl:226: pcm_write failed with Operation not permitted --------- beginning of crash 2020-09-10 11:43:16.937 9701-9789/com.realmtest A/libc: /Volumes/Android/buildbot/src/android/ndk-release-r21/external/libcxx/../../external/libcxxabi/src/abort_message.cpp:72: abort_message: assertion "terminating with uncaught exception of type realm::js::Exception<realm::jsc::Types>: Error: results.filtered was called on non-Realm object !" failed 2020-09-10 11:43:16.937 9701-9789/com.realmtest A/libc: Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 9789 (MyHandlerThread), pid 9701 (com.realmtest) 2020-09-10 11:43:16.982 297-5036/? I/chatty: uid=1041(audioserver) /vendor/bin/hw/android.hardware.audio.service identical 20 lines 2020-09-10 11:43:16.983 297-5036/? E/android.hardware.audio@6.0-impl.ranchu: WriteThread::doWriteImpl:226: pcm_write failed with Operation not permitted 2020-09-10 11:43:16.987 9799-9799/? I/crash_dump32: obtaining output fd from tombstoned, type: kDebuggerdTombstone 2020-09-10 11:43:16.988 277-277/? I/tombstoned: received crash request for pid 9789 2020-09-10 11:43:16.989 9799-9799/? I/crash_dump32: performing dump of process 9701 (target tid = 9789) 2020-09-10 11:43:16.994 9799-9799/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** 2020-09-10 11:43:16.994 9799-9799/? A/DEBUG: Build fingerprint: 'google/sdk_gphone_x86_arm/generic_x86_arm:11/RPB3.200720.005/6705141:userdebug/dev-keys' 2020-09-10 11:43:16.994 9799-9799/? A/DEBUG: Revision: '0' 2020-09-10 11:43:16.994 9799-9799/? A/DEBUG: ABI: 'x86' 2020-09-10 11:43:16.995 9799-9799/? A/DEBUG: Timestamp: 2020-09-10 11:43:16+0200 2020-09-10 11:43:16.995 9799-9799/? A/DEBUG: pid: 9701, tid: 9789, name: MyHandlerThread >>> com.realmtest <<< 2020-09-10 11:43:16.995 9799-9799/? A/DEBUG: uid: 10166 2020-09-10 11:43:16.995 9799-9799/? A/DEBUG: signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr -------- 2020-09-10 11:43:16.995 9799-9799/? A/DEBUG: Abort message: '/Volumes/Android/buildbot/src/android/ndk-release-r21/external/libcxx/../../external/libcxxabi/src/abort_message.cpp:72: abort_message: assertion "terminating with uncaught exception of type realm::js::Exception<realm::jsc::Types>: Error: results.filtered was called on non-Realm object !" failed' 2020-09-10 11:43:16.995 9799-9799/? A/DEBUG: eax 00000000 ebx 000025e5 ecx 0000263d edx 00000006 2020-09-10 11:43:16.995 9799-9799/? A/DEBUG: edi eccfb6be esi c026c890 2020-09-10 11:43:16.995 9799-9799/? A/DEBUG: ebp f25c4b90 esp c026c838 eip f25c4b99 2020-09-10 11:43:16.997 297-5036/? E/android.hardware.audio@6.0-impl.ranchu: WriteThread::doWriteImpl:226: pcm_write failed with Operation not permitted 2020-09-10 11:43:17.092 9799-9799/? A/DEBUG: backtrace: 2020-09-10 11:43:17.092 9799-9799/? A/DEBUG: #00 pc 00000b99 [vdso] (__kernel_vsyscall+9) 2020-09-10 11:43:17.092 9799-9799/? A/DEBUG: #01 pc 0005ace8 /apex/com.android.runtime/lib/bionic/libc.so (syscall+40) (BuildId: 787473e23bc7d49ac38e635c3435c37a) 2020-09-10 11:43:17.092 9799-9799/? A/DEBUG: #02 pc 00076491 /apex/com.android.runtime/lib/bionic/libc.so (abort+209) (BuildId: 787473e23bc7d49ac38e635c3435c37a) 2020-09-10 11:43:17.093 9799-9799/? A/DEBUG: #03 pc 000769a8 /apex/com.android.runtime/lib/bionic/libc.so (__assert2+56) (BuildId: 787473e23bc7d49ac38e635c3435c37a) 2020-09-10 11:43:17.093 9799-9799/? A/DEBUG: #04 pc 00a10a04 /data/app/~~qDS7Stzf6k-wP3w0Qj6C8Q==/com.realmtest-duX4gxefslSb5m3aKNg-bw==/lib/x86/librealmreact.so (BuildId: 4351713ef18c06eb8a181140dfcc999e8cb7df20) 2020-09-10 11:43:17.093 9799-9799/? A/DEBUG: #05 pc 00a10b6e /data/app/~~qDS7Stzf6k-wP3w0Qj6C8Q==/com.realmtest-duX4gxefslSb5m3aKNg-bw==/lib/x86/librealmreact.so (BuildId: 4351713ef18c06eb8a181140dfcc999e8cb7df20) 2020-09-10 11:43:17.093 9799-9799/? A/DEBUG: #06 pc 00a0d539 /data/app/~~qDS7Stzf6k-wP3w0Qj6C8Q==/com.realmtest-duX4gxefslSb5m3aKNg-bw==/lib/x86/librealmreact.so (BuildId: 4351713ef18c06eb8a181140dfcc999e8cb7df20) 2020-09-10 11:43:17.093 9799-9799/? A/DEBUG: #07 pc 00a0c93e /data/app/~~qDS7Stzf6k-wP3w0Qj6C8Q==/com.realmtest-duX4gxefslSb5m3aKNg-bw==/lib/x86/librealmreact.so (BuildId: 4351713ef18c06eb8a181140dfcc999e8cb7df20) 2020-09-10 11:43:17.093 9799-9799/? A/DEBUG: #08 pc 00a0c893 /data/app/~~qDS7Stzf6k-wP3w0Qj6C8Q==/com.realmtest-duX4gxefslSb5m3aKNg-bw==/lib/x86/librealmreact.so (__cxa_throw+115) (BuildId: 4351713ef18c06eb8a181140dfcc999e8cb7df20) 2020-09-10 11:43:17.093 9799-9799/? A/DEBUG: #09 pc 0012e71e /data/app/~~qDS7Stzf6k-wP3w0Qj6C8Q==/com.realmtest-duX4gxefslSb5m3aKNg-bw==/lib/x86/librealmreact.so (BuildId: 4351713ef18c06eb8a181140dfcc999e8cb7df20) 2020-09-10 11:43:17.093 9799-9799/? A/DEBUG: #10 pc 00155643 /data/app/~~qDS7Stzf6k-wP3w0Qj6C8Q==/com.realmtest-duX4gxefslSb5m3aKNg-bw==/lib/x86/librealmreact.so (BuildId: 4351713ef18c06eb8a181140dfcc999e8cb7df20) 2020-09-10 11:43:17.093 9799-9799/? A/DEBUG: #11 pc 001aa955 /data/app/~~qDS7Stzf6k-wP3w0Qj6C8Q==/com.realmtest-duX4gxefslSb5m3aKNg-bw==/lib/x86/librealmreact.so (BuildId: 4351713ef18c06eb8a181140dfcc999e8cb7df20) 2020-09-10 11:43:17.093 9799-9799/? A/DEBUG: #12 pc 001aa5fa /data/app/~~qDS7Stzf6k-wP3w0Qj6C8Q==/com.realmtest-duX4gxefslSb5m3aKNg-bw==/lib/x86/librealmreact.so (BuildId: 4351713ef18c06eb8a181140dfcc999e8cb7df20) 2020-09-10 11:43:17.093 9799-9799/? A/DEBUG: #13 pc 00342988 /data/app/~~qDS7Stzf6k-wP3w0Qj6C8Q==/com.realmtest-duX4gxefslSb5m3aKNg-bw==/lib/x86/librealmreact.so (BuildId: 4351713ef18c06eb8a181140dfcc999e8cb7df20) 2020-09-10 11:43:17.093 9799-9799/? A/DEBUG: #14 pc 0034288c /data/app/~~qDS7Stzf6k-wP3w0Qj6C8Q==/com.realmtest-duX4gxefslSb5m3aKNg-bw==/lib/x86/librealmreact.so (BuildId: 4351713ef18c06eb8a181140dfcc999e8cb7df20) 2020-09-10 11:43:17.093 9799-9799/? A/DEBUG: #15 pc 003233d5 /data/app/~~qDS7Stzf6k-wP3w0Qj6C8Q==/com.realmtest-duX4gxefslSb5m3aKNg-bw==/lib/x86/librealmreact.so (BuildId: 4351713ef18c06eb8a181140dfcc999e8cb7df20) 2020-09-10 11:43:17.093 9799-9799/? A/DEBUG: #16 pc 003232e1 /data/app/~~qDS7Stzf6k-wP3w0Qj6C8Q==/com.realmtest-duX4gxefslSb5m3aKNg-bw==/lib/x86/librealmreact.so (BuildId: 4351713ef18c06eb8a181140dfcc999e8cb7df20) 2020-09-10 11:43:17.093 9799-9799/? A/DEBUG: #17 pc 0035a190 /data/app/~~qDS7Stzf6k-wP3w0Qj6C8Q==/com.realmtest-duX4gxefslSb5m3aKNg-bw==/lib/x86/librealmreact.so (BuildId: 4351713ef18c06eb8a181140dfcc999e8cb7df20) 2020-09-10 11:43:17.093 9799-9799/? A/DEBUG: #18 pc 00465c0c /data/app/~~qDS7Stzf6k-wP3w0Qj6C8Q==/com.realmtest-duX4gxefslSb5m3aKNg-bw==/lib/x86/librealmreact.so (BuildId: 4351713ef18c06eb8a181140dfcc999e8cb7df20) 2020-09-10 11:43:17.093 9799-9799/? A/DEBUG: #19 pc 003b2fe0 /data/app/~~qDS7Stzf6k-wP3w0Qj6C8Q==/com.realmtest-duX4gxefslSb5m3aKNg-bw==/lib/x86/librealmreact.so (BuildId: 4351713ef18c06eb8a181140dfcc999e8cb7df20) 2020-09-10 11:43:17.093 9799-9799/? A/DEBUG: #20 pc 003b2f39 /data/app/~~qDS7Stzf6k-wP3w0Qj6C8Q==/com.realmtest-duX4gxefslSb5m3aKNg-bw==/lib/x86/librealmreact.so (BuildId: 4351713ef18c06eb8a181140dfcc999e8cb7df20) 2020-09-10 11:43:17.093 9799-9799/? A/DEBUG: #21 pc 003b2ec9 /data/app/~~qDS7Stzf6k-wP3w0Qj6C8Q==/com.realmtest-duX4gxefslSb5m3aKNg-bw==/lib/x86/librealmreact.so (BuildId: 4351713ef18c06eb8a181140dfcc999e8cb7df20) 2020-09-10 11:43:17.093 9799-9799/? A/DEBUG: #22 pc 003b2e89 /data/app/~~qDS7Stzf6k-wP3w0Qj6C8Q==/com.realmtest-duX4gxefslSb5m3aKNg-bw==/lib/x86/librealmreact.so (BuildId: 4351713ef18c06eb8a181140dfcc999e8cb7df20) 2020-09-10 11:43:17.093 9799-9799/? A/DEBUG: #23 pc 003b14ac /data/app/~~qDS7Stzf6k-wP3w0Qj6C8Q==/com.realmtest-duX4gxefslSb5m3aKNg-bw==/lib/x86/librealmreact.so (BuildId: 4351713ef18c06eb8a181140dfcc999e8cb7df20) 2020-09-10 11:43:17.093 9799-9799/? A/DEBUG: #24 pc 00107219 /data/app/~~qDS7Stzf6k-wP3w0Qj6C8Q==/com.realmtest-duX4gxefslSb5m3aKNg-bw==/lib/x86/librealmreact.so (BuildId: 4351713ef18c06eb8a181140dfcc999e8cb7df20) 2020-09-10 11:43:17.093 9799-9799/? A/DEBUG: #25 pc 000d4099 /data/app/~~qDS7Stzf6k-wP3w0Qj6C8Q==/com.realmtest-duX4gxefslSb5m3aKNg-bw==/lib/x86/librealmreact.so (BuildId: 4351713ef18c06eb8a181140dfcc999e8cb7df20) 2020-09-10 11:43:17.093 9799-9799/? A/DEBUG: #26 pc 0049271f /data/app/~~qDS7Stzf6k-wP3w0Qj6C8Q==/com.realmtest-duX4gxefslSb5m3aKNg-bw==/lib/x86/librealmreact.so (BuildId: 4351713ef18c06eb8a181140dfcc999e8cb7df20) 2020-09-10 11:43:17.093 9799-9799/? A/DEBUG: #27 pc 00019317 /system/lib/libutils.so (android::SimpleLooperCallback::handleEvent(int, int, void*)+39) (BuildId: df5e439b9cfb339c99aec13e187260c4) 2020-09-10 11:43:17.093 9799-9799/? A/DEBUG: #28 pc 0001a347 /system/lib/libutils.so (android::Looper::pollInner(int)+1127) (BuildId: df5e439b9cfb339c99aec13e187260c4) 2020-09-10 11:43:17.093 9799-9799/? A/DEBUG: #29 pc 00019e76 /system/lib/libutils.so (android::Looper::pollOnce(int, int*, int*, void**)+118) (BuildId: df5e439b9cfb339c99aec13e187260c4) 2020-09-10 11:43:17.093 9799-9799/? A/DEBUG: #30 pc 0010ef8b /system/lib/libandroid_runtime.so (android::android_os_MessageQueue_nativePollOnce(_JNIEnv*, _jobject*, long long, int)+59) (BuildId: 588f2cd5873ff4273bb25b25edb82606) 2020-09-10 11:43:17.094 9799-9799/? A/DEBUG: #31 pc 0021be48 /system/framework/x86/boot-framework.oat (art_jni_trampoline+136) (BuildId: 375b62d9c33d1f72c4ee1fc4e2ab1a8116b1ea03) 2020-09-10 11:43:17.094 9799-9799/? A/DEBUG: #32 pc 02007666 /memfd:jit-cache (deleted) (offset 0x2000000) (android.os.MessageQueue.next+230) 2020-09-10 11:43:17.094 9799-9799/? A/DEBUG: #33 pc 02009a51 /memfd:jit-cache (deleted) (offset 0x2000000) (android.os.Looper.loop+561) 2020-09-10 11:43:17.094 9799-9799/? A/DEBUG: #34 pc 0013baf2 /apex/com.android.art/lib/libart.so (art_quick_invoke_static_stub+418) (BuildId: 123e60096a46399e6f56e4eb5c70759a) 2020-09-10 11:43:17.094 9799-9799/? A/DEBUG: #35 pc 001d0392 /apex/com.android.art/lib/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+258) (BuildId: 123e60096a46399e6f56e4eb5c70759a) 2020-09-10 11:43:17.094 9799-9799/? A/DEBUG: #36 pc 003866e1 /apex/com.android.art/lib/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+385) (BuildId: 123e60096a46399e6f56e4eb5c70759a) 2020-09-10 11:43:17.094 9799-9799/? A/DEBUG: #37 pc 0037aa1e /apex/com.android.art/lib/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+1070) (BuildId: 123e60096a46399e6f56e4eb5c70759a) 2020-09-10 11:43:17.094 9799-9799/? A/DEBUG: #38 pc 007a4d0d /apex/com.android.art/lib/libart.so (MterpInvokeStatic+637) (BuildId: 123e60096a46399e6f56e4eb5c70759a) 2020-09-10 11:43:17.094 9799-9799/? A/DEBUG: #39 pc 00135921 /apex/com.android.art/lib/libart.so (mterp_op_invoke_static+33) (BuildId: 123e60096a46399e6f56e4eb5c70759a) 2020-09-10 11:43:17.094 9799-9799/? A/DEBUG: #40 pc 0036e970 /system/framework/framework.jar (offset 0x92b000) (android.os.HandlerThread.run+56) 2020-09-10 11:43:17.094 9799-9799/? A/DEBUG: #41 pc 0036fae2 /apex/com.android.art/lib/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.llvm.12175385690420896393)+370) (BuildId: 123e60096a46399e6f56e4eb5c70759a) 2020-09-10 11:43:17.094 9799-9799/? A/DEBUG: #42 pc 00379ae0 /apex/com.android.art/lib/libart.so (art::interpreter::EnterInterpreterFromEntryPoint(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*)+176) (BuildId: 123e60096a46399e6f56e4eb5c70759a) 2020-09-10 11:43:17.094 9799-9799/? A/DEBUG: #43 pc 0078b305 /apex/com.android.art/lib/libart.so (artQuickToInterpreterBridge+1061) (BuildId: 123e60096a46399e6f56e4eb5c70759a) 2020-09-10 11:43:17.094 9799-9799/? A/DEBUG: #44 pc 0014220d /apex/com.android.art/lib/libart.so (art_quick_to_interpreter_bridge+77) (BuildId: 123e60096a46399e6f56e4eb5c70759a) 2020-09-10 11:43:17.094 9799-9799/? A/DEBUG: #45 pc 0013b922 /apex/com.android.art/lib/libart.so (art_quick_invoke_stub+338) (BuildId: 123e60096a46399e6f56e4eb5c70759a) 2020-09-10 11:43:17.094 9799-9799/? A/DEBUG: #46 pc 001d0381 /apex/com.android.art/lib/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+241) (BuildId: 123e60096a46399e6f56e4eb5c70759a) 2020-09-10 11:43:17.094 9799-9799/? A/DEBUG: #47 pc 0062f35c /apex/com.android.art/lib/libart.so (art::JValue art::InvokeVirtualOrInterfaceWithJValues<art::ArtMethod*>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, art::ArtMethod*, jvalue const*)+620) (BuildId: 123e60096a46399e6f56e4eb5c70759a) 2020-09-10 11:43:17.094 9799-9799/? A/DEBUG: #48 pc 0062f575 /apex/com.android.art/lib/libart.so (art::JValue art::InvokeVirtualOrInterfaceWithJValues<_jmethodID*>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, jvalue const*)+85) (BuildId: 123e60096a46399e6f56e4eb5c70759a) 2020-09-10 11:43:17.094 9799-9799/? A/DEBUG: #49 pc 006976e1 /apex/com.android.art/lib/libart.so (art::Thread::CreateCallback(void*)+1537) (BuildId: 123e60096a46399e6f56e4eb5c70759a) 2020-09-10 11:43:17.094 9799-9799/? A/DEBUG: #50 pc 000e6814 /apex/com.android.runtime/lib/bionic/libc.so (__pthread_start(void*)+100) (BuildId: 787473e23bc7d49ac38e635c3435c37a) 2020-09-10 11:43:17.094 9799-9799/? A/DEBUG: #51 pc 000784e7 /apex/com.android.runtime/lib/bionic/libc.so (__start_thread+71) (BuildId: 787473e23bc7d49ac38e635c3435c37a)
Steps to Reproduce
Either fork this small Project https://github.com/Shumuu/RealmSnapshot or
Create a new React Native Project with npx react-native init TestProject, add Realm npm i realm, create some Schema, add a Listener and sort or filter
Code Sample
const todoListener = (collection, changes) => { // if you comment sorted and filtered out, the App will work with the debugger //collection.sorted('name'); console.log(collection.filtered('name == $0', 'test')); setTodos(collection); };
Version of Realm and Tooling
- Realm JS SDK Version: realm 6.1.0
- React Native: 0.62.2
- Client OS & Version: Ubuntu Mate 18 LTS
- Which debugger for React Native: Chrome