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

Android 5 : Random segfaults while using JxCore Cordova #143

Open
bwhisp opened this issue Apr 4, 2016 · 2 comments
Open

Android 5 : Random segfaults while using JxCore Cordova #143

bwhisp opened this issue Apr 4, 2016 · 2 comments

Comments

@bwhisp
Copy link

bwhisp commented Apr 4, 2016

Hello,

I am using jxcore and express-pouchdb for a Cordova Android application. While the application works fine with Android 4.4 (KitKat), it makes a segfault on a Android 5 (Lollipop) smartphone.
The segfault occurs after a short period of time (withing 5mn) after enabling pouchdb synchronisation with another device because it tries to access adress 0x0 somewhere in libjxcore.so .

Here is the output ndk-stack gave me :

********** Crash dump: **********
Build fingerprint: 'motorola/peregrine_reteu/peregrine:5.1/LPB23.13-17/18:user/release-keys'
pid: 31449, tid: 31850, name: Thread-75133  >>> com.ionicframework.pouchdbsync801724 <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
Stack frame #00 pc 003d1a34  /data/app/com.ionicframework.pouchdbsync801724-1/lib/arm/libjxcore.so (bool ThingIsPermanentAtom<JS::Symbol>(JS::Symbol*)+4)
Stack frame #01 pc 003d1b2c  /data/app/com.ionicframework.pouchdbsync801724-1/lib/arm/libjxcore.so
Stack frame #02 pc e5943000  <unknown>
@obastemur
Copy link
Member

I guess you also use leveldown for pouchdb right? Could you test it with memdown?

@bwhisp
Copy link
Author

bwhisp commented Apr 5, 2016

Hello, I just changed my adapter from leveldown-mobile to memdown and your solution seems to work very fine (running since 1h and still up on Android 5).
Here's a little recap of my experimentations :
The app creates a document and updates it every 30s. Two devices are synchronizing their data (by recovering all documents except the ones they created).
With leveldown-mobile on default storage and no rev limitation : MTTF = 5mn on Android 5
With leveldown-mobile on default storage and rev_limit of 10 : MTTF = 15mn on Android 5
With leveldown-mobile on temporary storage and rev_limit of 5 : MTTF = 30mn on Android 5
With memdown on default storage and no rev limit : 1h and still running on Android 5 and still works perfectly on Android 4.4

Thanks a lot @obastemur

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants