Rare crash in AddToSavingQueueIfNotExistsAsync
Stack trace from insights below. Hard to repro, maybe one every 100,000 queries.
System.NullReferenceExceptionObject reference not set to an instance of an object
at FFImageLoading.Cache.SimpleDiskCache+<>c__DisplayClass14_0+<
@patook Could you also paste the rest of stack trace? It can be more useful to me.
Actually this is all that Xamarin Insights shows. We've had it 36 times in the past month. It appears to only impact Android as I didn't see any corresponding iOS crashes.
System.NullReferenceExceptionObject reference not set to an instance of an object
Raw
null
System.NullReferenceExceptionObject reference not set to an instance of an object
at FFImageLoading.Cache.SimpleDiskCache+<>c__DisplayClass14_0+<
I think that it means that a continuation, so after an await, tried to access a member on a null instance. So we should look for await usages in SimpleDiskCache and figure where we about null possibilities in continuations.
Yes, it is in AddToSavingQueueIfNotExistsAsync:
at FFImageLoading.Cache.SimpleDiskCache+<>c__DisplayClass14_0+<
It looks like github is stripping out part of the stack. Here it is again:
at FFImageLoading.Cache.SimpleDiskCache+c__DisplayClass14_0+AddToSavingQueueIfNotExistsAsync>b__0>d.MoveNext ()
I have a full stack now:
System.Collections.Concurrent.ConcurrentDictionary<TKey, TValue>.TryRemoveInternal(TKey key, ref TValue value, bool matchValue, TValue oldValue)
Could you test the newest prerelease? (2.2.10.428) It should be fixed now. Please reopen if it's still a valid issue. Thanks