fresco icon indicating copy to clipboard operation
fresco copied to clipboard

Fresco.initialize caused Application Not Responding

Open RitaBags opened this issue 1 year ago • 7 comments

Description

While executing a code on below line it is producing ANR. ANR's are reported on Crashlytics We are facing ANR while initializing the liabrary as

fun init() {
        Fresco.initialize(application, imagePipelineConfig)
    }

Below is the ANR report from Crashlytics: at java.util.concurrent.CancellationException.(CancellationException.java:61) at com.facebook.imagepipeline.core.ImagePipeline.(ImagePipeline.java) at com.facebook.imagepipeline.core.ImagePipelineFactory.createImagePipeline(ImagePipelineFactory.java:309) at com.facebook.imagepipeline.core.ImagePipelineFactory.getImagePipeline(ImagePipelineFactory.java:303) at com.facebook.drawee.backends.pipeline.PipelineDraweeControllerBuilderSupplier.(PipelineDraweeControllerBuilderSupplier.java:55) at com.facebook.drawee.backends.pipeline.PipelineDraweeControllerBuilderSupplier.(PipelineDraweeControllerBuilderSupplier.java:45) at com.facebook.drawee.backends.pipeline.PipelineDraweeControllerBuilderSupplier.(PipelineDraweeControllerBuilderSupplier.java:38) at com.facebook.drawee.backends.pipeline.Fresco.initializeDrawee(Fresco.java:121) at com.facebook.drawee.backends.pipeline.Fresco.initialize(Fresco.java:110) at com.facebook.drawee.backends.pipeline.Fresco.initialize(Fresco.java:54) at com.facebook.drawee.backends.pipeline.Fresco.initialize(Fresco.java:46) at com.myapp.framework.fresco.FrescoManager.init(FrescoManager.java:13) at com.myapp.FrescoInitializer.create(FrescoInitializer.kt:17) at com.myapp.FrescoInitializer.create(FrescoInitializer.kt:10) at androidx.startup.AppInitializer.doInitialize(AppInitializer.java:180)

Reproduction

It is an online ANR, I can't reproduce it on my phone, however it happens for multiple users.

Solution

N/A

Additional Information

  • Fresco version: 2.5.0
  • Platform version: Android version 11, 12, 13 Devices: HMD Global, Motorola, Google Cros, Oneplus, Samsung and other

RitaBags avatar May 08 '24 15:05 RitaBags

Any update on it? or do I need to assign it to any specific person in order get the update ? cc : @ @steelrooter

RitaBags avatar May 15 '24 15:05 RitaBags

fun init() { Fresco.initialize(application, imagePipelineConfig) }

STEPHENERUEAGA6 avatar Aug 14 '24 00:08 STEPHENERUEAGA6

docs/images/ActionsPermissions.png

STEPHENERUEAGA6 avatar Sep 22 '24 13:09 STEPHENERUEAGA6

docs/images/ActionsPermissions.png

STEPHENERUEAGA6 avatar Sep 22 '24 13:09 STEPHENERUEAGA6

how do you solved this?

zoomGitS avatar Oct 24 '24 11:10 zoomGitS

I thought by updating the version it will resolve the ANR. But it seems it is still there. Reopening the issue.:

There are multiple similar ANR's reported on Crashlytics: main (runnable):tid=1 systid=2700 at androidx.core.util.Pools$SynchronizedPool.release(Pools.kt:130) at com.facebook.imagepipeline.platform.PlatformDecoderFactory.createPool(PlatformDecoderFactory.java:81) at com.facebook.imagepipeline.platform.PlatformDecoderFactory.buildPlatformDecoder(PlatformDecoderFactory.java:40) at com.facebook.imagepipeline.core.ImagePipelineFactory.getPlatformDecoder(ImagePipelineFactory.java:373) at com.facebook.imagepipeline.core.ImagePipelineFactory.getPlatformBitmapFactory(ImagePipelineFactory.java:365) at com.facebook.imagepipeline.core.ImagePipelineFactory.getAnimatedFactory(ImagePipelineFactory.java:178) at com.facebook.imagepipeline.core.ImagePipelineFactory.getImageDecoder(ImagePipelineFactory.java:249) at com.facebook.imagepipeline.core.ImagePipelineFactory.getProducerFactory(ImagePipelineFactory.java:391) at com.facebook.imagepipeline.core.ImagePipelineFactory.getProducerSequenceFactory(ImagePipelineFactory.java:427) at com.facebook.imagepipeline.core.ImagePipelineFactory.createImagePipeline(ImagePipelineFactory.java:345) at com.facebook.imagepipeline.core.ImagePipelineFactory.getImagePipeline(ImagePipelineFactory.java:338) at com.facebook.drawee.backends.pipeline.PipelineDraweeControllerBuilderSupplier.(PipelineDraweeControllerBuilderSupplier.java:55) at com.facebook.drawee.backends.pipeline.PipelineDraweeControllerBuilderSupplier.(PipelineDraweeControllerBuilderSupplier.java:45) at com.facebook.drawee.backends.pipeline.PipelineDraweeControllerBuilderSupplier.(PipelineDraweeControllerBuilderSupplier.java:38) at com.facebook.drawee.backends.pipeline.Fresco.initializeDrawee(Fresco.java:121) at com.facebook.drawee.backends.pipeline.Fresco.initialize(Fresco.java:110) at com.facebook.drawee.backends.pipeline.Fresco.initialize(Fresco.java:54) at com.facebook.drawee.backends.pipeline.Fresco.initialize(Fresco.java:46)


main (runnable):tid=1 systid=24588 at com.facebook.drawee.backends.pipeline.PipelineDraweeControllerBuilderSupplier.(PipelineDraweeControllerBuilderSupplier.java:55) at com.facebook.drawee.backends.pipeline.PipelineDraweeControllerBuilderSupplier.(PipelineDraweeControllerBuilderSupplier.java:45) at com.facebook.drawee.backends.pipeline.PipelineDraweeControllerBuilderSupplier.(PipelineDraweeControllerBuilderSupplier.java:38) at com.facebook.drawee.backends.pipeline.Fresco.initializeDrawee(Fresco.java:121) at com.facebook.drawee.backends.pipeline.Fresco.initialize(Fresco.java:110) at com.facebook.drawee.backends.pipeline.Fresco.initialize(Fresco.java:54) at com.facebook.drawee.backends.pipeline.Fresco.initialize(Fresco.java:46)

RitaBags avatar Oct 24 '24 16:10 RitaBags