Open jalen-ma opened 4 months ago
Hello, thanks for reporting this, however this is not a core issue, It is a JNI issue in the Java SDK. In particular, I think this is the offending code:
JNIEnv* JniUtils::get_env(bool attach_if_needed)
{
REALM_ASSERT_DEBUG(s_instance);
JNIEnv* env;
if (s_instance->m_vm->GetEnv(reinterpret_cast<void**>(&env), s_instance->m_vm_version) != JNI_OK) {
if (attach_if_needed) {
jint ret = s_instance->m_vm->AttachCurrentThread(&env, nullptr);
REALM_ASSERT_RELEASE(ret == JNI_OK);
}
else {
REALM_ASSERT_RELEASE(false);
}
}
return env;
}
I am not an expert, but it seems to me that JniUtils::get_env(bool attach_if_needed)
was called with attach_if_needed = false.
➤ PM Bot commented:
Jira ticket: RJAVA-1252
@jalen-ma
It is similar to https://github.com/realm/realm-java/issues/6987.
How often does it happen? Any particular operation which triggers it?
SDK and version
SDK : java realm-core-12.3.0 Version: 12.3.0
Observations
i dont not the step, user crashes while using the app。
Crash log / stacktrace
backtrace:
00 pc 000000000007066c /apex/com.android.runtime/lib64/bionic/libc.so (abort+160)
01-25 15:23:44.968 22446 22649 E REALM : /tmp/realm-java/realm/realm-library/src/main/cpp/jni_util/jni_utils.cpp:54: [realm-core-12.3.0] Assertion failed: false 01-25 15:23:44.968 22446 22649 E REALM :!!! IMPORTANT: Please report this at https://github.com/realm/realm-core/issues/new/choose
Steps & Code to Reproduce
i dont not the step