luberda-molinet / FFImageLoading

Image loading, caching & transforming library for Xamarin and Windows
MIT License
1.42k stars 377 forks source link

FFImageLoading.Exceptions.DownloadHttpStatusCodeException #1296

Open nikolozdolidze opened 5 years ago

nikolozdolidze commented 5 years ago

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?

stepkillah commented 5 years ago

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.

nikolozdolidze commented 5 years ago

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.

stepkillah commented 5 years ago

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

nikolozdolidze commented 5 years ago

Unfortunately i am not using XF :'(

nikolozdolidze commented 5 years ago

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

SDV-MINI-DEV-2 commented 5 years ago

Same problem here with my project

daniel-luberda commented 5 years ago

@NiccoloZaza

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

SDV-MINI-DEV-2 commented 5 years ago

@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

rrispoli commented 4 years ago

Any updates?

nikolozdolidze commented 4 years ago

Any updates?

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

InquisitorJax commented 3 years ago

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.

dovhoang commented 1 year ago

Any updates?