Crash on x86 emulator when couchapp pushing to listener #64

Closed
zenitraM opened this Issue Aug 5, 2012 · 2 comments

Projects

None yet

3 participants

@zenitraM
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(Method.java:511)
E/TDDatabase( 1453):    at com.couchbase.touchdb.router.TDRouter.start(TDRouter.java:390)
E/TDDatabase( 1453):    at com.couchbase.touchdb.listener.TDHTTPServlet.service(TDHTTPServlet.java:108)
E/TDDatabase( 1453):    at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
E/TDDatabase( 1453):    at Acme.Serve.Serve$ServeConnection.runServlet(Serve.java:2347)
E/TDDatabase( 1453):    at Acme.Serve.Serve$ServeConnection.parseRequest(Serve.java:2266)
E/TDDatabase( 1453):    at Acme.Serve.Serve$ServeConnection.run(Serve.java:2056)
E/TDDatabase( 1453):    at Acme.Utils$ThreadPool$PooledThread.run(Utils.java:1223)
E/TDDatabase( 1453):    at java.lang.Thread.run(Thread.java:856)
E/TDDatabase( 1453): Caused by: java.lang.ExceptionInInitializerError
E/TDDatabase( 1453):    at com.couchbase.touchdb.TDDatabase.open(TDDatabase.java:222)
E/TDDatabase( 1453):    at com.couchbase.touchdb.router.TDRouter.do_PUT_Database(TDRouter.java:654)
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(Runtime.java:365)
E/TDDatabase( 1453):    at java.lang.System.loadLibrary(System.java:535)
E/TDDatabase( 1453):    at com.couchbase.touchdb.TDCollateJSON.<clinit>(TDCollateJSON.java:27)
E/TDDatabase( 1453):    ... 12 more
I/ActivityManager(  877): START {act=android.intent.action.MAIN cat=[android.intent.category.HOME] flg=0x10200000 cmp=com.android.launcher/com.android.launcher2.Launcher} from pid 877

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

@zenitraM
zenitraM commented Aug 5, 2012

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

 $ find . -name "*.so"
./TouchDB-Android/TouchDB-Android/obj/local/armeabi/libcom_couchbase_touchdb_TDCollateJSON.so
./TouchDB-Android/TouchDB-Android/libs/armeabi/libcom_couchbase_touchdb_TDCollateJSON.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
Member
mschoch commented Aug 6, 2012

Added support for x86 and MIPS platforms.

0a6f826

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