I have a app in the Android market and in its crash reports I get java.lang.UnsatisfiedLinkError crashes and everytime it is for different .so file.
errors looks like
java.lang.ExceptionInInitializerError
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.UnsatisfiedLinkError: Couldn't load *****: findLibrary returned null
or
java.lang.ExceptionInInitializerError
at java.lang.Thread.run(Thread.java:1019)
Caused by: java.lang.UnsatisfiedLinkError: Cannot load library: alloc_mem_region[871]: OOPS: 116 cannot map library ********. no vspace available.
or
java.lang.UnsatisfiedLinkError: Couldn't load ******: findLibrary returned null
at java.lang.Runtime.loadLibrary(Runtime.java:429)
at java.lang.System.loadLibrary(System.java:554)
It looks like some devices can not find some .so files.. The crash is not for any particular .so file. I have around 4 .so files in my app and sometimes it crashes for 1 and sometimes it crashes for another.
I could never reproduce this issue while testing, though I tested on almost all versions of Android...
Any pointers would be highly appreciated
Thanks
lang. UnsatisfiedLinkError runtime error. More specifically, this error is thrown whenever the JVM is unable to find an appropriate native-language definition of a method declared native , while attempting to resolve the native libraries at runtime [2]. The UnsatisfiedLinkError error is a subclass of the java.
public class UnsatisfiedLinkError extends LinkageError. Thrown if the Java Virtual Machine cannot find an appropriate native-language definition of a method declared native . Since: JDK1.0 See Also: Runtime , Serialized Form.
The System. loadLibrary() takes as parameter a library name, locates a native library that corresponds to that name, and loads the native library. For information about how a native library is located by the System.
I've seen similar issues myself – this seems to be affecting a very small number of users, and I can't directly correlate it to device types or operating systems. From the research I've done, however, I've found a discussion on the Cyanogenmod Google Code page; to quickly summarize: it sounds like some builds of that mod have not precisely copied some changes Google made to system-level libraries, meaning that some symbols (__android_log_print
, for example) could be causing errors including causing your library to fail to load.
I'm in the process of trying to pin this down further, but I thought I'd share what I have to date.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With