Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
I am not able to reproduce this consistently (hence no repro attached) but it happens occasionally in my app. I get an intermittent unhandled exception of type System.Collections.Generic.KeyNotFoundException with the following stack trace.
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at Xamarin.Forms.AnimationExtensions.HandleTweenerUpdated(Object o, EventArgs args)
at Xamarin.Forms.Tweener.<Start>b__0(Int64 step)
at Xamarin.Forms.Ticker.SendSignals(Int32 timestep)
at Xamarin.Forms.WinPhoneTicker.<.ctor>b__1(Object sender, EventArgs args)
at MS.Internal.CoreInvokeHandler.InvokeEventHandler(Int32 typeIndex, Delegate handlerDelegate, Object sender, Object args)
at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName)
I do have a 'looping animation' running in the background. It's possible the form is being popped from the stack while the animation is running and that is causing it? Animation code is something along the lines of;
var t = DoAnimation();
private async Task DoAnimation()
await LogoImage.FadeTo(0.1, 1000, Easing.Linear);
await LogoImage.FadeTo(1.0, 2000, Easing.Linear);
This happens to me on iOS as well. The issue is that the iOS code for Xamarin forms is not checking for existence in the AnimationExtensions.animations dictionary from which it is retrieving. The fix is quite simple if you just use TryGetValue when fetching that animation info.
This crash is possible in Xamarin.Forms.Core AnimationExtensions.HandlewTweenerUpdated and AnimationExtensions.HandlewTweenerFinished.
Here is a crash report stack that we get regularly Xamarin.Forms 1.4.1x
at System.Collections.Generic.Dictionary`2[System.String,Xamarin.Forms.AnimationExtensions+Info].get_Item (System.String key) [0x00000] in <filename unknown>:0
at Xamarin.Forms.AnimationExtensions.HandleTweenerUpdated (System.Object o, System.EventArgs args) [0x00000] in <filename unknown>:0
at Xamarin.Forms.Tweener.<Start>b__0 (Int64 step) [0x00000] in <filename unknown>:0
at Xamarin.Forms.Ticker.SendSignals (Int32 timestep) [0x00000] in <filename unknown>:0
at Xamarin.Forms.Platform.iOS.CADisplayLinkTicker.<EnableTimer>b__0 () [0x00000] in <filename unknown>:0
at Foundation.NSActionDispatcher.Apply () [0x00000] in <filename unknown>:0
at (wrapper managed-to-native) UIKit.UIApplication:UIApplicationMain (int,string,intptr,intptr)
at UIKit.UIApplication.Main (System.String args, IntPtr principal, IntPtr delegate) [0x00000] in <filename unknown>:0
at UIKit.UIApplication.Main (System.String args, System.String principalClassName, System.String delegateClassName) [0x00000] in <filename unknown>:0
I think this most often happens when there is an animation running on a page and you navigate to another (either back, or pushasync or pushmodalasync).
Yes that does tend to be when it happens. But, if you want a button to tween, such as a back button, there is really no avoiding this issue.
Can the Xamarin Team please give us an acknowledgement of this issue?
Thank you I see the issue
What is the estimated Forms version that will have a fix for this?
Should be fixed in 1.4.4-pre2
Thank you, excellent work.
This crash is still happening. I see the same dictionary read without checking the key in Xamarin Forms 18.104.22.16892 AnimationExtensions.HandleTweenerUpdated
This is fixed in Xamarin.Forms 22.214.171.12471 Yay!
It's taken a while, but I am happy to see it fixed. Thank you very much.