react-native-reanimated: [android] app crash -> JNI DETECTED ERROR IN APPLICATION: java_object == null
Description
My android crashes on startup. Do you have any idea?
Same problem on Android 29 and 30 Same problem with Hermes enabled
Using expo-dev-client.
Expected behavior
app working fine.
Actual behavior & steps to reproduce
java_vm_ext.cc:577] JNI DETECTED ERROR IN APPLICATION: java_object == null
java_vm_ext.cc:577] in call to GetObjectClass
java_vm_ext.cc:577] from void com.swmansion.reanimated.NativeProxy$EventHandler.receiveEvent(java.lang.String, com.facebook.react.bridge.WritableMap)
Sometimes I also get this error:
java_vm_ext.cc:577] JNI DETECTED ERROR IN APPLICATION: use of invalid jobject 0xf2ae4f50
Cannot figure out the cause
java_vm_ext.cc:577] JNI DETECTED ERROR IN APPLICATION: use of invalid jobject 0xf2ae4f50
java_vm_ext.cc:577] from void com.swmansion.reanimated.NativeProxy$EventHandler.receiveEvent(java.lang.String, com.facebook.react.bridge.WritableMap)
or this:
java_vm_ext.cc:577] JNI DETECTED ERROR IN APPLICATION: use of deleted weak global reference 0x6f687067
Cannot figure out the cause
java_vm_ext.cc:577] JNI DETECTED ERROR IN APPLICATION: use of deleted weak global reference 0x6f687067
java_vm_ext.cc:577] from void com.swmansion.reanimated.NativeProxy$EventHandler.receiveEvent(java.lang.String, com.facebook.react.bridge.WritableMap)
Package versions
- React Native: 0.64.3
- React Native Reanimated: 2.2.4 / 2.2.2
- Expo: 43.0.4
Affected platforms
- Android
- iOS
- Web
Probably import aspect in log:
runtime.cc:630] native: #84 pc 00000000001365b8 /apex/com.android.runtime/lib64/libart.so (art_quick_invoke_static_stub+568)
runtime.cc:630] native: #85 pc 00000000001450cc /apex/com.android.runtime/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+276)
runtime.cc:630] native: #86 pc 00000000004b09a0 /apex/com.android.runtime/lib64/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+104)
runtime.cc:630] native: #87 pc 00000000004b23e8 /apex/com.android.runtime/lib64/libart.so (art::InvokeMethod(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jobject*, _jobject*, unsigned long)+1472)
runtime.cc:630] native: #88 pc 000000000043e138 /apex/com.android.runtime/lib64/libart.so (art::Method_invoke(_JNIEnv*, _jobject*, _jobject*, _jobjectArray*)+48)
runtime.cc:630] at com.swmansion.reanimated.NativeProxy$EventHandler.receiveEvent(Native method)
runtime.cc:630] at com.swmansion.reanimated.NativeProxy$EventHandler.receiveEvent(NativeProxy.java:55)
runtime.cc:630] at com.th3rdwave.safeareacontext.InsetsChangeEvent.dispatch(InsetsChangeEvent.java:31)
runtime.cc:630] at com.swmansion.reanimated.NodesManager.handleEvent(NodesManager.java:485)
runtime.cc:630] at com.swmansion.reanimated.NodesManager.onEventDispatch(NodesManager.java:462)
runtime.cc:630] at com.facebook.react.uimanager.events.EventDispatcherImpl.dispatchEvent(EventDispatcherImpl.java:116)
runtime.cc:630] at com.th3rdwave.safeareacontext.SafeAreaProviderManager$1.onInsetsChange(SafeAreaProviderManager.java:47)
runtime.cc:630] at com.th3rdwave.safeareacontext.SafeAreaProvider.maybeUpdateInsets(SafeAreaProvider.java:35)
runtime.cc:630] at com.th3rdwave.safeareacontext.SafeAreaProvider.onPreDraw(SafeAreaProvider.java:58)
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 22
- Comments: 30 (6 by maintainers)
Any updates here? We’re encountering the same issue across two different versions of react native. Crashes on hermes too, when receiving codepush updates (ostensibly bc of restarts) on both runtimes. Of course on hermes you can’t really see the actual problem via stacktrace though
Give me some time, I will try to reproduce your issue on your repo. I will notify you about the progress.
I’m experiencing the same issue with:
@mwegener-com, could you share how did you manage to do that trick of yours that you mention in https://github.com/software-mansion/react-native-reanimated/issues/2710#issuecomment-990003676 ?
@tomekzaw, would the fix from https://github.com/software-mansion/react-native-reanimated/pull/3954 help in the case of this issue?
This issue has been fixed in Expo SDK 45.0.3 and expo-dev-client 0.9.5. Thanks @lukmccall
Same issue in react-native debug build version 0.67.2