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

UnsatisfiedLinkError #371

Closed
seker opened this issue Jan 6, 2017 · 1 comment
Closed

UnsatisfiedLinkError #371

seker opened this issue Jan 6, 2017 · 1 comment

Comments

@seker
Copy link

seker commented Jan 6, 2017

Hello, My App has used the android-gif-drawable, but sometimes following Exception occurs:

java.lang.UnsatisfiedLinkError: dlopen failed: "/mnt/asec/com.eg.android.AlipayGphone-2/lib/arm/libgif.so" has bad ELF magic
at java.lang.Runtime.loadLibrary(Runtime.java:384)
at java.lang.System.loadLibrary(System.java:1086)
at pl.droidsonroids.gif.GifInfoHandle.(Unknown Source)
at pl.droidsonroids.gif.GifDrawable.(Unknown Source)

or

java.lang.UnsatisfiedLinkError: Cannot load library: soinfo_link_image(linker.cpp:1647): could not load library "libjnigraphics.so" needed by "libgif.so"; caused by find_library(linker.cpp:901): "libjnigraphics.so" failed to load previously
at java.lang.Runtime.loadLibrary(Runtime.java:372)
at java.lang.System.loadLibrary(System.java:514)
at pl.droidsonroids.gif.GifInfoHandle.(Unknown Source)
at pl.droidsonroids.gif.GifDrawable.(Unknown Source)

or

java.lang.UnsatisfiedLinkError: dlopen failed: could not load library "libjnigraphics.so" needed by "libgif.so"; caused by could not load library "/system/lib/liblogg.so? needed by "libjnigraphics.so"; caused by library "/system/lib/liblogg.so? not found
at java.lang.Runtime.loadLibrary(Runtime.java:371)
at java.lang.System.loadLibrary(System.java:526)
at pl.droidsonroids.gif.GifInfoHandle.(Unknown Source)
at pl.droidsonroids.gif.GifDrawable.(Unknown Source)

And, I can't reappear this crash, it reported by the My Crash Monitor.

@koral--
Copy link
Owner

koral-- commented Jan 6, 2017

  1. bad ELF magic occurs if few first chars in .so file do not match expected ones: https://github.com/android/platform_bionic/blob/master/linker/linker_phdr.cpp#L203
    File may be modified by user or due to broken storage device.

  2. could not load library "libjnigraphics.so" needed by "libgif.so" libjnigraphics is a system library which has to present on all devices.

  3. could not load library "/system/lib/liblogg.so? needed by "libjnigraphics.so" there is no liblogg.so in AOSP. It seems to be bug in custom ROM.

All those issues seem to be caused by either incorrect system/library modifications or random hardware failures. There is nothing I can do.

@koral-- koral-- closed this as completed Jan 6, 2017
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