facebook / fresco

An Android library for managing images and the memory they use.
https://frescolib.org/
MIT License
17.07k stars 3.75k forks source link

Fatal Exception: java.lang.UnsatisfiedLinkError couldn't find DSO to load: libimagepipeline.so / com.facebook.imagepipeline.memory.NativeMemoryChunk #2049

Open hsandyque opened 6 years ago

hsandyque commented 6 years ago

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

oprisnik commented 6 years ago

How is your build set up? Are you using ABI splits? http://frescolib.org/docs/shipping.html

hsandyque commented 6 years ago

@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.** { *;}

hsandyque commented 6 years ago

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

lambdapioneer commented 6 years ago

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?

hsandyque commented 6 years ago

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

lambdapioneer commented 6 years ago

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.

hsandyque commented 6 years ago

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

hsandyque commented 6 years ago

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)

wangshuwen1107 commented 6 years ago

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.(SourceFile:33) at com.facebook.imagepipeline.memory.l.i(SourceFile:58) at com.facebook.imagepipeline.memory.l.b(SourceFile:20) at com.facebook.imagepipeline.memory.a.a(SourceFile:257) at com.facebook.imagepipeline.memory.o.(SourceFile:51) at com.facebook.imagepipeline.memory.n.b(SourceFile:98) at com.facebook.imagepipeline.memory.n.a(SourceFile:26) at com.facebook.imagepipeline.producers.z.a(SourceFile:89) at com.facebook.imagepipeline.producers.z.b(SourceFile:101) at com.facebook.imagepipeline.producers.aa.a(SourceFile:34) at com.facebook.imagepipeline.producers.z$1.d(SourceFile:54) at com.facebook.imagepipeline.producers.z$1.c(SourceFile:50) at com.facebook.common.b.e.run(SourceFile:45) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) at com.facebook.imagepipeline.d.k$1.run(SourceFile:53) at java.lang.Thread.run(Thread.java:818)

erikandre commented 6 years ago

@hsandyque

Do you specify any ABI (CPU type) filters in your apps gradle files?

hsandyque commented 6 years ago

@erikandre I don't use any ABI filters in my gradle file, and already list the detail setting on previous reply

csbz17027 commented 6 years ago

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.(NativePooledByteBufferOutputStream.java:51) 5 com.facebook.imagepipeline.memory.NativePooledByteBufferFactory.newByteBuffer(NativePooledByteBufferFactory.java:98) 6 com.facebook.imagepipeline.memory.NativePooledByteBufferFactory.newByteBuffer(NativePooledByteBufferFactory.java:26) 7 com.facebook.imagepipeline.producers.LocalFetchProducer.getByteBufferBackedEncodedImage(LocalFetchProducer.java:89) 8 com.facebook.imagepipeline.producers.LocalFetchProducer.getEncodedImage(LocalFetchProducer.java:101) 9 com.facebook.imagepipeline.producers.LocalFileFetchProducer.getEncodedImage(LocalFileFetchProducer.java:34) 10 com.facebook.imagepipeline.producers.LocalFetchProducer$1.getResult(LocalFetchProducer.java:54) 11 com.facebook.imagepipeline.producers.LocalFetchProducer$1.getResult(LocalFetchProducer.java:50) 12 com.facebook.common.executors.StatefulRunnable.run(StatefulRunnable.java:45) 13 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) 14 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) 15 com.facebook.imagepipeline.core.PriorityThreadFactory$1.run(PriorityThreadFactory.java:53) 16 java.lang.Thread.run(Thread.java:818)

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.(NativeMemoryChunk.java:33) 7 com.facebook.imagepipeline.memory.NativeMemoryChunkPool.alloc(NativeMemoryChunkPool.java:58) 8 com.facebook.imagepipeline.memory.NativeMemoryChunkPool.alloc(NativeMemoryChunkPool.java:20) 9 com.facebook.imagepipeline.memory.BasePool.get(BasePool.java:257) 10 com.facebook.imagepipeline.memory.NativePooledByteBufferOutputStream.(NativePooledByteBufferOutputStream.java:51) 11 com.facebook.imagepipeline.memory.NativePooledByteBufferFactory.newByteBuffer(NativePooledByteBufferFactory.java:98) 12 com.facebook.imagepipeline.memory.NativePooledByteBufferFactory.newByteBuffer(NativePooledByteBufferFactory.java:26) 13 com.facebook.imagepipeline.cache.BufferedDiskCache.readFromDiskCache(BufferedDiskCache.java:336) 14 com.facebook.imagepipeline.cache.BufferedDiskCache.access$400(BufferedDiskCache.java:36) 15 com.facebook.imagepipeline.cache.BufferedDiskCache$2.call(BufferedDiskCache.java:182) 16 com.facebook.imagepipeline.cache.BufferedDiskCache$2.call(BufferedDiskCache.java:166) 17 bolts.Task$4.run(Task.java:357) 18 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) 19 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) 20 com.facebook.imagepipeline.core.PriorityThreadFactory$1.run(PriorityThreadFactory.java:53) 21 java.lang.Thread.run(Thread.java:818)

ignaciogs commented 6 years ago

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.(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.(NativePooledByteBufferOutputStream.java:51) at com.facebook.imagepipeline.memory.NativePooledByteBufferFactory.newOutputStream(NativePooledByteBufferFactory.java:141) at com.facebook.imagepipeline.memory.NativePooledByteBufferFactory.newOutputStream(NativePooledByteBufferFactory.java:26) at com.facebook.imagepipeline.producers.NetworkFetchProducer.onResponse(NetworkFetchProducer.java:90) at com.facebook.imagepipeline.producers.NetworkFetchProducer$1.onResponse(NetworkFetchProducer.java:70) at com.facebook.imagepipeline.backends.okhttp3.OkHttpNetworkFetcher$2.onResponse(OkHttpNetworkFetcher.java:180) at okhttp3.RealCall$AsyncCall.execute(RealCall.java:153) at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) at java.lang.Thread.run(Thread.java:818)

ignaciogs commented 6 years ago

image

hsandyque commented 6 years ago

@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

wangshuwen1107 commented 6 years ago

@hsandyque thanks a lot ,your response is very helpful,Looking forward to your update!

hsandyque commented 6 years ago

@oprisnik @erikandre @lambdapioneer Do you have any idea about how to fix this issue?

lambdapioneer commented 6 years ago

@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.

siralam commented 6 years ago

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?

deltaguita commented 6 years ago

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 !

icemanstudy commented 6 years ago

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.

Freshman111 commented 6 years ago

Still have this problem on v1.9.0.

Sk1talec commented 6 years ago

Still facing that issue on 1.9.0 with supported abis "armeabi", "armeabi-v7a", "x86"

tantom commented 6 years ago

Still have this problem on v1.9.0.

midhun-murali commented 6 years ago

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

dlackty commented 6 years ago

UPDATE: For those we got this issue, please do check the production guide on Fresco website, which solves our problem.

jmbusby commented 6 years ago

Also seeing this problem on a variety of devices: image

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.

stale[bot] commented 6 years ago

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.

jmbusby commented 6 years ago

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.

oprisnik commented 6 years ago

@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

jmbusby commented 6 years ago

@oprisnik I think that is unlikely, as the most common phone that is crashing is an Asus Zenfone 3 Max which has an ARM v8 processor. The most common ZTE phone is a Blade V7, also with ARM v8.

ch4ndu commented 6 years ago

I am seeing this issue while migrating to 1.10 from 1.8.1

A couple of components we use in our app force us to use only the 'armeabi' and 'x86' splits...and looking at the Imagepipeline's aar file for v-1.10, the 'armeabi' variant is absent. Is this going to be the case going forward? Are you dropping support for that architecture? The .so files are present in 1.9 though.

manjunathc23 commented 6 years ago

Any lead here

stale[bot] commented 6 years ago

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.

midhun-murali commented 6 years ago

Issue is still there

tyronen commented 6 years ago

Hi guys, good to 'see' you again.

@lambdapioneer, @oprisnik this issue has been reported in various incarnations since Fresco 0.1. The trouble is in the plethora of devices loading libraries, some of them are bound to have problems.

The recommended solution (splitting the APK) causes other issues. Among other things, splitting the APK requires separate version codes for each ABI. When you already have multiple product flavors and build types, all of which are managed by external plugins like hockeyapp, splitting makes the team's eyes droop. At this point it would actually be easier to switch to Glide than to do that.

NativePooledByteBuffer isn't really that important for API>=21, which is what a lot of apps are now targeting (Dalvik is now down to 10%). It might be worth making it optional, and just using standard Java memory for the later platforms.

I might be able to work on this later, but I suspect you'd prefer someone still at FB to do that :)

oprisnik commented 6 years ago

Hey @tyronen! Long time no 'see' :)

Good timing, we actually have somebody working on this right now (a Java version of NativePooledByteBuffer and similar classes) - so this should be fixed soon.

However, we have quite a few other open issues and ideas for future improvements if you'd like to contribute again. We also have some bigger changes in mind for both Drawee and the pipeline, so things are likely to change soon.

Tuccro commented 6 years ago

Samsung Galaxy S9 Android 8 still not works.

lby1992 commented 6 years ago

I encounter this issue too. This happened on the OPPO A51 phone, it appear while I'm using Fresco v1.8.1 but it didn't appear within the v0.12.0

xX7 commented 6 years ago

So I guess this will just be Ignored? Crashing on most popular devices starting from version 1.8...

dengbin53 commented 5 years ago

api 'com.facebook.fresco:fresco:1.10.0' 😂😂😂

ghost commented 5 years ago

any update?

JeremyR34 commented 5 years ago

Same issue here Almost 8 month old issue. Any know workaround? Does downgrading fresco and using soloader work?

lambdapioneer commented 5 years ago

Hey everyone, I do understand the frustration with this issue.

I want to let you know that we are well aware of the (various) issues with native code and the problems it causes. We are actively working on allowing using Fresco without any native code (see e.g. ImagePipelineExperiments#disableNativeCode). It might be ready with release v1.11 or v1.12. Kudos to @MikaelMorales

On issues like this, it's really hard for us to make progress without any complete repro that we can work with. Here it seems that having snippets from the build.gradle file isn't enough. It'd need to be a minimal, but complete, project.

If you do have a local repro, you can help us and everyone on this thread a lot by:

This is an issue where we need your help a lot! I've added the "bug" tag so that stale-bot keeps quiet.

@ch4ndu, you've correctly observed that armeabi is missing the latest Fresco versions. It was removed in NDK r17 (https://developer.android.com/ndk/guides/abis)

654277633 commented 5 years ago

W/System.err: java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libimagepipeline.so How to fix it

ndk { abiFilters "armeabi" } implementation 'com.facebook.fresco:fresco:1.11.0' implementation 'com.facebook.fresco:animated-gif:1.11.0' implementation 'com.facebook.fresco:animated-webp:1.11.0' implementation 'com.facebook.fresco:webpsupport:1.11.0'

beatrizz commented 5 years ago

Hi, I might have found another way of reproducing this issue.

We use Fresco 1.11 to load some static images and animated GIFs in our app. They both work well when we build and install APKs, but not when we build app bundles from Android Studio and we use bundletool to build (build-apks) and install (install-apks) the APKs. In that case, GIFs aren't loaded but the app doesn't crash when we try to load them and trying to load a static image crashes the app (couldn't find DSO to load: libimagepipeline.so).

We've tried setting .experiment().setNativeCodeDisabled(true) in Fresco's ImagePipelineConfig and with that the static images work but GIFs crash with a different error (couldn't find DSO to load: libgifimage.so). Even if this worked, we wouldn't be comfortable using something called ".experiment()" in production.

I'm using the Android Gradle Plugin 3.2.1, Android Studio 3.3 beta 4 and bundletool 0.7.1. I'm testing on an Android 8.1.0 phone.

Is there a way to use Fresco with app bundles reliably? This is preventing us from moving to the new format at the moment. Thanks!

This is the crash when trying to load GIFs after turning the experiment on:

11-22 16:39:03.339 18019 18019 D SoLoader: init start
11-22 16:39:03.340 18019 18019 D SoLoader: adding system library source: /vendor/lib
11-22 16:39:03.340 18019 18019 D SoLoader: adding system library source: /system/lib
11-22 16:39:03.340 18019 18019 D SoLoader: adding application source: com.facebook.soloader.DirectorySoSource[root = /data/app/com.packagename--UQkiLx1zhtubNxSl35TMg==/lib/arm64 flags = 0]
11-22 16:39:03.341 18019 18019 D SoLoader: adding backup  source: com.facebook.soloader.ApkSoSource[root = /data/data/com.packagename/lib-main flags = 1]
11-22 16:39:03.341 18019 18019 D SoLoader: Preparing SO source: com.facebook.soloader.DirectorySoSource[root = /system/lib flags = 2]
11-22 16:39:03.341 18019 18019 D SoLoader: Preparing SO source: com.facebook.soloader.DirectorySoSource[root = /vendor/lib flags = 2]
11-22 16:39:03.341 18019 18019 D SoLoader: Preparing SO source: com.facebook.soloader.DirectorySoSource[root = /data/app/com.packagename--UQkiLx1zhtubNxSl35TMg==/lib/arm64 flags = 0]
11-22 16:39:03.342 18019 18019 D SoLoader: Preparing SO source: com.facebook.soloader.ApkSoSource[root = /data/data/com.packagename/lib-main flags = 1]
11-22 16:39:03.343 18019 18019 V fb-UnpackingSoSource: locked dso store /data/user/0/com.packagename/lib-main
11-22 16:39:03.347 18019 18019 I fb-UnpackingSoSource: dso store is up-to-date: /data/user/0/com.packagename/lib-main
11-22 16:39:03.347 18019 18019 V fb-UnpackingSoSource: releasing dso store lock for /data/user/0/com.packagename/lib-main
11-22 16:39:03.347 18019 18019 D SoLoader: init finish: 4 SO sources prepared
11-22 16:39:03.347 18019 18019 D SoLoader: init exiting

11-22 16:39:04.327 18019 18293 D SoLoader: About to load: libgifimage.so
11-22 16:39:04.328 18019 18293 D SoLoader: libgifimage.so not found on /data/data/com.packagename/lib-main
11-22 16:39:04.328 18019 18293 D SoLoader: libgifimage.so not found on /data/app/com.packagename--UQkiLx1zhtubNxSl35TMg==/lib/arm64
11-22 16:39:04.329 18019 18293 D SoLoader: libgifimage.so not found on /vendor/lib
11-22 16:39:04.329 18019 18293 D SoLoader: libgifimage.so not found on /system/lib
11-22 16:39:04.339 18019 18293 E SoLoader: couldn't find DSO to load: libgifimage.so
11-22 16:39:04.348 18019 18293 E AndroidRuntime: FATAL EXCEPTION: FrescoDecodeExecutor-2
11-22 16:39:04.348 18019 18293 E AndroidRuntime: Process: com.packagename, PID: 18019
11-22 16:39:04.348 18019 18293 E AndroidRuntime: java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libgifimage.so
11-22 16:39:04.348 18019 18293 E AndroidRuntime:    at com.facebook.soloader.SoLoader.doLoadLibraryBySoName(SoLoader.java:703)
11-22 16:39:04.348 18019 18293 E AndroidRuntime:    at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:564)
11-22 16:39:04.348 18019 18293 E AndroidRuntime:    at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:500)
11-22 16:39:04.348 18019 18293 E AndroidRuntime:    at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:455)
11-22 16:39:04.348 18019 18293 E AndroidRuntime:    at com.facebook.animated.gif.GifImage.ensure(GifImage.java:42)
11-22 16:39:04.348 18019 18293 E AndroidRuntime:    at com.facebook.animated.gif.GifImage.create(GifImage.java:70)
11-22 16:39:04.348 18019 18293 E AndroidRuntime:    at com.facebook.animated.gif.GifImage.decode(GifImage.java:89)
11-22 16:39:04.348 18019 18293 E AndroidRuntime:    at com.facebook.imagepipeline.animated.factory.AnimatedImageFactoryImpl.decodeGif(AnimatedImageFactoryImpl.java:85)
11-22 16:39:04.348 18019 18293 E AndroidRuntime:    at com.facebook.fresco.animation.factory.AnimatedFactoryV2Impl$1.decode(AnimatedFactoryV2Impl.java:86)
11-22 16:39:04.348 18019 18293 E AndroidRuntime:    at com.facebook.imagepipeline.decoder.DefaultImageDecoder.decodeGif(DefaultImageDecoder.java:136)
11-22 16:39:04.348 18019 18293 E AndroidRuntime:    at com.facebook.imagepipeline.decoder.DefaultImageDecoder$1.decode(DefaultImageDecoder.java:60)
11-22 16:39:04.348 18019 18293 E AndroidRuntime:    at com.facebook.imagepipeline.decoder.DefaultImageDecoder.decode(DefaultImageDecoder.java:121)
11-22 16:39:04.348 18019 18293 E AndroidRuntime:    at com.facebook.imagepipeline.producers.DecodeProducer$ProgressiveDecoder.doDecode(DecodeProducer.java:276)
11-22 16:39:04.348 18019 18293 E AndroidRuntime:    at com.facebook.imagepipeline.producers.DecodeProducer$ProgressiveDecoder.access$200(DecodeProducer.java:123)
11-22 16:39:04.348 18019 18293 E AndroidRuntime:    at com.facebook.imagepipeline.producers.DecodeProducer$ProgressiveDecoder$1.run(DecodeProducer.java:165)
11-22 16:39:04.348 18019 18293 E AndroidRuntime:    at com.facebook.imagepipeline.producers.JobScheduler.doJob(JobScheduler.java:202)
11-22 16:39:04.348 18019 18293 E AndroidRuntime:    at com.facebook.imagepipeline.producers.JobScheduler.access$000(JobScheduler.java:22)
11-22 16:39:04.348 18019 18293 E AndroidRuntime:    at com.facebook.imagepipeline.producers.JobScheduler$1.run(JobScheduler.java:73)
11-22 16:39:04.348 18019 18293 E AndroidRuntime:    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
11-22 16:39:04.348 18019 18293 E AndroidRuntime:    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
11-22 16:39:04.348 18019 18293 E AndroidRuntime:    at com.facebook.imagepipeline.core.PriorityThreadFactory$1.run(PriorityThreadFactory.java:51)
11-22 16:39:04.348 18019 18293 E AndroidRuntime:    at java.lang.Thread.run(Thread.java:764)

The crash when trying to load static images before turning the experiment on is below. Traces are similar (couldn't find DSO to load: libimagepipeline.so) when trying to load GIFs but without getting to the fatal exception.

11-22 16:08:49.551 13724 13724 D SoLoader: init start
11-22 16:08:49.551 13724 13724 D SoLoader: adding system library source: /vendor/lib
11-22 16:08:49.551 13724 13724 D SoLoader: adding system library source: /system/lib
11-22 16:08:49.552 13724 13724 D SoLoader: adding application source: com.facebook.soloader.DirectorySoSource[root = /data/app/com.packagename-VWSKdOesFkJ5ehUD4vU9aw==/lib/arm64 flags = 0]
11-22 16:08:49.552 13724 13724 D SoLoader: adding backup  source: com.facebook.soloader.ApkSoSource[root = /data/data/com.packagename/lib-main flags = 1]
11-22 16:08:49.552 13724 13724 D SoLoader: Preparing SO source: com.facebook.soloader.DirectorySoSource[root = /system/lib flags = 2]
11-22 16:08:49.553 13724 13724 D SoLoader: Preparing SO source: com.facebook.soloader.DirectorySoSource[root = /vendor/lib flags = 2]
11-22 16:08:49.553 13724 13724 D SoLoader: Preparing SO source: com.facebook.soloader.DirectorySoSource[root = /data/app/com.packagename-VWSKdOesFkJ5ehUD4vU9aw==/lib/arm64 flags = 0]
11-22 16:08:49.553 13724 13724 D SoLoader: Preparing SO source: com.facebook.soloader.ApkSoSource[root = /data/data/com.packagename/lib-main flags = 1]
11-22 16:08:49.554 13724 13724 V fb-UnpackingSoSource: locked dso store /data/user/0/com.packagename/lib-main
11-22 16:08:49.556 13724 13724 I fb-UnpackingSoSource: dso store is up-to-date: /data/user/0/com.packagename/lib-main
11-22 16:08:49.556 13724 13724 V fb-UnpackingSoSource: releasing dso store lock for /data/user/0/com.packagename/lib-main
11-22 16:08:49.556 13724 13724 D SoLoader: init finish: 4 SO sources prepared
11-22 16:08:49.556 13724 13724 D SoLoader: init exiting

11-22 16:08:50.468 13724 13809 D SoLoader: About to load: libimagepipeline.so
11-22 16:08:50.472 13724 13809 D SoLoader: libimagepipeline.so not found on /data/data/com.packagename/lib-main
11-22 16:08:50.472 13724 13809 D SoLoader: libimagepipeline.so not found on /data/app/com.packagename-VWSKdOesFkJ5ehUD4vU9aw==/lib/arm64
11-22 16:08:50.472 13724 13809 D SoLoader: libimagepipeline.so not found on /vendor/lib
11-22 16:08:50.473 13724 13809 D SoLoader: libimagepipeline.so not found on /system/lib
11-22 16:08:50.476 13724 13809 E SoLoader: couldn't find DSO to load: libimagepipeline.so
11-22 16:08:50.480 13724 13815 I zygote64: Rejecting re-init on previously-failed class java.lang.Class<com.facebook.imagepipeline.memory.NativeMemoryChunk>: java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libimagepipeline.so
11-22 16:08:50.481 13724 13815 I zygote64:   at void com.facebook.soloader.SoLoader.doLoadLibraryBySoName(java.lang.String, int, android.os.StrictMode$ThreadPolicy) (SoLoader.java:703)
11-22 16:08:50.481 13724 13815 I zygote64:   at boolean com.facebook.soloader.SoLoader.loadLibraryBySoName(java.lang.String, java.lang.String, java.lang.String, int, android.os.StrictMode$ThreadPolicy) (SoLoader.java:564)
11-22 16:08:50.481 13724 13815 I zygote64:   at boolean com.facebook.soloader.SoLoader.loadLibrary(java.lang.String, int) (SoLoader.java:500)
11-22 16:08:50.481 13724 13815 I zygote64:   at boolean com.facebook.soloader.SoLoader.loadLibrary(java.lang.String) (SoLoader.java:455)
11-22 16:08:50.481 13724 13815 I zygote64:   at void com.facebook.imagepipeline.nativecode.ImagePipelineNativeLoader.load() (ImagePipelineNativeLoader.java:40)
11-22 16:08:50.481 13724 13815 I zygote64:   at void com.facebook.imagepipeline.memory.NativeMemoryChunk.<clinit>() (NativeMemoryChunk.java:31)
11-22 16:08:50.481 13724 13815 I zygote64:   at com.facebook.imagepipeline.memory.NativeMemoryChunk com.facebook.imagepipeline.memory.NativeMemoryChunkPool.alloc(int) (NativeMemoryChunkPool.java:25)
11-22 16:08:50.481 13724 13815 I zygote64:   at java.lang.Object com.facebook.imagepipeline.memory.NativeMemoryChunkPool.alloc(int) (NativeMemoryChunkPool.java:13)
11-22 16:08:50.481 13724 13815 I zygote64:   at java.lang.Object com.facebook.imagepipeline.memory.BasePool.get(int) (BasePool.java:267)
11-22 16:08:50.481 13724 13815 I zygote64:   at void com.facebook.imagepipeline.memory.MemoryPooledByteBufferOutputStream.<init>(com.facebook.imagepipeline.memory.MemoryChunkPool, int) (MemoryPooledByteBufferOutputStream.java:51)
11-22 16:08:50.481 13724 13815 I zygote64:   at com.facebook.imagepipeline.memory.MemoryPooledByteBuffer com.facebook.imagepipeline.memory.MemoryPooledByteBufferFactory.newByteBuffer(java.io.InputStream, int) (MemoryPooledByteBufferFactory.java:73)
11-22 16:08:50.481 13724 13815 I zygote64:   at com.facebook.common.memory.PooledByteBuffer com.facebook.imagepipeline.memory.MemoryPooledByteBufferFactory.newByteBuffer(java.io.InputStream, int) (MemoryPooledByteBufferFactory.java:24)
11-22 16:08:50.481 13724 13815 I zygote64:   at com.facebook.imagepipeline.image.EncodedImage com.facebook.imagepipeline.producers.LocalFetchProducer.getByteBufferBackedEncodedImage(java.io.InputStream, int) (LocalFetchProducer.java:87)
11-22 16:08:50.481 13724 13815 I zygote64:   at com.facebook.imagepipeline.image.EncodedImage com.facebook.imagepipeline.producers.LocalFetchProducer.getEncodedImage(java.io.InputStream, int) (LocalFetchProducer.java:99)
11-22 16:08:50.481 13724 13815 I zygote64:   at com.facebook.imagepipeline.image.EncodedImage com.facebook.imagepipeline.producers.LocalAssetFetchProducer.getEncodedImage(com.facebook.imagepipeline.request.ImageRequest) (LocalAssetFetchProducer.java:37)
11-22 16:08:50.481 13724 13815 I zygote64:   at com.facebook.imagepipeline.image.EncodedImage com.facebook.imagepipeline.producers.LocalFetchProducer$1.getResult() (LocalFetchProducer.java:52)
11-22 16:08:50.481 13724 13815 I zygote64:   at java.lang.Object com.facebook.imagepipeline.producers.LocalFetchProducer$1.getResult() (LocalFetchProducer.java:48)
11-22 16:08:50.481 13724 13815 I zygote64:   at void com.facebook.common.executors.StatefulRunnable.run() (StatefulRunnable.java:43)
11-22 16:08:50.481 13724 13815 I zygote64:   at void java.util.concurrent.ThreadPoolExecutor.runWorker(java.util.concurrent.ThreadPoolExecutor$Worker) (ThreadPoolExecutor.java:1162)
11-22 16:08:50.481 13724 13815 I zygote64:   at void java.util.concurrent.ThreadPoolExecutor$Worker.run() (ThreadPoolExecutor.java:636)
11-22 16:08:50.481 13724 13815 I zygote64:   at void com.facebook.imagepipeline.core.PriorityThreadFactory$1.run() (PriorityThreadFactory.java:51)
11-22 16:08:50.481 13724 13815 I zygote64:   at void java.lang.Thread.run() (Thread.java:764)
11-22 16:08:50.481 13724 13815 I zygote64: 
11-22 16:08:50.507 13724 13809 E AndroidRuntime: FATAL EXCEPTION: FrescoIoBoundExecutor-1
11-22 16:08:50.507 13724 13809 E AndroidRuntime: Process: com.packagename, PID: 13724
11-22 16:08:50.507 13724 13809 E AndroidRuntime: java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libimagepipeline.so
11-22 16:08:50.507 13724 13809 E AndroidRuntime:    at com.facebook.soloader.SoLoader.doLoadLibraryBySoName(SoLoader.java:703)
11-22 16:08:50.507 13724 13809 E AndroidRuntime:    at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:564)
11-22 16:08:50.507 13724 13809 E AndroidRuntime:    at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:500)
11-22 16:08:50.507 13724 13809 E AndroidRuntime:    at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:455)
11-22 16:08:50.507 13724 13809 E AndroidRuntime:    at com.facebook.imagepipeline.nativecode.ImagePipelineNativeLoader.load(ImagePipelineNativeLoader.java:40)
11-22 16:08:50.507 13724 13809 E AndroidRuntime:    at com.facebook.imagepipeline.memory.NativeMemoryChunk.<clinit>(NativeMemoryChunk.java:31)
11-22 16:08:50.507 13724 13809 E AndroidRuntime:    at com.facebook.imagepipeline.memory.NativeMemoryChunkPool.alloc(NativeMemoryChunkPool.java:25)
11-22 16:08:50.507 13724 13809 E AndroidRuntime:    at com.facebook.imagepipeline.memory.NativeMemoryChunkPool.alloc(NativeMemoryChunkPool.java:13)
11-22 16:08:50.507 13724 13809 E AndroidRuntime:    at com.facebook.imagepipeline.memory.BasePool.get(BasePool.java:267)
11-22 16:08:50.507 13724 13809 E AndroidRuntime:    at com.facebook.imagepipeline.memory.MemoryPooledByteBufferOutputStream.<init>(MemoryPooledByteBufferOutputStream.java:51)
11-22 16:08:50.507 13724 13809 E AndroidRuntime:    at com.facebook.imagepipeline.memory.MemoryPooledByteBufferFactory.newByteBuffer(MemoryPooledByteBufferFactory.java:73)
11-22 16:08:50.507 13724 13809 E AndroidRuntime:    at com.facebook.imagepipeline.memory.MemoryPooledByteBufferFactory.newByteBuffer(MemoryPooledByteBufferFactory.java:24)
11-22 16:08:50.507 13724 13809 E AndroidRuntime:    at com.facebook.imagepipeline.producers.LocalFetchProducer.getByteBufferBackedEncodedImage(LocalFetchProducer.java:87)
11-22 16:08:50.507 13724 13809 E AndroidRuntime:    at com.facebook.imagepipeline.producers.LocalFetchProducer.getEncodedImage(LocalFetchProducer.java:99)
11-22 16:08:50.507 13724 13809 E AndroidRuntime:    at com.facebook.imagepipeline.producers.LocalAssetFetchProducer.getEncodedImage(LocalAssetFetchProducer.java:37)
11-22 16:08:50.507 13724 13809 E AndroidRuntime:    at com.facebook.imagepipeline.producers.LocalFetchProducer$1.getResult(LocalFetchProducer.java:52)
11-22 16:08:50.507 13724 13809 E AndroidRuntime:    at com.facebook.imagepipeline.producers.LocalFetchProducer$1.getResult(LocalFetchProducer.java:48)
11-22 16:08:50.507 13724 13809 E AndroidRuntime:    at com.facebook.common.executors.StatefulRunnable.run(StatefulRunnable.java:43)
11-22 16:08:50.507 13724 13809 E AndroidRuntime:    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
11-22 16:08:50.507 13724 13809 E AndroidRuntime:    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
11-22 16:08:50.507 13724 13809 E AndroidRuntime:    at com.facebook.imagepipeline.core.PriorityThreadFactory$1.run(PriorityThreadFactory.java:51)
11-22 16:08:50.507 13724 13809 E AndroidRuntime:    at java.lang.Thread.run(Thread.java:764)
11-22 16:08:50.512 13724 13810 E AndroidRuntime: FATAL EXCEPTION: FrescoIoBoundExecutor-2
11-22 16:08:50.512 13724 13810 E AndroidRuntime: Process: com.packagename, PID: 13724
11-22 16:08:50.512 13724 13810 E AndroidRuntime: java.lang.NoClassDefFoundError: <clinit> failed for class com.facebook.imagepipeline.memory.NativeMemoryChunk; see exception in other thread
11-22 16:08:50.512 13724 13810 E AndroidRuntime:    at com.facebook.imagepipeline.memory.NativeMemoryChunkPool.alloc(NativeMemoryChunkPool.java:25)
11-22 16:08:50.512 13724 13810 E AndroidRuntime:    at com.facebook.imagepipeline.memory.NativeMemoryChunkPool.alloc(NativeMemoryChunkPool.java:13)
11-22 16:08:50.512 13724 13810 E AndroidRuntime:    at com.facebook.imagepipeline.memory.BasePool.get(BasePool.java:267)
11-22 16:08:50.512 13724 13810 E AndroidRuntime:    at com.facebook.imagepipeline.memory.MemoryPooledByteBufferOutputStream.<init>(MemoryPooledByteBufferOutputStream.java:51)
11-22 16:08:50.512 13724 13810 E AndroidRuntime:    at com.facebook.imagepipeline.memory.MemoryPooledByteBufferFactory.newByteBuffer(MemoryPooledByteBufferFactory.java:73)
11-22 16:08:50.512 13724 13810 E AndroidRuntime:    at com.facebook.imagepipeline.memory.MemoryPooledByteBufferFactory.newByteBuffer(MemoryPooledByteBufferFactory.java:24)
11-22 16:08:50.512 13724 13810 E AndroidRuntime:    at com.facebook.imagepipeline.producers.LocalFetchProducer.getByteBufferBackedEncodedImage(LocalFetchProducer.java:87)
11-22 16:08:50.512 13724 13810 E AndroidRuntime:    at com.facebook.imagepipeline.producers.LocalFetchProducer.getEncodedImage(LocalFetchProducer.java:99)
11-22 16:08:50.512 13724 13810 E AndroidRuntime:    at com.facebook.imagepipeline.producers.LocalAssetFetchProducer.getEncodedImage(LocalAssetFetchProducer.java:37)
11-22 16:08:50.512 13724 13810 E AndroidRuntime:    at com.facebook.imagepipeline.producers.LocalFetchProducer$1.getResult(LocalFetchProducer.java:52)
11-22 16:08:50.512 13724 13810 E AndroidRuntime:    at com.facebook.imagepipeline.producers.LocalFetchProducer$1.getResult(LocalFetchProducer.java:48)
11-22 16:08:50.512 13724 13810 E AndroidRuntime:    at com.facebook.common.executors.StatefulRunnable.run(StatefulRunnable.java:43)
11-22 16:08:50.512 13724 13810 E AndroidRuntime:    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
11-22 16:08:50.512 13724 13810 E AndroidRuntime:    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
11-22 16:08:50.512 13724 13810 E AndroidRuntime:    at com.facebook.imagepipeline.core.PriorityThreadFactory$1.run(PriorityThreadFactory.java:51)
11-22 16:08:50.512 13724 13810 E AndroidRuntime:    at java.lang.Thread.run(Thread.java:764)
beatrizz commented 5 years ago

Hi again,

I have tried to reproduce the issue with the showcase app, checking out the label v1.11.0, but it doesn't compile. I've tried to follow https://frescolib.org/docs/building-from-source.html but I think that's obsolete (e.g. it talks about the folder android-ndk/r10e but that doesn't exist in my installation and the most recent version is r18b).

If I try to run the showcase app from Android Studio, I get Process 'command '<mySdkPath>/ndk-bundle/ndk-build'' finished with non-zero exit value 2.

Running ./gradlew build from the command line, I get:

> Task :imagepipeline:ndk_build_bitmaps FAILED
A problem was found with the configuration of task ':imagepipeline:ndk_build_bitmaps'. Registering invalid inputs and outputs via TaskInputs and TaskOutputs methods has been deprecated and is scheduled to be removed in Gradle 5.0.
 - File '<myWorkspace>/fresco/imagepipeline/src/main/jni/bitmaps' specified for property '$1' is not a file.
Android NDK: APP_PLATFORM not set. Defaulting to minimum supported version android-16.    
make: Entering directory `<myWorkspace>/fresco/imagepipeline/src/main/jni/bitmaps'
<mySdkPath>/ndk-bundle/build/core/add-application.mk:178: *** make: Leaving directory `<myWorkspace>/fresco/imagepipeline/src/main/jni/bitmaps'
Android NDK: APP_STL gnustl_static is no longer supported. Please switch to either c++_static or c++_shared. See https://developer.android.com/ndk/guides/cpp-support.html for more information.    .  Stop.

FAILURE: Build failed with an exception.

I've tried setting APP_PLATFORM to different values and the line about it disappears but the error is the same.

chibatching commented 5 years ago

This problem still happen with Android Studio 3.3 RC 1.

fenggit commented 5 years ago

help me!

java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libimagepipeline.so caused by: dlopen failed: "/data/data/com.vipabc.vipmobilejr.phone/lib-main/libimagepipeline.so" is 64-bit instead of 32-bit

KimiChiu commented 5 years ago

I only have this issue appeared when I use okhttp integration. But without it my app won't start downloading images.

Hey everyone, I do understand the frustration with this issue.

I want to let you know that we are well aware of the (various) issues with native code and the problems it causes. We are actively working on allowing using Fresco without any native code (see e.g. ImagePipelineExperiments#disableNativeCode). It might be ready with release v1.11 or v1.12. Kudos to @MikaelMorales

On issues like this, it's really hard for us to make progress without any complete repro that we can work with. Here it seems that having snippets from the build.gradle file isn't enough. It'd need to be a minimal, but complete, project.

If you do have a local repro, you can help us and everyone on this thread a lot by:

  • Checking if it reproduces with the showcase app
  • Then gradually going from the showcase app to your build configuration and observing at which point it breaks

This is an issue where we need your help a lot! I've added the "bug" tag so that stale-bot keeps quiet.

@ch4ndu, you've correctly observed that armeabi is missing the latest Fresco versions. It was removed in NDK r17 (https://developer.android.com/ndk/guides/abis)

You could simply buy an OPPO r7 with Android 5.1.1 to reproduce this issue on your own. Please note that you should integrate with okhttp to make it throws exceptions.