litl / android-leveldb

JNI bindings for leveldb
Other
94 stars 47 forks source link

UnsatisfiedLinkError on Alps devices #11

Open mingfai opened 10 years ago

mingfai commented 10 years ago

It's a rare case. My app deployed to over 1k devices and got only 2 exception reports. Both are Android 4.2.1.

The following are two different cases: On a "alps ITOUCH HD2S":

java.lang.UnsatisfiedLinkError: Couldn't load leveldbjni from loader dalvik.system.PathClassLoader[DexPathList[dexElements=[zip file "/data/app/MY.PACKAGE-2.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]]: findLibrary returned null
    at java.lang.Runtime.loadLibrary(Runtime.java:359)
    at java.lang.System.loadLibrary(System.java:514)
    at com.litl.leveldb.DB.<init>(SourceFile:151)

On a "alps N9500"

java.lang.UnsatisfiedLinkError: Cannot load library: load_library(linker.cpp:761): not a valid ELF executable: /data/app-lib/MY.PACKAGE-1/libleveldbjni.so
    at java.lang.Runtime.loadLibrary(Runtime.java:365)
    at java.lang.System.loadLibrary(System.java:514)
    at com.litl.leveldb.DB.<init>(SourceFile:151)

-> MTK6589 -1209 MHz Quad-core

I don't think we should do anything to cater those unknown platforms. I fire the report just for record and please feel free to close it.

tambeti commented 10 years ago

It looks like the native library isn't compiled for the first platform. For the second case the native library format is not recognized by the loader. Do we know what processor architecture these devices use?

mingfai commented 10 years ago

Case 1: Alps ITOUCH HD2S uses MTK6589T Case 2: Alps N9500 uses MTK6589

http://www.mediatek.com/_en/01_products/04_pro.php?sn=1081 http://www.knowyourmobile.in/products/nvidia-tegra-3-processor-mediatek-mtk6589t/8407/first-among-equals-mediatek-mtk6589t-vs

" MT6589 integrates a power-efficient Cortex™-A7 CPU subsystem from ARM" " MT6589T (Turbo) is the high-end version..." (compare to MTK6589 without a 'T' suffix)

it is suppose to be ARM?

mingfai commented 10 years ago

There is one more type of error, also on Alps ITOUCH HD2S

java.lang.UnsatisfiedLinkError: Cannot load library: soinfo_link_image(linker.cpp:1604): missing essential tables
    at java.lang.Runtime.loadLibrary(Runtime.java:365)
    at java.lang.System.loadLibrary(System.java:514)
    at com.litl.leveldb.DB.<init>(SourceFile:151)