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

java.lang.UnsatisfiedLinkError: com.facebook.imagepipeline.memory.NativeMemoryChunk and java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libimagepipeline.so #2381

Closed
liushazm opened this issue Jul 23, 2019 · 12 comments
Labels

Comments

@liushazm
Copy link

liushazm commented Jul 23, 2019

Hi, I have two problems, most of them happen on the Android 5.1 system of the OPPO brand mobile phone. The following is the error log.

Log1

java.lang.UnsatisfiedLinkError: com.facebook.imagepipeline.memory.NativeMemoryChunk
at com.facebook.imagepipeline.memory.NativeMemoryChunkPool.alloc(NativeMemoryChunkPool.java:25)
    at com.facebook.imagepipeline.memory.NativeMemoryChunkPool.alloc(NativeMemoryChunkPool.java:13)
    at com.facebook.imagepipeline.memory.BasePool.get(BasePool.java:267)
    at com.facebook.imagepipeline.memory.MemoryPooledByteBufferOutputStream.<init>(MemoryPooledByteBufferOutputStream.java:51)
    at com.facebook.imagepipeline.memory.MemoryPooledByteBufferFactory.newOutputStream(MemoryPooledByteBufferFactory.java:106)
    at com.facebook.imagepipeline.memory.MemoryPooledByteBufferFactory.newOutputStream(MemoryPooledByteBufferFactory.java:24)
    at com.facebook.imagepipeline.producers.NetworkFetchProducer.onResponse(NetworkFetchProducer.java:96)
    at com.facebook.imagepipeline.producers.NetworkFetchProducer$1.onResponse(NetworkFetchProducer.java:73)
    at com.facebook.imagepipeline.backends.okhttp3.OkHttpNetworkFetcher$2.onResponse(OkHttpNetworkFetcher.java:193)
    at okhttp3.RealCall$AsyncCall.execute(RealCall.java:174)
    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)

Log2

java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libimagepipeline.so caused by: dlopen failed: "/data/data/com.saltchucker/lib-main/libimagepipeline.so" is 64-bit instead of 32-bit
    at com.facebook.soloader.SoLoader.doLoadLibraryBySoName(SoLoader.java:738)
    at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:591)
    at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:529)
    at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:484)
    at com.facebook.imagepipeline.nativecode.ImagePipelineNativeLoader.load(ImagePipelineNativeLoader.java:40)
    at com.facebook.imagepipeline.memory.NativeMemoryChunk.<clinit>(NativeMemoryChunk.java:31)
    at com.facebook.imagepipeline.memory.NativeMemoryChunkPool.alloc(NativeMemoryChunkPool.java:25)
    at com.facebook.imagepipeline.memory.NativeMemoryChunkPool.alloc(NativeMemoryChunkPool.java:13)
    at com.facebook.imagepipeline.memory.BasePool.get(BasePool.java:267)
    at com.facebook.imagepipeline.memory.MemoryPooledByteBufferOutputStream.<init>(MemoryPooledByteBufferOutputStream.java:51)
    at com.facebook.imagepipeline.memory.MemoryPooledByteBufferFactory.newByteBuffer(MemoryPooledByteBufferFactory.java:73)
    at com.facebook.imagepipeline.memory.MemoryPooledByteBufferFactory.newByteBuffer(MemoryPooledByteBufferFactory.java:24)
    at com.facebook.imagepipeline.producers.LocalFetchProducer.getByteBufferBackedEncodedImage(LocalFetchProducer.java:85)
    at com.facebook.imagepipeline.producers.LocalFetchProducer.getEncodedImage(LocalFetchProducer.java:97)
    at com.facebook.imagepipeline.producers.LocalAssetFetchProducer.getEncodedImage(LocalAssetFetchProducer.java:37)
    at com.facebook.imagepipeline.producers.LocalFetchProducer$1.getResult(LocalFetchProducer.java:50)
    at com.facebook.imagepipeline.producers.LocalFetchProducer$1.getResult(LocalFetchProducer.java:46)
    at com.facebook.common.executors.StatefulRunnable.run(StatefulRunnable.java:43)
    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:51)
    at java.lang.Thread.run(Thread.java:818)

Fresco version

implementation "com.facebook.fresco:fresco:1.13.0"
implementation "com.facebook.fresco:animated-gif:1.13.0"
implementation "com.facebook.fresco:animated-webp:1.13.0"
implementation "com.facebook.fresco:webpsupport:1.13.0"
implementation "com.facebook.fresco:imagepipeline-okhttp3:1.13.0"

Most of them happen in the following phones

  • OPPO A59s
  • OPPO A37
  • OPPO A59
  • OPPO R9
@liushazm liushazm changed the title java.lang.UnsatisfiedLinkError and java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libimagepipeline.so java.lang.UnsatisfiedLinkError: com.facebook.imagepipeline.memory.NativeMemoryChunk and java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libimagepipeline.so Jul 23, 2019
@samyakjain
Copy link

Facing the same crash. Please update if there is anyfix.

@ShawnDongAi
Copy link

Any Solution?
I‘m facing the same crash, please resolve it!

@ShawnDongAi
Copy link

ShawnDongAi commented Jul 31, 2019

I have a solution before fresco fix this issue, maybe it can help you.
Preload the libimagepipeline so, shutdown fresco if we catch an UnsatisfiedLinkError, then reinit by disabe native implementation. Like this:

val builder = ImagePipelineConfig.newBuilder(context)
val imagePipelineConfig = builder.build()
Fresco.initialize(context, imagePipelineConfig)
try {
ImagePipelineNativeLoader.load()
} catch (error: UnsatisfiedLinkError) {
Fresco.shutDown()
builder.experiment().setNativeCodeDisabled(true)
imagePipelineConfig = builder.build()
Fresco.initialize(context, imagePipelineConfig)
error.printStackTrace()
}

@stale
Copy link

stale bot commented Aug 7, 2019

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.

@stale stale bot added stale and removed stale labels Aug 7, 2019
@stale
Copy link

stale bot commented Aug 21, 2019

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.

@stale stale bot added the stale label Aug 21, 2019
@oprisnik
Copy link
Contributor

facebook/SoLoader#45 potentially fixes this issue I suppose.

@stale stale bot removed the stale label Aug 21, 2019
@stale
Copy link

stale bot commented Aug 28, 2019

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.

@stale stale bot added the stale label Aug 28, 2019
@stale
Copy link

stale bot commented Sep 4, 2019

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to reopen with up-to-date information.

@stale stale bot closed this as completed Sep 4, 2019
@oprisnik
Copy link
Contributor

oprisnik commented Sep 4, 2019

The fix has been landed. We'll release a new Fresco version soon.

@tpiDev
Copy link

tpiDev commented Sep 12, 2019

@oprisnik

The fix has been landed. We'll release a new Fresco version soon.

Could you provide more information? Any additional changes will be required on configuration side? What is expected version containing fix for mentioned issues?

@lhzljl
Copy link

lhzljl commented Jan 7, 2020

facebook/SoLoader#45 potentially fixes this issue I suppose.

Has the new version been released?

@iamsdk
Copy link

iamsdk commented May 28, 2020

I use the latest version v2.2, and it still happend in my app.
java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libimagepipeline.so result: 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants