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

Crash when accessing Realm ByteArray parameter multiple times #6987

Closed
satohu20xx opened this issue Jul 3, 2020 · 4 comments
Closed

Crash when accessing Realm ByteArray parameter multiple times #6987

satohu20xx opened this issue Jul 3, 2020 · 4 comments

Comments

@satohu20xx
Copy link

satohu20xx commented Jul 3, 2020

Goal

Not crash

Actual Results

E/REALM: /Users/cm/Realm/realm-java-release/realm/realm-library/src/main/cpp/jni_util/jni_utils.cpp:51: [realm-core-5.23.8] Assertion failed: false
    <backtrace not supported on this platform>!!! IMPORTANT: Please send this log and info about Realm SDK version and other relevant reproduction info to help@realm.io.

Steps & Code to Reproduce

The class is as follows.

open class Sample: RealmObject() {
    @PrimaryKey
    var id: String = ""
    var byteArrayParameter: ByteArray? = null
}

After assigning this byteArrayParameter to a local variable and access it multiple times, Application crash.

Version of Realm and tooling

Realm version(s): 6.1.0

Realm Sync feature enabled: No

Android Studio version: 4.0

Android Build Tools version: 3.5.3

Gradle version: 6.2.1

Which Android version and device(s): Pixcel 3a - Android 10

@cmelchior
Copy link
Contributor

cmelchior commented Jul 3, 2020

Exactly how is it crashing, can you provide a full description or sample project? Also, do you have the full stack trace?

The assertion is happening when trying to acquire the JNIEnv which is rather surprising. It should always be present, so some way of reproducing would be nice.

@satohu20xx
Copy link
Author

Exactly how is it crashing, can you provide a full description or sample project?

There is no sample project to reproduce. The Application dose not crash when changing the parameter type from ByteArray to String. So I think the access to ByteArray is suspicious.

Also, do you have the full stack trace?

No stack trace when crashing... Only the logs described in the issue are output.

It should always be present, so some way of reproducing would be nice.

OK. I try to create sample project.
But I am not sure if it will work, so I would like to know if there is a workaround.

@satohu20xx
Copy link
Author

Sorry. I couldn't make a simple sample program.
If it is difficult to survey, you can close this issue.

@cmelchior
Copy link
Contributor

Closing. Feel free to reopen if there is more information we can go after.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants