I want to create a realm database.
java.lang.UnsatisfiedLinkError
Native method not found: io.realm.internal.NativeObjectReference.nativeCleanUp:(JJ)V
io.realm.internal.NativeObjectReference.void nativeCleanUp(long,long)(Native Method)
io.realm.internal.NativeObjectReference.void cleanup()(NativeObjectReference.java:87)
io.realm.internal.FinalizerRunnable.void run()(FinalizerRunnable.java:38)
java.lang.Thread.run(Thread.java:841)
It crashes sometimes in android 4.3,4.4
Realm version(s): io.realm:realm-gradle-plugin:3.2.0
Realm sync feature enabled: no
Which Android version and device:
VIVO Y27, VIVO Y23L, VIVO X710L, HW Honor CHM-UL00, VIVO X3L
It is the 1st time we saw this crash.
3.2.0?so files in the apk?I had send email with apk to [email protected].
@kevengithub We haven't received your apk yet, maybe something wrong with the mail server? You can also put it somewhere we can download. thanks!
Hi, I got you apk and there are lots of native so files :)
My guess is there was a concurrency problem with System.loadLibrary() for old version android and which has been fixed in Android 5, see https://android.googlesource.com/platform/libcore/+/a80f9ae%5E!/ .
Also a user reported a similar issue and get it fixed by load all the so files on the same thread, see https://github.com/realm/realm-java/issues/1350#issuecomment-128217691
Would you please help to check if all your so files are loaded on the same thread?
I loaded the lib in ui thread, and all the operation of the realm I called also in ui thread.It seems I got it fixed.
Thanks.
Most helpful comment
I loaded the lib in ui thread, and all the operation of the realm I called also in ui thread.It seems I got it fixed.
Thanks.