Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[realm-core-12.3.0] Assertion failed: false #7877

Closed
jalen-ma opened this issue Jan 25, 2024 · 3 comments
Closed

[realm-core-12.3.0] Assertion failed: false #7877

jalen-ma opened this issue Jan 25, 2024 · 3 comments
Labels
O-Community Waiting-For-Reporter Waiting for more information from the reporter before we can proceed

Comments

@jalen-ma
Copy link

jalen-ma commented Jan 25, 2024

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)
realm/realm-core#1 pc 000000000066d55c /data/app/com.demo.eh-9zyvbbrKmFJvAIcxvAHXjw==/lib/arm64/librealm-jni.so
realm/realm-core#2 pc 000000000066d858 /data/app/com.demo.eh-9zyvbbrKmFJvAIcxvAHXjw==/lib/arm64/librealm-jni.so
realm/realm-core#3 pc 000000000066d694 /data/app/com.demo.eh-9zyvbbrKmFJvAIcxvAHXjw==/lib/arm64/librealm-jni.so
realm/realm-core#4 pc 00000000003c64b8 /data/app/com.demo.eh-9zyvbbrKmFJvAIcxvAHXjw==/lib/arm64/librealm-jni.so
realm/realm-core#5 pc 00000000000d2578 /apex/com.android.runtime/lib64/bionic/libc.so (__cxa_finalize+212)
realm/realm-core#6 pc 00000000000cdf60 /apex/com.android.runtime/lib64/bionic/libc.so (exit+24)
realm/realm-core#7 pc 0000000000557828 /data/app/com.demo.eh-9zyvbbrKmFJvAIcxvAHXjw==/lib/arm64/libflutter.so
realm/realm-core#8 pc 00000000005591b8 /data/app/com.demo.eh-9zyvbbrKmFJvAIcxvAHXjw==/lib/arm64/libflutter.so
realm/realm-core#9 pc 000000000062da0c /data/app/com.demo.eh-9zyvbbrKmFJvAIcxvAHXjw==/lib/arm64/libflutter.so
realm/realm-core#10 pc 000000000062d864 /data/app/com.demo.eh-9zyvbbrKmFJvAIcxvAHXjw==/lib/arm64/libflutter.so
realm/realm-core#11 pc 00000000000044fc /data/app/com.demo.eh-9zyvbbrKmFJvAIcxvAHXjw==/lib/arm64/libapp.so (_kDartVmSnapshotInstructions+9468)

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

@nicola-cab
Copy link
Member

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.

@nicola-cab nicola-cab transferred this issue from realm/realm-core Mar 13, 2024
Copy link

sync-by-unito bot commented Mar 13, 2024

➤ PM Bot commented:

Jira ticket: RJAVA-1252

@kneth
Copy link
Contributor

kneth commented Mar 17, 2024

@jalen-ma

It is similar to #6987.

How often does it happen? Any particular operation which triggers it?

@sync-by-unito sync-by-unito bot added the Waiting-For-Reporter Waiting for more information from the reporter before we can proceed label Mar 17, 2024
@nirinchev nirinchev closed this as not planned Won't fix, can't repro, duplicate, stale Aug 3, 2024
@sync-by-unito sync-by-unito bot closed this as completed Aug 3, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
O-Community Waiting-For-Reporter Waiting for more information from the reporter before we can proceed
Projects
None yet
Development

No branches or pull requests

4 participants