Closed Murilo-Perrone closed 5 years ago
@pasin @bmeike Need some input on this
E/art: JNI ERROR (app bug): attempt to use stale global reference 0x100922 (should be 0x200922)
E/art: JNI ERROR (app bug): attempt to use stale global reference 0x100922 (should be 0x200922)
A/art: art/runtime/java_vm_ext.cc:470] JNI DETECTED ERROR IN APPLICATION: use of deleted global reference 0x100922
A/art: art/runtime/java_vm_ext.cc:470] from void com.couchbase.litecore.C4Replicator.free(long, java.lang.Object, java.lang.Object)
This appears to be a JNI-related problem. Moving to Android.
Apparently a JNI issue. Moved to CBL-Android
@Murilo-Perrone We have recently (cbl-android, commit: e34fd1efaa56c7481) fixed several bugs like this. If you are paid support please contact your rep for a patch version. If you are using the community edition, try rebuilding something recent.
If neither of those strategies is helpful. we'll need to reproduce this. The bug in not in free
, of course, it is something that happened, probably, several calls ago, that corrupted memory. Any code you have that can help us drive it would be much appreciated.
@Murilo-Perrone , can we be of further help? Is this resolved?
Thanks for the information.
A couple of weeks ago I have tested newest stable CBLite android CE v2.5.3, as it was released after the referred commit. Seems to have improved, as we used our App during hours with no crash, but then it did crash when returning from background. Unfortunately I couldn't get the logs of that crash yet (sorry) but chances are it is the same error, as this is not happening at all with v2.1.5.
I was now trying out the recently released v2.6.0, but I'm having trouble resolving ReplicatorType in Kotlin. I'll provide more input as soon as I have.
@Murilo-Perrone Would LOVE to hear about your experience using CBL with Kotlin: What went well, what didn't. Please drop me a line at blake.meike@couchbase.com. Kotlin-friendliness is a project that will not get support without community feedback.
Replicator stability has been improving steadily since 2.5.0. There have been several fixes in the native code and, most recently, several big changes in the Java bindings. The biggest change in replicator stability should take place with three late August commits: caa5b1ebf32 ,474434a806 and d339188646. Those patches will be publicly available in the 2.7 release.
Again, if you need a patch release to move forward, please contact your support rep.
Also, feel free to re-open this ticket if you have more information.
@bmeike no problem. I have reported further details on Kotlin issues in the other ticket, and the workaround I used.
I'm now testing CBL v2.6.0 . Got a crash when App was sent to background and no logs were sent to Crashlytics, which is very indicative that the JNI issue still happens. But again I could not get the logs. So I'll keep testing and give an update if I get any logs related to JNI error.
Got the logs of the same crash, in CBL 2.6.0. It crashed while app was open and idle for a while (but CBL was checking for synchronization in background).
It seems to have started with a connection error :
840 V/Couchbase_changes: Logging status of replication...
840 I/Couchbase_changes: rscrubigd5-input Activity Level :: CONNECTING, 0 of 0
840 E/Couchbase_changes: rscrubigd5-input Error code :: 111
846 A/zygote: java_vm_ext.cc:523] JNI DETECTED ERROR IN APPLICATION: use of deleted global reference 0x2302
846 A/zygote: java_vm_ext.cc:523] from void com.couchbase.lite.internal.core.C4Replicator.free(long, java.lang.Object, java.lang.Object)
Then it crashed with JNI error. See complete logs HERE
Yes. This issue did not make the 2.6.0 release. I believe it has been fixed in 2.7.x and there is a patch, 2.6.0.1, that includes the fix. You can build it from couchbase-lite-android-ce:release/2.6.0.1
. If you are a customer and need the enterprise edition, please talk to your service rep and they can get the patched version to you.
In our Android App, CBLite 2.1.5 works fine, but we are unable tom migrate to CBLite 2.5.2 because it frequently crashes our app. In past, we also had this kind of error in CBLite 2.0, but not in v 1.4.
Here is a sample of error log when it crashes.