Hello, we are using FFImageLoading in a PCL Project and sometimes the FFImageLoading throw this exception: "System.ArgumentNullException: Value cannot be null"
this is the only stack that the problem gives to us....
<forms:CachedImage HorizontalOptions="Start"
VerticalOptions="Center"
WidthRequest="50"
HeightRequest="50"
DownsampleWidth="50"
DownsampleHeight="50"
DownsampleToViewSize = "true"
Source="{Binding MyImage">
<forms:CachedImage.Transformations>
<transformations:CircleTransformation />
</forms:CachedImage.Transformations>
</forms:CachedImage>
what we saw here is that when we are not using CircleTransformation the error is seems to not appear again...
thanks
Somehow, memory cache entries with null cache key are being added. Could you run it with verbose logging to debug when exactly it occurs (for which urls/images)? Something like that:
``` C#
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
FFImageLoading.Forms.Droid.CachedImageRenderer.Init();
var config = new FFImageLoading.Config.Configuration()
{
VerboseLogging = true,
VerbosePerformanceLogging = false,
VerboseMemoryCacheLogging = false,
VerboseLoadingCancelledLogging = false,
Logger = new CustomLogger(),
};
ImageService.Instance.Initialize(config);
global::Xamarin.Forms.Forms.Init(this, bundle);
LoadApplication(new App());
}
public class CustomLogger : FFImageLoading.Helpers.IMiniLogger
{
public void Debug(string message)
{
Console.WriteLine(message);
}
public void Error(string errorMessage)
{
Console.WriteLine(errorMessage);
}
public void Error(string errorMessage, Exception ex)
{
Error(errorMessage + System.Environment.NewLine + ex.ToString());
}
}
```
We have attached the log error.
When this error occurs, the image shows, but it isn't a circle.
The transformation has not been applied.
Thanks! It should be fixed with this: https://github.com/luberda-molinet/FFImageLoading/commit/073f4772ab3c4c71d2b2473691bfaff9a7149dcb
Thanks a lot.
Any ideias about when will be a release or a prerelease with the fix?
FFImageLoading 2.1.8-pre-146 nuget which contains discussed fixes released.
The exception is no longer happening.
But a single image on the ListView isn't a circle.
The image with the error changes each time I start the app.

Transformations property before Source property. No, it isn`t the same image.
The source is a local ImageSource
This is how I use the component on a ViewCell
<forms:CachedImage HorizontalOptions="Start"
VerticalOptions="Center"
WidthRequest="50"
HeightRequest="50"
DownsampleWidth="50"
DownsampleHeight="50"
DownsampleToViewSize = "true"
Source="{Binding Imagem}, Mode=OneWay}">
<forms:CachedImage.Transformations>
<transformations:CircleTransformation />
</forms:CachedImage.Transformations>
</forms:CachedImage>
Source="{Binding Imagem}, Mode=OneWay} should be Source="{Binding Imagem, Mode=OneWay}
Yes, is coded that way.
Sorry, I was testing something else.
<forms:CachedImage HorizontalOptions="Start"
VerticalOptions="Center"
WidthRequest="50"
HeightRequest="50"
DownsampleWidth="50"
DownsampleHeight="50"
DownsampleToViewSize = "true"
Source="{Binding Imagem, Mode=OneWay}">
<forms:CachedImage.Transformations>
<transformations:CircleTransformation />
</forms:CachedImage.Transformations>
</forms:CachedImage>
Could you try this:
``` C#
WidthRequest="50"
HeightRequest="50"
DownsampleWidth="50"
DownsampleHeight="50"
DownsampleToViewSize = "true">
<forms:CachedImage.Transformations>
<transformations:CircleTransformation />
</forms:CachedImage.Transformations>
<forms:CachedImage.Source>
<Binding Path="Imagem"/>
</forms:CachedImage.Source>
```
?
That worked, I can no longer simulate behavior.
Thank you.
I fixed this with: https://github.com/luberda-molinet/FFImageLoading/commit/272c51f994803598673cbf72f7fb8abba4726bd4. It will prevent such behavior in future.
2.1.8-pre-150 released. It will allow your previous code to work correctly without any modifications. Could you check it?