ReactVision / viro

ViroReact: The AR and VR library for React Native 📳💙💛🤍💚
MIT License
1.31k stars 149 forks source link

null pointer dereference #122

Closed francois-pasquier closed 7 months ago

francois-pasquier commented 2 years ago

Requirements:

Please go through this checklist before opening a new issue

Environment

Please provide the following information about your environment:

  1. Development OS: Mac
  2. Device OS & Version: Android 12
  3. Version: Viro: 2.23.0, React Native: 0.67.4
  4. Device(s): Samsung S21 Ultra 5G

Description

I am getting a crash after going back and forth to the screen containing the Viro scene:

*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***

Unknown

*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***

Build fingerprint: 'samsung/p3sxeea/p3s:12/SP1A.210812.016/G998BXXU4CVC4:user/release-keys'
Revision: '22'
ABI: 'arm64'
Processor: '3'
Timestamp: 2022-03-30 18:00:49.156558187+0200
Process uptime: 54s
Cmdline: com.testapp.integration
pid: 3562, tid: 3562, name: ios.integration  >>> com.testapp.integration <<<
uid: 10586
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
Cause: null pointer dereference
    x0  b40000785c00e770  x1  0000007fef05b918  x2  0000000000000000  x3  0000007fef05a498
    x4  00000000ebad6a89  x5  0000007fef05b7c0  x6  0000000070ac4900  x7  b40000790c0187b0
    x8  f814960fc076b6a7  x9  f814960fc076b6a7  x10 0000000000430000  x11 0000000000080100
    x12 0000007fef05a448  x13 0000000000000002  x14 0000007796edec34  x15 00000000ebad6a89
    x16 00000076da020f8c  x17 0000007fef05b820  x18 000000003d34e333  x19 b40000790c0187b0
    x20 b40000785c00e770  x21 00000076ec8b3370  x22 0000000000000000  x23 b40000790c018860
    x24 0000007aada49000  x25 0000000000000003  x26 00000000000018b5  x27 0000007aada49000
    x28 0000007fef05b830  x29 0000007fef05b810
    lr  00000077970d7648  sp  0000007fef05b7b0  pc  00000076da020fb8  pst 0000000060001000
backtrace:
      #00 pc 0000000000207fb8  /data/app/~~kP2OpcF-SfDrqfqhrlcSWw==/com.testapp.integration-tdoy8dIJDROjFf1VQgkw4A==/base.apk!libviro_renderer.so (Java_com_viro_core_Node_nativeGetAnimationKeys+44) (BuildId: 2d87a5251ea1a895f47f96b1c5348e9d33a41376)
      #01 pc 00000000002d7644  /apex/com.android.art/lib64/libart.so (art_quick_generic_jni_trampoline+148) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
      #02 pc 00000000002cdd64  /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+548) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
      #03 pc 00000000002f23d0  /apex/com.android.art/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+312) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
      #04 pc 00000000003ff868  /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+820) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
      #05 pc 00000000003fe764  /apex/com.android.art/lib64/libart.so (MterpInvokeDirect+1580) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
      #06 pc 00000000002c8514  /apex/com.android.art/lib64/libart.so (mterp_op_invoke_direct+20) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
      #07 pc 00000000000abc74  [anon:dalvik-classes2.dex extracted in memory from /data/app/~~kP2OpcF-SfDrqfqhrlcSWw==/com.testapp.integration-tdoy8dIJDROjFf1VQgkw4A==/base.apk!classes2.dex] (com.viro.core.Node.getAnimationKeys+8)
      #08 pc 000000000027d748  /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.llvm.7449118509010352383)+644) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
      #09 pc 0000000000383478  /apex/com.android.art/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+148) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
      #10 pc 00000000003ffae0  /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+1452) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
      #11 pc 00000000002c43ec  /apex/com.android.art/lib64/libart.so (MterpInvokeVirtual+5380) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
      #12 pc 00000000002c8414  /apex/com.android.art/lib64/libart.so (mterp_op_invoke_virtual+20) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
      #13 pc 00000000000d3a42  [anon:dalvik-classes2.dex extracted in memory from /data/app/~~kP2OpcF-SfDrqfqhrlcSWw==/com.testapp.integration-tdoy8dIJDROjFf1VQgkw4A==/base.apk!classes2.dex] (com.viromedia.bridge.component.node.control.VRT3DObject$Object3dAnimation.loadAnimation+34)
      #14 pc 000000000027d748  /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.llvm.7449118509010352383)+644) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
      #15 pc 0000000000383478  /apex/com.android.art/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+148) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
      #16 pc 00000000003ffae0  /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+1452) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
      #17 pc 00000000002c43ec  /apex/com.android.art/lib64/libart.so (MterpInvokeVirtual+5380) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
      #18 pc 00000000002c8414  /apex/com.android.art/lib64/libart.so (mterp_op_invoke_virtual+20) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
      #19 pc 00000000000cb268  [anon:dalvik-classes2.dex extracted in memory from /data/app/~~kP2OpcF-SfDrqfqhrlcSWw==/com.testapp.integration-tdoy8dIJDROjFf1VQgkw4A==/base.apk!classes2.dex] (com.viromedia.bridge.component.VRTManagedAnimation.handleLoadAnimation+0)
      #20 pc 000000000027d748  /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.llvm.7449118509010352383)+644) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
      #21 pc 0000000000383478  /apex/com.android.art/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+148) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
      #22 pc 00000000003ffae0  /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+1452) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
      #23 pc 00000000003fe764  /apex/com.android.art/lib64/libart.so (MterpInvokeDirect+1580) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
      #24 pc 00000000002c8514  /apex/com.android.art/lib64/libart.so (mterp_op_invoke_direct+20) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
      #25 pc 00000000000cb6bc  [anon:dalvik-classes2.dex extracted in memory from /data/app/~~kP2OpcF-SfDrqfqhrlcSWw==/com.testapp.integration-tdoy8dIJDROjFf1VQgkw4A==/base.apk!classes2.dex] (com.viromedia.bridge.component.VRTManagedAnimation.startAnimation+104)
      #26 pc 000000000027d748  /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.llvm.7449118509010352383)+644) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
      #27 pc 0000000000383478  /apex/com.android.art/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+148) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
      #28 pc 00000000003ffae0  /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+1452) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
      #29 pc 00000000003fe764  /apex/com.android.art/lib64/libart.so (MterpInvokeDirect+1580) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
      #30 pc 00000000002c8514  /apex/com.android.art/lib64/libart.so (mterp_op_invoke_direct+20) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
      #31 pc 00000000000cb55c  [anon:dalvik-classes2.dex extracted in memory from /data/app/~~kP2OpcF-SfDrqfqhrlcSWw==/com.testapp.integration-tdoy8dIJDROjFf1VQgkw4A==/base.apk!classes2.dex] (com.viromedia.bridge.component.VRTManagedAnimation.playAnimation+140)
      #32 pc 000000000027d748  /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.llvm.7449118509010352383)+644) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
      #33 pc 0000000000383478  /apex/com.android.art/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+148) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
      #34 pc 00000000003ffae0  /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+1452) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
      #35 pc 00000000003fe764  /apex/com.android.art/lib64/libart.so (MterpInvokeDirect+1580) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
      #36 pc 00000000002c8514  /apex/com.android.art/lib64/libart.so (mterp_op_invoke_direct+20) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
      #37 pc 00000000000cb2e0  [anon:dalvik-classes2.dex extracted in memory from /data/app/~~kP2OpcF-SfDrqfqhrlcSWw==/com.testapp.integration-tdoy8dIJDROjFf1VQgkw4A==/base.apk!classes2.dex] (com.viromedia.bridge.component.VRTManagedAnimation.onFinishAnimation+76)
      #38 pc 000000000027d748  /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.llvm.7449118509010352383)+644) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
      #39 pc 0000000000383478  /apex/com.android.art/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+148) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
      #40 pc 00000000003ffae0  /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+1452) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
      #41 pc 00000000003fe764  /apex/com.android.art/lib64/libart.so (MterpInvokeDirect+1580) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
      #42 pc 00000000002c8514  /apex/com.android.art/lib64/libart.so (mterp_op_invoke_direct+20) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
      #43 pc 00000000000cb250  [anon:dalvik-classes2.dex extracted in memory from /data/app/~~kP2OpcF-SfDrqfqhrlcSWw==/com.testapp.integration-tdoy8dIJDROjFf1VQgkw4A==/base.apk!classes2.dex] (com.viromedia.bridge.component.VRTManagedAnimation.access$100+0)
      #44 pc 000000000027d748  /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.llvm.7449118509010352383)+644) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
      #45 pc 000000000027c8f0  /apex/com.android.art/lib64/libart.so (artQuickToInterpreterBridge+1176) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
      #46 pc 00000000002d7778  /apex/com.android.art/lib64/libart.so (art_quick_to_interpreter_bridge+88) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
      #47 pc 0000000000209188  /apex/com.android.art/lib64/libart.so (nterp_helper+152) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
      #48 pc 00000000000cb0a8  [anon:dalvik-classes2.dex extracted in memory from /data/app/~~kP2OpcF-SfDrqfqhrlcSWw==/com.testapp.integration-tdoy8dIJDROjFf1VQgkw4A==/base.apk!classes2.dex] (com.viromedia.bridge.component.VRTManagedAnimation$2.onFinish+20)
      #49 pc 000000000020ae64  /apex/com.android.art/lib64/libart.so (nterp_helper+7540) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
      #50 pc 00000000000bd3a8  [anon:dalvik-classes2.dex extracted in memory from /data/app/~~kP2OpcF-SfDrqfqhrlcSWw==/com.testapp.integration-tdoy8dIJDROjFf1VQgkw4A==/base.apk!classes2.dex] (com.viro.core.internal.ExecutableAnimation.animationDidFinish+8)
      #51 pc 00000000002cdd64  /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+548) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
      #52 pc 000000000043a59c  /apex/com.android.art/lib64/libart.so (art::JValue art::InvokeVirtualOrInterfaceWithVarArgs<art::ArtMethod*>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, art::ArtMethod*, std::__va_list)+880) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
      #53 pc 000000000043a1e4  /apex/com.android.art/lib64/libart.so (art::JValue art::InvokeVirtualOrInterfaceWithVarArgs<_jmethodID*>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, std::__va_list)+68) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
      #54 pc 000000000061267c  /apex/com.android.art/lib64/libart.so (art::JNI<true>::CallVoidMethodV(_JNIEnv*, _jobject*, _jmethodID*, std::__va_list)+276) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
      #55 pc 0000000000576528  /apex/com.android.art/lib64/libart.so (art::(anonymous namespace)::CheckJNI::CallMethodV(char const*, _JNIEnv*, _jobject*, _jclass*, _jmethodID*, std::__va_list, art::Primitive::Type, art::InvokeType)+1632) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
      #56 pc 0000000000578b68  /apex/com.android.art/lib64/libart.so (art::(anonymous namespace)::CheckJNI::CallVoidMethodV(_JNIEnv*, _jobject*, _jmethodID*, std::__va_list) (.llvm.13036589948386079409)+72) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
      #57 pc 00000000001ec6c8  /data/app/~~kP2OpcF-SfDrqfqhrlcSWw==/com.testapp.integration-tdoy8dIJDROjFf1VQgkw4A==/base.apk!libviro_renderer.so (_JNIEnv::CallVoidMethod(_jobject*, _jmethodID*, ...)+116) (BuildId: 2d87a5251ea1a895f47f96b1c5348e9d33a41376)
      #58 pc 000000000021ea34  /data/app/~~kP2OpcF-SfDrqfqhrlcSWw==/com.testapp.integration-tdoy8dIJDROjFf1VQgkw4A==/base.apk!libviro_renderer.so (void VROPlatformCallHostFunction<>(_jobject*, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >)+160) (BuildId: 2d87a5251ea1a895f47f96b1c5348e9d33a41376)
      #59 pc 000000000024b4e4  /data/app/~~kP2OpcF-SfDrqfqhrlcSWw==/com.testapp.integration-tdoy8dIJDROjFf1VQgkw4A==/base.apk!libviro_renderer.so (BuildId: 2d87a5251ea1a895f47f96b1c5348e9d33a41376)
      #60 pc 00000000002ad4b4  /data/app/~~kP2OpcF-SfDrqfqhrlcSWw==/com.testapp.integration-tdoy8dIJDROjFf1VQgkw4A==/base.apk!libviro_renderer.so (VROPlatformRunTask(int)+436) (BuildId: 2d87a5251ea1a895f47f96b1c5348e9d33a41376)
      #61 pc 0000000002105800  /memfd:jit-cache (deleted) (art_jni_trampoline+96)
      #62 pc 000000000214cf5c  /memfd:jit-cache (deleted) (com.viro.core.internal.PlatformUtil.access$000+76)
      #63 pc 0000000000209188  /apex/com.android.art/lib64/libart.so (nterp_helper+152) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
      #64 pc 00000000000bfa80  [anon:dalvik-classes2.dex extracted in memory from /data/app/~~kP2OpcF-SfDrqfqhrlcSWw==/com.testapp.integration-tdoy8dIJDROjFf1VQgkw4A==/base.apk!classes2.dex] (com.viro.core.internal.PlatformUtil$TaskRunnable.run+24)
      #65 pc 000000000200a27c  /memfd:jit-cache (deleted) (android.os.Handler.handleCallback+140)
      #66 pc 0000000002009558  /memfd:jit-cache (deleted) (android.os.Handler.dispatchMessage+104)
      #67 pc 00000000020355f4  /memfd:jit-cache (deleted) (android.os.Looper.loopOnce+1348)
      #68 pc 0000000002097110  /memfd:jit-cache (deleted) (android.os.Looper.loop+464)
      #69 pc 00000000002ce07c  /apex/com.android.art/lib64/libart.so (art_quick_osr_stub+60) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
      #70 pc 0000000000781394  /apex/com.android.art/lib64/libart.so (MterpMaybeDoOnStackReplacement+860) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
      #71 pc 00000000002ccf50  /apex/com.android.art/lib64/libart.so (MterpHelpers+240) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
      #72 pc 00000000004ca518  /system/framework/framework.jar (android.os.Looper.loop+160)
      #73 pc 0000000000773cc4  /apex/com.android.art/lib64/libart.so (MterpInvokeStatic+620) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
      #74 pc 00000000002c8594  /apex/com.android.art/lib64/libart.so (mterp_op_invoke_static+20) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
      #75 pc 00000000001bc512  /system/framework/framework.jar (android.app.ActivityThread.main+214)
      #76 pc 000000000027d748  /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.llvm.7449118509010352383)+644) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
      #77 pc 000000000027c8f0  /apex/com.android.art/lib64/libart.so (artQuickToInterpreterBridge+1176) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
      #78 pc 00000000002d7778  /apex/com.android.art/lib64/libart.so (art_quick_to_interpreter_bridge+88) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
      #79 pc 00000000002cdfe8  /apex/com.android.art/lib64/libart.so (art_quick_invoke_static_stub+568) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
      #80 pc 0000000000362f0c  /apex/com.android.art/lib64/libart.so (_jobject* art::InvokeMethod<(art::PointerSize)8>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jobject*, _jobject*, unsigned long)+608) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
      #81 pc 0000000000362c84  /apex/com.android.art/lib64/libart.so (art::Method_invoke(_JNIEnv*, _jobject*, _jobject*, _jobjectArray*)+52) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
      #82 pc 00000000000b2f74  /apex/com.android.art/javalib/arm64/boot.oat (art_jni_trampoline+132) (BuildId: ad9ee401645a5135206a62ff86fc2ef5cdc29120)
      #83 pc 00000000002cdd64  /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+548) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
      #84 pc 00000000002f23d0  /apex/com.android.art/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+312) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
      #85 pc 00000000003ff868  /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+820) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
      #86 pc 00000000002c43ec  /apex/com.android.art/lib64/libart.so (MterpInvokeVirtual+5380) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
      #87 pc 00000000002c8414  /apex/com.android.art/lib64/libart.so (mterp_op_invoke_virtual+20) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
      #88 pc 0000000000458be2  /system/framework/framework.jar (com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run+22)
      #89 pc 000000000027d748  /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.llvm.7449118509010352383)+644) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
      #90 pc 000000000027c8f0  /apex/com.android.art/lib64/libart.so (artQuickToInterpreterBridge+1176) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
      #91 pc 00000000002d7778  /apex/com.android.art/lib64/libart.so (art_quick_to_interpreter_bridge+88) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
      #92 pc 0000000000b457b8  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot-framework.oat (com.android.internal.os.ZygoteInit.main+2376)
      #93 pc 00000000002cdfe8  /apex/com.android.art/lib64/libart.so (art_quick_invoke_static_stub+568) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
      #94 pc 00000000004550b4  /apex/com.android.art/lib64/libart.so (art::JValue art::InvokeWithVarArgs<_jmethodID*>(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, std::__va_list)+464) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
      #95 pc 0000000000633790  /apex/com.android.art/lib64/libart.so (art::JNI<true>::CallStaticVoidMethodV(_JNIEnv*, _jclass*, _jmethodID*, std::__va_list)+268) (BuildId: 2b417e2566f5eb686666666b6ee952ea)
      #96 pc 00000000000b2ac4  /system/lib64/libandroid_runtime.so (_JNIEnv::CallStaticVoidMethod(_jclass*, _jmethodID*, ...)+120) (BuildId: 5d93c2cf9d9e0c9da924b8b1da837a0c)
      #97 pc 00000000000beb68  /system/lib64/libandroid_runtime.so (android::AndroidRuntime::start(char const*, android::Vector<android::String8> const&, bool)+848) (BuildId: 5d93c2cf9d9e0c9da924b8b1da837a0c)
      #98 pc 00000000000025a0  /system/bin/app_process64 (main+1356) (BuildId: 73b34a1dca9817ed76e9e05792a13f29)
      #99 pc 0000000000049944  /apex/com.android.runtime/lib64/bionic/libc.so (__libc_init+96) (BuildId: 673fbd01d6413e96a0627f6f32291870)

I tried with version 2.22.0: it's the same.

Repro

This seems to be triggered when I am not leaving enough time for the viro scene to set up properly.

Is there anything than can be done on the library level to prevent these errors with null pointer dereference?

robertjcolley commented 2 years ago

Can you provide a minimally reproducible repo? maybe fork from the starter kit so we can look into if it's a ViroCore problem or a ViroReact problem.

francois-pasquier commented 2 years ago

So this was due to using @react-navigation/native-stack

This is not happening with @react-navigation/stack

I guess the issue still stands though. What do you think?

I could provide a repro but basically using the native stack and accessing a screen often ends up with the crash.

robertjcolley commented 2 years ago

hmm. We definitely want to warn people about this, so I think it is worth mentioning in the documentation somewhere. There must be some conflict under the hood. @doranteseduardo, what do you think?