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+
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);
The image zero.png is displayed
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+
It's already fixed https://github.com/luberda-molinet/FFImageLoading/commit/4e6dfd61ab855f01b859343780642242aae8a20c
Stable package soon.
Most helpful comment
It's already fixed https://github.com/luberda-molinet/FFImageLoading/commit/4e6dfd61ab855f01b859343780642242aae8a20c
Stable package soon.