fresco
fresco copied to clipboard
Fatal Exception: java.lang.UnsatisfiedLinkError couldn't find DSO to load: libimagepipeline.so / com.facebook.imagepipeline.memory.NativeMemoryChunk
Description
Update to version 1.8.0, Crashlytic report these issues.
Fatal Exception: java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libimagepipeline.so at com.facebook.soloader.SoLoader.doLoadLibraryBySoName(SoLoader.java:522) at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:420) at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:370) at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:335) at com.facebook.imagepipeline.nativecode.ImagePipelineNativeLoader.load(ImagePipelineNativeLoader.java:42) at com.facebook.imagepipeline.memory.NativeMemoryChunk.<clinit>(NativeMemoryChunk.java:33) at com.facebook.imagepipeline.memory.NativeMemoryChunkPool.alloc(NativeMemoryChunkPool.java:58) at com.facebook.imagepipeline.memory.NativeMemoryChunkPool.alloc(NativeMemoryChunkPool.java:20) at com.facebook.imagepipeline.memory.BasePool.get(BasePool.java:257) at com.facebook.imagepipeline.memory.NativePooledByteBufferOutputStream.<init>(NativePooledByteBufferOutputStream.java:51) at com.facebook.imagepipeline.memory.NativePooledByteBufferFactory.newByteBuffer(NativePooledByteBufferFactory.java:98) at com.facebook.imagepipeline.memory.NativePooledByteBufferFactory.newByteBuffer(NativePooledByteBufferFactory.java:26) at com.facebook.imagepipeline.producers.LocalFetchProducer.getByteBufferBackedEncodedImage(LocalFetchProducer.java:89) at com.facebook.imagepipeline.producers.LocalFetchProducer.getEncodedImage(LocalFetchProducer.java:101) at com.facebook.imagepipeline.producers.LocalResourceFetchProducer.getEncodedImage(LocalResourceFetchProducer.java:39) at com.facebook.imagepipeline.producers.LocalFetchProducer$1.getResult(LocalFetchProducer.java:54) at com.facebook.imagepipeline.producers.LocalFetchProducer$1.getResult(LocalFetchProducer.java:50) at com.facebook.common.executors.StatefulRunnable.run(StatefulRunnable.java:45) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1115) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:590) at com.facebook.imagepipeline.core.PriorityThreadFactory$1.run(PriorityThreadFactory.java:53) at java.lang.Thread.run(Thread.java:818)
Fatal Exception: java.lang.UnsatisfiedLinkError: com.facebook.imagepipeline.memory.NativeMemoryChunk at com.facebook.imagepipeline.memory.NativeMemoryChunkPool.alloc(NativeMemoryChunkPool.java:58) at com.facebook.imagepipeline.memory.NativeMemoryChunkPool.alloc(NativeMemoryChunkPool.java:20) at com.facebook.imagepipeline.memory.BasePool.get(BasePool.java:257) at com.facebook.imagepipeline.memory.NativePooledByteBufferOutputStream.<init>(NativePooledByteBufferOutputStream.java:51) at com.facebook.imagepipeline.memory.NativePooledByteBufferFactory.newByteBuffer(NativePooledByteBufferFactory.java:98) at com.facebook.imagepipeline.memory.NativePooledByteBufferFactory.newByteBuffer(NativePooledByteBufferFactory.java:26) at com.facebook.imagepipeline.producers.LocalFetchProducer.getByteBufferBackedEncodedImage(LocalFetchProducer.java:89) at com.facebook.imagepipeline.producers.LocalFetchProducer.getEncodedImage(LocalFetchProducer.java:101) at com.facebook.imagepipeline.producers.LocalResourceFetchProducer.getEncodedImage(LocalResourceFetchProducer.java:39) at com.facebook.imagepipeline.producers.LocalFetchProducer$1.getResult(LocalFetchProducer.java:54) at com.facebook.imagepipeline.producers.LocalFetchProducer$1.getResult(LocalFetchProducer.java:50) at com.facebook.common.executors.StatefulRunnable.run(StatefulRunnable.java:45) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) at com.facebook.imagepipeline.core.PriorityThreadFactory$1.run(PriorityThreadFactory.java:53) at java.lang.Thread.run(Thread.java:818)
Reproduction
Solution
I want to know if update to 1.8.1 can fix these issues or I need add compile 'com.facebook.soloader:soloader:0.1.0+'
to build.gradle
Additional Information
- Fresco version:
compile 'com.facebook.fresco:fresco:1.8.0'
compile 'com.facebook.fresco:animated-gif:1.8.10'
- Platform version: OPPO - OS: Android 5.1.1 DEVICE: R7sfg / R7g / A51fa
How is your build set up? Are you using ABI splits? http://frescolib.org/docs/shipping.html
@oprisnik
my build setup
android { compileSdkVersion 27 buildToolsVersion '27.0.3' defaultConfig { applicationId "com.mobix.pinecone" minSdkVersion 15 targetSdkVersion 27 versionCode 83 versionName '5.42' multiDexEnabled true } buildTypes { release { minifyEnabled false multiDexKeepProguard file("proguard.multidex.config") } debug { minifyEnabled false multiDexKeepProguard file("proguard.multidex.config") } } productFlavors { } dexOptions { jumboMode true javaMaxHeapSize "4g" } testOptions { unitTests.returnDefaultValues = true } }
and multidex config
-keepclassmembers class * implements android.os.Parcelable { static ** CREATOR; } -dontwarn com.google.android.gms.** -keep class com.google.android.gms.** { *; } -keep class com.google.firebase.** { *; } -keep class io.realm.** { *; } -keep class io.branch.** { *; } -keep class io.fabric.sdk.android.** { *; } -keep class io.socket.** { *; } -keep class com.google.android.youtube.** { *; } -keep class com.crashlytics.android.** { *; } -keep class com.facebook.internal.FacebookInitProvider.** { *; } -keep class com.facebook.FacebookSdk.** { *; } -keep class com.facebook.appevents.AppEventsLogger.** { *; } -keep class com.facebook.common.memory.MemoryTrimmableRegistry.** { *; } -keep class com.facebook.drawee.backends.pipeline.Fresco.** { *; } -keep class com.facebook.imagepipeline.core.ImagePipelineConfig.** { *; } -keep class me.zhanghai.android.materialprogressbar.** { *; } -keep class com.nguyenhoanglam.imagepicker.** { *;} -keep class com.iarcuschin.simpleratingbar.** { *;} -keep class android.support.v4.app.NotificationManagerCompat.** { *;}
I don't know why it only happen on OPPO - OS: Android 5.1.1 and before update to version 1.8.0, these issue not happen with same build config
Hi @hsandyque, you don't need the extra dependency on soloader
as it now ships with Fresco since 1.8.0. I'd recommend updating to 1.8.1 as it fixes other bugs.
Your build.gradle file should reference the proguard-fresco.pro
file as described in the link that @oprisnik posted.
For clarification: does this bug only happen on that particular device? Is there any adb logcat
output that you can share?
Hi @lambdapioneer , For clarification: does this bug only happen on that particular device? Is there any adb logcat output that you can share? Yes, It only happen on OPPO Android 5.1.1 devices (R7sfg / R7g / A51fa) And the attchments are logcats 1.txt 2.txt
Hi @hsandyque, given that it only happens with Oppo phones suggests that the way the binary libraries are bundled and the way the phone loads them are not playing nice.
I don't have access to an OPPO phone at the moment and I couldn't find better pointers when searching :/
(a) Does this also happen when installing the showcase app that we have in our repository? (that would bring me closer to debug this once I get hold on an OPPO phone)
(b) Can you provide the output of running unzip -l your_release.apk | grep lib/
on your release APK? That will show which files are actually bundled.
Hi @lambdapioneer,
I don't have an OPPO phone (Android 5.1.1), these issues report from Crashlytics. I don't know if these also happen on showcase app.
And the bundle list as follow
158176 00-00-1980 00:00 lib/arm64-v8a/libgifimage.so 383192 00-00-1980 00:00 lib/arm64-v8a/libimagepipeline.so 3107040 00-00-1980 00:00 lib/arm64-v8a/librealm-jni.so 91980 00-00-1980 00:00 lib/armeabi-v7a/libgifimage.so 255696 00-00-1980 00:00 lib/armeabi-v7a/libimagepipeline.so 1877536 00-00-1980 00:00 lib/armeabi-v7a/librealm-jni.so 100168 00-00-1980 00:00 lib/armeabi/libgifimage.so 313028 00-00-1980 00:00 lib/armeabi/libimagepipeline.so 4058380 00-00-1980 00:00 lib/mips/librealm-jni.so 145240 00-00-1980 00:00 lib/x86/libgifimage.so 452312 00-00-1980 00:00 lib/x86/libimagepipeline.so 3397252 00-00-1980 00:00 lib/x86/librealm-jni.so 150360 00-00-1980 00:00 lib/x86_64/libgifimage.so 477784 00-00-1980 00:00 lib/x86_64/libimagepipeline.so 3336720 00-00-1980 00:00 lib/x86_64/librealm-jni.so
Hi @lambdapioneer,
more log
02-21 15:14:44.524 25391-25537/com.mobix.pinecone E/art: dlopen("/data/data/com.mobix.pinecone/lib-main/libimagepipeline.so", RTLD_LAZY) failed: dlopen failed: "/data/data/com.mobix.pinecone/lib-main/libimagepipeline.so" is 64-bit instead of 32-bit 02-21 15:14:44.524 25391-25537/com.mobix.pinecone E/SoLoader: Could not load: libimagepipeline.so 02-21 15:14:44.537 25391-25537/com.mobix.pinecone E/AndroidRuntime: FATAL EXCEPTION: FrescoIoBoundExecutor-2 Process: com.mobix.pinecone, PID: 25391 java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libimagepipeline.so at com.facebook.soloader.SoLoader.doLoadLibraryBySoName(SoLoader.java:522) at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:420) at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:370) at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:335) at com.facebook.imagepipeline.nativecode.ImagePipelineNativeLoader.load(ImagePipelineNativeLoader.java:42) at com.facebook.imagepipeline.memory.NativeMemoryChunk.<clinit>(NativeMemoryChunk.java:33) at com.facebook.imagepipeline.memory.NativeMemoryChunkPool.alloc(NativeMemoryChunkPool.java:58) at com.facebook.imagepipeline.memory.NativeMemoryChunkPool.alloc(NativeMemoryChunkPool.java:20) at com.facebook.imagepipeline.memory.BasePool.get(BasePool.java:257) at com.facebook.imagepipeline.memory.NativePooledByteBufferOutputStream.<init>(NativePooledByteBufferOutputStream.java:51) at com.facebook.imagepipeline.memory.NativePooledByteBufferFactory.newByteBuffer(NativePooledByteBufferFactory.java:98) at com.facebook.imagepipeline.memory.NativePooledByteBufferFactory.newByteBuffer(NativePooledByteBufferFactory.java:26) at com.facebook.imagepipeline.producers.LocalFetchProducer.getByteBufferBackedEncodedImage(LocalFetchProducer.java:89) at com.facebook.imagepipeline.producers.LocalFetchProducer.getEncodedImage(LocalFetchProducer.java:101) at com.facebook.imagepipeline.producers.LocalResourceFetchProducer.getEncodedImage(LocalResourceFetchProducer.java:39) at com.facebook.imagepipeline.producers.LocalFetchProducer$1.getResult(LocalFetchProducer.java:54) at com.facebook.imagepipeline.producers.LocalFetchProducer$1.getResult(LocalFetchProducer.java:50) at com.facebook.common.executors.StatefulRunnable.run(StatefulRunnable.java:45) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) at com.facebook.imagepipeline.core.PriorityThreadFactory$1.run(PriorityThreadFactory.java:53) at java.lang.Thread.run(Thread.java:818)
HI @oprisnik i have same problem how to fix it ?
java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libimagepipeline.so
at com.facebook.soloader.j.b(SourceFile:522)
at com.facebook.soloader.j.a(SourceFile:420)
at com.facebook.soloader.j.a(SourceFile:370)
at com.facebook.soloader.j.a(SourceFile:335)
at com.facebook.imagepipeline.nativecode.a.a(SourceFile:42)
at com.facebook.imagepipeline.memory.NativeMemoryChunk.
@hsandyque
Do you specify any ABI (CPU type) filters in your apps gradle files?
@erikandre I don't use any ABI filters in my gradle file, and already list the detail setting on previous reply
I use version 1.8.1 also have same problem.The device is VIVO X7(Android 5.1.1,arm64-v8a).
FrescoIoBoundExecutor-2(121704)
java.lang.UnsatisfiedLinkError
com.facebook.imagepipeline.memory.NativeMemoryChunk 1 com.facebook.imagepipeline.memory.NativeMemoryChunkPool.alloc(NativeMemoryChunkPool.java:58)
2 com.facebook.imagepipeline.memory.NativeMemoryChunkPool.alloc(NativeMemoryChunkPool.java:20)
3 com.facebook.imagepipeline.memory.BasePool.get(BasePool.java:257)
4 com.facebook.imagepipeline.memory.NativePooledByteBufferOutputStream.
FrescoIoBoundExecutor-1(121150)
java.lang.UnsatisfiedLinkError
couldn't find DSO to load: libimagepipeline.so 1 com.facebook.soloader.SoLoader.doLoadLibraryBySoName(SoLoader.java:522)
2 com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:420)
3 com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:370)
4 com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:335)
5 com.facebook.imagepipeline.nativecode.ImagePipelineNativeLoader.load(ImagePipelineNativeLoader.java:42)
6 com.facebook.imagepipeline.memory.NativeMemoryChunk.
Any fix? This is my log
Fatal Exception: java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libimagepipeline.so
at com.facebook.soloader.SoLoader.doLoadLibraryBySoName(SoLoader.java:522)
at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:420)
at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:370)
at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:335)
at com.facebook.imagepipeline.nativecode.ImagePipelineNativeLoader.load(ImagePipelineNativeLoader.java:42)
at com.facebook.imagepipeline.memory.NativeMemoryChunk.
@wangshuwen1107 @csbz17027 @ignaciogs Due to Facebook still checking the problem, I found the workaround solution that may temporary fix this issue.
dlopen("/data/data/xxx/lib-main/libimagepipeline.so", RTLD_LAZY) failed: dlopen failed: "/data/data/xxx/lib-main/libimagepipeline.so" is 64-bit instead of 32-bit
The log I found that is these specific devices run app in 32-bit (I don't know why, maybe the framework bug) but the libimagepipeline.so is 64-bit.
Add the api filter as following code snap, skip the "arm64-v8a"
defaultConfig { ... ndk { abiFilters "armeabi", "armeabi-v7a", "x86", "x86_64", "mips", "mips64" } }
It's not the correct solution but maybe it will fix issue at the first and then we waiting the update
@hsandyque thanks a lot ,your response is very helpful,Looking forward to your update!
@oprisnik @erikandre @lambdapioneer Do you have any idea about how to fix this issue?
@hsandyque do you load any other dependencies such that the system might be confused with a mix of 32bit and 64bit libraries?
In this case I'd suggest that you go with the following abiFilters
line:
abiFilters "armeabi", "armeabi-v7a", "x86", "mips"}
Maybe even drop mips
altogether if you don't specifically target a special device.
Still having this issue on v1.9.0.
Adding
ndk {
abiFilters "armeabi", "armeabi-v7a", "x86"
}
Worked for me. But by reading the above conversation, seems it is not the "correct" solution?
My team has the same issue , has not get so much crash reports (Of cause fresco's OOM) from a 3rd library like this, it's time to say bye bye !
i use
ndk { abiFilters "armeabi,armeabi-v7a" }
and
compile 'com.facebook.fresco:fresco:1.8.0' compile 'com.facebook.fresco:animated-gif:1.8.0' compile 'com.facebook.fresco:animated-webp:1.8.0' compile 'com.facebook.fresco:webpsupport:1.8.0'
also have the same crash.
Still have this problem on v1.9.0.
Still facing that issue on 1.9.0 with supported abis "armeabi", "armeabi-v7a", "x86"
Still have this problem on v1.9.0.
I am also having the same issue. My app is crashing on opening. It occurs only on HTC One E9PLUS dual sim running on android 5.0.2 Error : Fatal Exception: java.lang.UnsatisfiedLinkError couldn't find DSO to load: libimagepipeline.so
UPDATE: For those we got this issue, please do check the production guide on Fresco website, which solves our problem.
Also seeing this problem on a variety of devices:
Using Fresco version 1.9.0 and ABI filters to reduce APK size:
ndk {
abiFilters "armeabi-v7a", "x86"
}
This issue started occurring for us when we updated Fresco from 1.5.0 to 1.9.0. This also involved removing use of ReLinker and removing the explicitly included proguard-fresco.pro file.
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "bug" or "enhancement" and I will leave it open. Thank you for your contributions.
Bump. This is still an ongoing issue. This crash occurred after updating from 1.5.0 to 1.9.0 and no solution has been provided that works for me.
@jmbusby you're only targeting arm v7a. Could some of the devices be armv6 or even armv5? For example there seem to be quite a few ZTE devices with v6 according to https://forum.xda-developers.com/showthread.php?t=1596800