Hi, I'm running into this Specified cast is not valid
issue when I do a SelectedIndexChanged
event in my pickers, it happens at random times, the weird part is that the stacktrace doesn't show any reference to any line in my code but the main.cs, so I think this might be a Xamarin Forms bug, has anyone run into something similar?
Thank you.
I'm using Xamarin Forms 2.5.0.121934 in VS form Mac 7.3.2 (build 12)
System.InvalidCastException: Specified cast is not valid. at (wrapper castclass) System.Object:__castclass_with_cache (object,intptr,intptr) at Xamarin.Forms.Platform.iOS.VisualElementRenderer``1[TElement].Xamarin.Forms.Platform.iOS.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00000] in <f321195339234cc7a2f7f1d5fa08167d>:0 at Xamarin.Forms.Platform.iOS.RendererPool.UpdateRenderers (Xamarin.Forms.Element newElement) [0x0008c] in <f321195339234cc7a2f7f1d5fa08167d>:0 at Xamarin.Forms.Platform.iOS.RendererPool.UpdateNewElement (Xamarin.Forms.VisualElement newElement) [0x00080] in <f321195339234cc7a2f7f1d5fa08167d>:0 at Xamarin.Forms.Platform.iOS.VisualElementPackager.SetElement (Xamarin.Forms.VisualElement oldElement, Xamarin.Forms.VisualElement newElement) [0x00050] in <f321195339234cc7a2f7f1d5fa08167d>:0 at Xamarin.Forms.Platform.iOS.VisualElementPackager.OnRendererElementChanged (System.Object sender, Xamarin.Forms.Platform.iOS.VisualElementChangedEventArgs args) [0x0001c] in <f321195339234cc7a2f7f1d5fa08167d>:0 at Xamarin.Forms.Platform.iOS.VisualElementRenderer``1[TElement].OnElementChanged (Xamarin.Forms.Platform.iOS.ElementChangedEventArgs``1[TElement] e) [0x0002c] in <f321195339234cc7a2f7f1d5fa08167d>:0 at Xamarin.Forms.Platform.iOS.VisualElementRenderer``1[TElement].SetElement (TElement element) [0x00118] in <f321195339234cc7a2f7f1d5fa08167d>:0 at Xamarin.Forms.Platform.iOS.VisualElementRenderer``1[TElement].Xamarin.Forms.Platform.iOS.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x00000] in <f321195339234cc7a2f7f1d5fa08167d>:0 at Xamarin.Forms.Platform.iOS.ViewCellRenderer+ViewTableCell.UpdateCell (Xamarin.Forms.ViewCell cell) [0x000e5] in <f321195339234cc7a2f7f1d5fa08167d>:0 at Xamarin.Forms.Platform.iOS.ViewCellRenderer+ViewTableCell.set_ViewCell (Xamarin.Forms.ViewCell value) [0x0000a] in <f321195339234cc7a2f7f1d5fa08167d>:0 at Xamarin.Forms.Platform.iOS.ViewCellRenderer.GetCell (Xamarin.Forms.Cell item, UIKit.UITableViewCell reusableCell, UIKit.UITableView tv) [0x0004d] in <f321195339234cc7a2f7f1d5fa08167d>:0 at Xamarin.Forms.Platform.iOS.CellTableViewCell.GetNativeCell (UIKit.UITableView tableView, Xamarin.Forms.Cell cell, System.Boolean recycleCells, System.String templateId) [0x00080] in <f321195339234cc7a2f7f1d5fa08167d>:0 at Xamarin.Forms.Platform.iOS.TableViewModelRenderer.GetCell (UIKit.UITableView tableView, Foundation.NSIndexPath indexPath) [0x0001d] in <f321195339234cc7a2f7f1d5fa08167d>:0 at (wrapper managed-to-native) UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr) at UIKit.UIApplication.Main (System.String[] args, System.IntPtr principal, System.IntPtr delegate) [0x00005] in /Users/builder/data/lanes/5665/6857dfcc/source/xamarin-macios/src/UIKit/UIApplication.cs:79 at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x00038] in /Users/builder/data/lanes/5665/6857dfcc/source/xamarin-macios/src/UIKit/UIApplication.cs:63 at SuperSeedsMobile.iOS.Application.Main (System.String[] args) [0x00002] in /Users/alan/Dev/Projects/SuperSeedsMobile/iOS/Main.cs:19 }