facebook / facebook/fresco

How can I deal with the "Failed to decode frame" exception?

Open
#1,868 4 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Kotlin
Stars
17.2k
Forks
3.7k
PR merge metrics
No merged PRs in 30d

Description

I see the abnormal information display is decode frame problem, but I don't know which frame has the problem and what is the problem, such as picture is invalid, picture format info wrong, or other questions about the frame,

If my app has this problem, how can I solve it and then avoid this problem?

```
Fatal Exception: java.lang.IllegalStateException: Failed to decode frame
at com.facebook.animated.webp.WebPFrame.nativeRenderFrame(SourceFile)
at com.facebook.animated.webp.WebPFrame.renderFrame(SourceFile:50)
at com.facebook.imagepipeline.animated.impl.AnimatedDrawableBackendImpl.renderImageSupportsScaling(SourceFile:203)
at com.facebook.imagepipeline.animated.impl.AnimatedDrawableBackendImpl.renderFrame(SourceFile:177)
at com.facebook.imagepipeline.animated.impl.AnimatedImageCompositor.renderFrame(SourceFile:120)
at com.facebook.fresco.animation.bitmap.wrapper.AnimatedDrawableBackendFrameRenderer.renderFrame(SourceFile:74)
at com.facebook.fresco.animation.bitmap.preparation.DefaultBitmapFramePreparer$FrameDecodeRunnable.renderFrameAndCache(SourceFile:175)
at com.facebook.fresco.animation.bitmap.preparation.DefaultBitmapFramePreparer$FrameDecodeRunnable.prepareFrameAndCache(SourceFile:154)
at com.facebook.fresco.animation.bitmap.preparation.DefaultBitmapFramePreparer$FrameDecodeRunnable.prepareFrameAndCache(SourceFile:162)
at com.facebook.fresco.animation.bitmap.preparation.DefaultBitmapFramePreparer$FrameDecodeRunnable.run(SourceFile:112)
at com.facebook.common.executors.ConstrainedExecutorService$Worker.run(SourceFile:177)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at com.facebook.imagepipeline.core.PriorityThreadFactory$1.run(SourceFile:42)
at java.lang.Thread.run(Thread.java:818)
```
* Fresco version: 1.5.0

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.