-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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 on copyFromRealm for Entities with field RealmList<RealmAny> #7586
Comments
Hello, @cmelchior can i help to fix it? |
same for
without copyFromRealm |
same on next devices: Nexus 7 (API 21)
|
hello @cmelchior can we fix it? |
Hi @Stefanos65535 Looking into this. I'm not sure it is directly related to I tried to reproduce using your code, but at least it seems to run fine on both x86 and x86_64 emulators. So maybe this is some kind of race condition being triggered on those devices 🤔 |
@cmelchior thanks for replay |
Thank you...all of those look like pretty old devices, which could point to a race condition. Unfortunately, I don't have either of them. I tried to reproduce on both a Oneplus 5T and a Oneplus 8 Pro, both of these work fine. Internal note: I did try to see if we by accident release the native reference to the RealmAny value, which could cause something like this if the GC kicks in at the wrong time, but from what I could tell, we do keep the native reference alive alongside the public RealmAny public object. |
@cmelchior Yes, I understand it works correctly on many devices, but there are also many reverse cases. |
@cmelchior
stacktrace:
|
I have the very same issue |
I get requests from users with a similar problem |
@cmelchior any updates? |
hello @cmelchior |
Seems to be the same root cause as in #7626. Will close this one. |
How frequently does the bug occur?
All the time
Description
Crash on copyFromRealm for Entities with field
RealmList<RealmAny>
it seems to be playable only on some devices
Stacktrace & log output
Can you reproduce the bug?
Yes, always
Reproduction Steps
just run that sample
Version
10.8.1
What SDK flavour are you using?
Local Database only
Are you using encryption?
No, not using encryption
Platform OS and version(s)
Motorolla G5S (XT1794) Android 8.1.0
Build environment
Android Studio version: 2021.1.1
Android Build Tools version: 7.1.0-beta02
Gradle version: 7.2
The text was updated successfully, but these errors were encountered: