Crash on x86 emulator when couchapp pushing to listener #64

zenitraM opened this Issue Aug 5, 2012 · 2 comments


None yet

3 participants

zenitraM commented Aug 5, 2012

While doing a simple "couchapp push" on the emulator (4.0.3 image, on x86 platform, 512mb SDcard and RAM), it fails with:

W/dalvikvm( 1453): Exception Ljava/lang/UnsatisfiedLinkError; thrown while initializing Lcom/couchbase/touchdb/TDCollateJSON;
E/TDDatabase( 1453): Exception in TDRouter
E/TDDatabase( 1453): java.lang.reflect.InvocationTargetException
E/TDDatabase( 1453):    at java.lang.reflect.Method.invokeNative(Native Method)
E/TDDatabase( 1453):    at java.lang.reflect.Method.invoke(
E/TDDatabase( 1453):    at com.couchbase.touchdb.router.TDRouter.start(
E/TDDatabase( 1453):    at com.couchbase.touchdb.listener.TDHTTPServlet.service(
E/TDDatabase( 1453):    at javax.servlet.http.HttpServlet.service(
E/TDDatabase( 1453):    at Acme.Serve.Serve$ServeConnection.runServlet(
E/TDDatabase( 1453):    at Acme.Serve.Serve$ServeConnection.parseRequest(
E/TDDatabase( 1453):    at Acme.Serve.Serve$
E/TDDatabase( 1453):    at Acme.Utils$ThreadPool$
E/TDDatabase( 1453):    at
E/TDDatabase( 1453): Caused by: java.lang.ExceptionInInitializerError
E/TDDatabase( 1453):    at
E/TDDatabase( 1453):    at com.couchbase.touchdb.router.TDRouter.do_PUT_Database(
E/TDDatabase( 1453):    ... 10 more
E/TDDatabase( 1453): Caused by: java.lang.UnsatisfiedLinkError: Couldn't load com_couchbase_touchdb_TDCollateJSON: findLibrary returned null
E/TDDatabase( 1453):    at java.lang.Runtime.loadLibrary(
E/TDDatabase( 1453):    at java.lang.System.loadLibrary(
E/TDDatabase( 1453):    at com.couchbase.touchdb.TDCollateJSON.<clinit>(
E/TDDatabase( 1453):    ... 12 more
I/ActivityManager(  877): START {act=android.intent.action.MAIN cat=[android.intent.category.HOME] flg=0x10200000} from pid 877

This doesn't seem to happen on my real devices.

zenitraM commented Aug 5, 2012

..and this seems to be due to using binary libraries:

 $ find . -name "*.so"

compiled for ARM. This makes it not work on x86 or MIPS-based Android platforms, which is not an issue for my project but could be an issue for Play Store-purposed apps.

mschoch commented Aug 6, 2012

Added support for x86 and MIPS platforms.


I only tested that ARM still worked after these changes. If you can try this in the x86 emulator that would be great.

@jchris jchris closed this Jul 24, 2013
@yaronyg yaronyg pushed a commit to thaliproject/couchbase-lite-android that referenced this issue Jun 19, 2014
@mschoch mschoch added support for x86 and mips platforms 0a6f826
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment