Closed tebica closed 8 years ago
That does sounds a bit strange. Are there any form of device management software running on that device?
Also it could be interesting to see what happens if you could attach a debugger to see exactly where inside the Realm.getInstance()
call it blocked.
Please try this: 1 Set a breakpoint on getInstance
2 Start debuging, when the debugpoint reached, find the pid of the app by:
adb shell ps | grep <app name>
3 Use strace to get more information by:
adb shell run-as <app's package name> strace -f -p <the pid got from step 2>
4 Continue running the app
5 After it get stalled, send the strace log in the terminal to us.
Thanks!
@cmelchior It's blocked at createNativeWithImplicitTransactions() method.
SharedGroup.java
57 public SharedGroup(String databaseFile, boolean enableImplicitTransactions, Durability durability, byte[] key) {
58 if (enableImplicitTransactions) {
59 nativeReplicationPtr = nativeCreateReplication(databaseFile, key);
60 nativePtr = createNativeWithImplicitTransactions(nativeReplicationPtr, durability.value, key);
61 implicitTransactionsEnabled = true;
62 } else {
63 nativePtr = nativeCreate(databaseFile, Durability.FULL.value, false, false, key);
64 }
65 context = new Context();
66 path = databaseFile;
67 checkNativePtrNotZero();
78 }
I have attached a screenshot.
@jungilhan Do you know which version of the Android System WebView that is installed on the device? https://play.google.com/store/apps/details?id=com.google.android.webview&hl=en
It might seem completely unrelated, but they had an old bug that might effect this
@cmelchior Android System WebView is not installed on the device.
@beeender I have tried, But I can't see any trace output.
@jungilhan Can you please paste the output in the terminal from step 2 & 3 here?
@beeender I got message "run-as: exec failed for strace Error:Permission denied".
@jungilhan That is strange... strace
should not ask for root permission...
Try strace
with su
if your phone is rooted.
Or, even simpler, open the app, wait there until ANR happens, then send the whole logcat to us. Then there should be a native backtrace in.
@beeender Hmmm... ANR dialog is not showing. Please see the attached video and log.
Another LG G3(LG-F460S / OS: 4.4.2) phone gives the same result.
I think you will only get an ANR if there is another event it cannot respond to, like if you touched the screen. Said said, that doesn't have any impact on why it is hanging. Thank you for trying with another phone as well.
Isolating the .so in question just to be extra paranoid. Remove all native libs from 0.82 jar except for armv7. This should confirm the phone is running on the correct .so and not the arm one.
@diegomontoya Could you explain to me how to remove so files from realm-0.82.0.jar?
Just rename the realm jar file extension to .zip, unzip it, remove the unwanted .so files, zip it again and rename it to .jar
@emanuelez I got build error below,
That looks like Realm is not loaded at all. Can I see your build.gradle file ?
@jungilhan if on Windows, just use 7zip to right click open the jar file (open archive) and delete the libs/xxx folders you don't want.
@emanuelez @nhachicha , Here is the project file that he is using. https://dl.dropboxusercontent.com/u/539401/encryption%203.zip which has the build.gradle in it. Can you kindly check? app/libs/realm-0.82.0.jar -> has all .so app/libs/realm-0.82.0-strip.jar -> has v7a only
@tebica
I had a friend testing the APK on a G2 LG-D802
& it works
[ro.product.model]: [LG-D802]
Is it working as well for the OP on a LG G2 ?
@nhachicha : It seems like issue happens only G3 specific model LG-F460S (Korea model) Not reproducible on G2. I have the specific model LG-F460S on my hand. What should be the next thing that I should check?
Adding io.realm.internal.Util.setDebugLevel(5)
before the first call to any Realm method will give you a "trace" of the JNI calls. That might tell you where the deadlock is.
We got some useful information to debug this. Core team is working on it.
Fixed in 0.82.2 . Caused by the system's crypto function.
one of Korean developer having deadlock issue when using Realm encryption example.
They tried our encryption example and Realm.getInstance() function never returned.
This happens only on LG G3 phone with LG G3(LG-F460S / OS: 4.4.2)
below is the only log that they can see when this issue happening