FFImageLoading icon indicating copy to clipboard operation
FFImageLoading copied to clipboard

FFImageLoading.Exceptions.DownloadHttpStatusCodeException

Open nikolozdolidze opened this issue 6 years ago • 12 comments

Description

So i have android project with RecyclerView displaying images in each item. i use latest nuget package of Xamarin.FFImageLoading.

ImageService.Instance.Config.AllowUpscale = false;
ImageService.Instance.Config.ClearMemoryCacheOnOutOfMemory = true;
ImageService.Instance.Config.FadeAnimationForCachedImages = false;
ImageService.Instance.Config.MaxMemoryCacheSize = 0;
ImageService.Instance.Config.FadeAnimationEnabled = false;

This is how i set config settings. and this is how i load image

ImageService.Instance
                .LoadUrl(imageView.Url)
                .WithCache(FFImageLoading.Cache.CacheType.Disk)
                .CacheKey(imageView.Url)
                .IntoAsync(imageView);

(imageView is my custom view which is inherited from ImageView and it has Url property.)

the problem is that while scrolling RecyclerView slowly it works fine, but on fastscroll it crashes and throws Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR) exception. after that it is written that FFImageLoading.Exceptions.DownloadHttpStatusCodeException this exception happened in package. when i remove image initialization it works fine on fast scroll. do you guys have any suggestion?

nikolozdolidze avatar Jun 09 '19 10:06 nikolozdolidze

The same issue for me, the crash appears when using Xamarin Forms ListView, and also with native ImageService.Instance.Load.. when using with RecyclerView. Looks like it cancels a download of already scrolled items, and it causes a crash.

stepkillah avatar Jun 10 '19 09:06 stepkillah

I can't figure it out why it is throwing this exception. i have used this package for 5 projects and this is the first one with this problem.

nikolozdolidze avatar Jun 10 '19 11:06 nikolozdolidze

Crash occurred for me when upgraded to XF 4.0, maybe it will help.

stepkillah avatar Jun 10 '19 11:06 stepkillah

Unfortunately i am not using XF :'(

nikolozdolidze avatar Jun 10 '19 16:06 nikolozdolidze

i guess i have to stop production of app then :/ can't fix it with anything :/

nikolozdolidze avatar Jun 11 '19 11:06 nikolozdolidze

Same problem here with my project

SDV-MINI-DEV-2 avatar Jun 20 '19 11:06 SDV-MINI-DEV-2

@NiccoloZaza

IntoAsync(imageView) should not be used. You should use Into(imageView). Docs clearly state that async version throws all exceptions (VS code hints)

daniel-luberda avatar Jun 22 '19 21:06 daniel-luberda

@NiccoloZaza

IntoAsync(imageView) should not be used. You should use Into(imageView). Docs clearly state that async version throws all exceptions (VS code hints)

Hi Daniel, I've the same problem but I'm actually using MVVMCross and the ImageUrl binding property. The binding with Mvvmcross use IntoAsync or Into for loading images? Because with the simple binding property (I've followed the documentation) I also have this crash

SDV-MINI-DEV-2 avatar Jun 24 '19 06:06 SDV-MINI-DEV-2

Any updates?

rrispoli avatar Oct 25 '19 19:10 rrispoli

Any updates?

I decided to use Glide. Surprisingly, it is better in every way :)

nikolozdolidze avatar Oct 26 '19 10:10 nikolozdolidze

Also seeing this on latest Xamarin Forms scrolling really fast in any collection view / list view. We have an api that gets people with imageUrl properties, which are then bound to the ItemTemplate for the collection control. Some high end devices don't experience the crash, but we get this on emulators + mid-range devices.

InquisitorJax avatar Oct 16 '20 09:10 InquisitorJax

Any updates?

dovhoang avatar Jan 09 '23 07:01 dovhoang