Ffimageloading: Xamarin.Forms image loading failed

Created on 16 Jan 2018  路  1Comment  路  Source: luberda-molinet/FFImageLoading

Description

I'm getting the below errors when trying to display an image "zero.png" and the image doesn't show up. I have a list of images, zero.png one.png two.png ..., and some are not showing up and have the logs below while others are correctly displayed.

The below is the log I'm getting:

01-15 14:58:15.605 I/mono-stdout( 2387): Image loading failed: zero.png
01-15 14:58:15.605 I/mono-stdout( 2387): System.NullReferenceException: Object reference not set to an instance of an object.
01-15 14:58:15.605 I/mono-stdout( 2387): at FFImageLoading.Cache.ReuseBitmapDrawableCache1[TValue].ProcessRemoval (TValue value, System.Boolean evicted) [0x00030] in C:\projects\ffimageloading\source\FFImageLoading.Droid\Cache\ReuseBitmapDrawableCache.cs:235 01-15 14:58:15.605 I/mono-stdout( 2387): at FFImageLoading.Cache.ReuseBitmapDrawableCache1[TValue].Remove (System.String key, System.Boolean evicted) [0x0005f] in C:projectsffimageloadingsourceFFImageLoading.DroidCacheReuseBitmapDrawableCache.cs:383
01-15 14:58:15.606 I/mono-stdout( 2387): at FFImageLoading.Cache.ReuseBitmapDrawableCache1[TValue].Add (System.String key, TValue value) [0x00078] in C:\projects\ffimageloading\source\FFImageLoading.Droid\Cache\ReuseBitmapDrawableCache.cs:349 01-15 14:58:15.606 I/mono-stdout( 2387): at FFImageLoading.Cache.ImageCache1[TValue].Add (System.String key, FFImageLoading.Work.ImageInformation imageInformation, TValue bitmap) [0x00059] in C:projectsffimageloadingsourceFFImageLoading.DroidCacheImageCache.cs:171
01-15 14:58:15.606 I/mono-stdout( 2387): at FFImageLoading.Work.ImageLoaderTask`3+d__108[TDecoderContainer,TImageContainer,TImageView].MoveNext () [0x0056e] in C:projectsffimageloadingsourceFFImageLoading.CommonWorkImageLoaderTask.cs:564

Steps to Reproduce

Here is my code that I use:

        var grid = new Grid();

        // Define our grid columns
        grid.RowDefinitions.Add(new RowDefinition() { Height = new GridLength(1, GridUnitType.Star) });
        grid.RowDefinitions.Add(new RowDefinition() { Height = new GridLength(80) });

        grid.ColumnDefinitions.Add(new ColumnDefinition { Width = new GridLength(1, GridUnitType.Star) });
        grid.ColumnDefinitions.Add(new ColumnDefinition { Width = new GridLength(1, GridUnitType.Star) });


        // Add the image for the hand
        var handImage = new CachedImage
        {
            Source = "zero.png"
        };

        grid.Children.Add(handImage, 1, 1);

Expected Behavior

The image zero.png is displayed

Actual Behavior

01-15 14:58:15.605 I/mono-stdout( 2387): Image loading failed: zero.png
01-15 14:58:15.605 I/mono-stdout( 2387): System.NullReferenceException: Object reference not set to an instance of an object.
01-15 14:58:15.605 I/mono-stdout( 2387): at FFImageLoading.Cache.ReuseBitmapDrawableCache1[TValue].ProcessRemoval (TValue value, System.Boolean evicted) [0x00030] in C:\projects\ffimageloading\source\FFImageLoading.Droid\Cache\ReuseBitmapDrawableCache.cs:235 01-15 14:58:15.605 I/mono-stdout( 2387): at FFImageLoading.Cache.ReuseBitmapDrawableCache1[TValue].Remove (System.String key, System.Boolean evicted) [0x0005f] in C:projectsffimageloadingsourceFFImageLoading.DroidCacheReuseBitmapDrawableCache.cs:383
01-15 14:58:15.606 I/mono-stdout( 2387): at FFImageLoading.Cache.ReuseBitmapDrawableCache1[TValue].Add (System.String key, TValue value) [0x00078] in C:\projects\ffimageloading\source\FFImageLoading.Droid\Cache\ReuseBitmapDrawableCache.cs:349 01-15 14:58:15.606 I/mono-stdout( 2387): at FFImageLoading.Cache.ImageCache1[TValue].Add (System.String key, FFImageLoading.Work.ImageInformation imageInformation, TValue bitmap) [0x00059] in C:projectsffimageloadingsourceFFImageLoading.DroidCacheImageCache.cs:171
01-15 14:58:15.606 I/mono-stdout( 2387): at FFImageLoading.Work.ImageLoaderTask`3+d__108[TDecoderContainer,TImageContainer,TImageView].MoveNext () [0x0056e] in C:projectsffimageloadingsourceFFImageLoading.CommonWorkImageLoaderTask.cs:564

Basic Information

  • Version with issue: 2.3.4
  • Platform: Android (on iOS the images don't show up but not with the log)
Android

Most helpful comment

>All comments

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rredoh picture rredoh  路  17Comments

vlkam picture vlkam  路  21Comments

si-matthews picture si-matthews  路  37Comments

stopiccot picture stopiccot  路  17Comments

Tommigun1980 picture Tommigun1980  路  16Comments