Declined
Last Updated: 29 Oct 2018 22:56 by Carey
Jeremy
Created on: 22 Oct 2018 18:56
Category: DataGrid
Type: Bug Report
0
[iOS] DataGrid causes NullReferenceException when navigating away
After first appearing on screen, the DataGrid will cause a NullReferenceException when navigating away. Also occurs if you have a DataGrid in a RadTabView and you switch to another tab.

Same code works on UWP, Android. Crashes on iOS.

XAML:

            <tdg:RadDataGrid x:Name="grid"
                             ItemsSource="{Binding Parts}"
                             HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand"
                             IsVisible="{Binding ShowData}"
                             StyleClass="TelerikTheme"
                             AlternateRowBackgroundStyle="{StaticResource DefaultDataGridAlternatingRowStyle}"
                             GroupHeaderStyle="{StaticResource DefaultDataGridGroupHeaderStyle}"
                             AutoGenerateColumns="False"
                             SelectionMode="None"
                             UserEditMode="None">
                <tdg:RadDataGrid.Columns>
                    <tdg:DataGridTextColumn PropertyName="PrimaryId"
                                            HeaderText="Primary ID"
                                            CanUserFilter="False"
                                            HeaderStyle="{StaticResource DefaultDataGridColumnHeaderStyle}"
                                            CellContentStyle="{StaticResource DefaultDataGridTextCellStyle}" />
                    <tdg:DataGridTextColumn PropertyName="SecondaryId"
                                            HeaderText="Secondary ID"
                                            CanUserFilter="False"
                                            IsVisible="False"
                                            HeaderStyle="{StaticResource DefaultDataGridColumnHeaderStyle}"
                                            CellContentStyle="{StaticResource DefaultDataGridTextCellStyle}" />
                    <tdg:DataGridDateColumn PropertyName="Start"
                                            HeaderText="Start"
                                            CanUserFilter="False"
                                            CellContentFormat="{}{0:MM/dd/yy hh:mm:ss tt}"
                                            HeaderStyle="{StaticResource DefaultDataGridColumnHeaderStyle}"
                                            CellContentStyle="{StaticResource DefaultDataGridTextCellStyle}" />
                    <tdg:DataGridDateColumn PropertyName="End" 
                                            HeaderText="End" 
                                            CanUserFilter="False"
                                            IsVisible="False"
                                            CellContentFormat="{}{0:MM/dd/yy hh:mm:ss tt}"
                                            HeaderStyle="{StaticResource DefaultDataGridColumnHeaderStyle}"
                                            CellContentStyle="{StaticResource DefaultDataGridTextCellStyle}" />
                    <tdg:DataGridNumericalColumn PropertyName="ShiftNum" 
                                                 HeaderText="Shift #" 
                                                 CanUserFilter="False"
                                                 IsVisible="False"
                                                 HeaderStyle="{StaticResource DefaultDataGridColumnHeaderStyle}"
                                                 CellContentStyle="{StaticResource DefaultDataGridTextCellStyle}" />
                    <tdg:DataGridNumericalColumn PropertyName="ShiftHr" 
                                                 HeaderText="Shift Hour" 
                                                 IsVisible="False"
                                                 HeaderStyle="{StaticResource DefaultDataGridColumnHeaderStyle}"
                                                 CellContentStyle="{StaticResource DefaultDataGridTextCellStyle}" />
                    <tdg:DataGridNumericalColumn PropertyName="ShiftMins" 
                                                 HeaderText="Shift Minutes" 
                                                 CanUserFilter="False"
                                                 IsVisible="False"
                                                 HeaderStyle="{StaticResource DefaultDataGridColumnHeaderStyle}"
                                                 CellContentStyle="{StaticResource DefaultDataGridTextCellStyle}" />
                    <tdg:DataGridTextColumn PropertyName="Line" 
                                            HeaderText="Line" 
                                            CanUserFilter="False"
                                            IsVisible="False"
                                            HeaderStyle="{StaticResource DefaultDataGridColumnHeaderStyle}"
                                            CellContentStyle="{StaticResource DefaultDataGridTextCellStyle}" />
                    <tdg:DataGridTextColumn PropertyName="Station" 
                                            HeaderText="Station"
                                            CanUserFilter="False"
                                            HeaderStyle="{StaticResource DefaultDataGridColumnHeaderStyle}"
                                            CellContentStyle="{StaticResource DefaultDataGridTextCellStyle}" />
                    <tdg:DataGridTextColumn PropertyName="Status" 
                                            HeaderText="Status"
                                            CanUserFilter="False"
                                            HeaderStyle="{StaticResource DefaultDataGridColumnHeaderStyle}"
                                            CellContentStyle="{StaticResource DefaultDataGridTextCellStyle}" />
                    <tdg:DataGridTextColumn PropertyName="Description" 
                                            HeaderText="Description" 
                                            CanUserFilter="False"
                                            IsVisible="False"
                                            HeaderStyle="{StaticResource DefaultDataGridColumnHeaderStyle}"
                                            CellContentStyle="{StaticResource DefaultDataGridTextCellStyle}" />
                </tdg:RadDataGrid.Columns>
            </tdg:RadDataGrid>

Exception:
2018-10-22 14:56:01.776266-0400 Dynimetrics.iOS[9217:125873] 
Unhandled Exception:
System.NullReferenceException: Object reference not set to an instance of an object
  at Xamarin.Forms.Platform.iOS.VisualElementRenderer`1[TElement].UpdateTabStop () [0x00000] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementRenderer.cs:159 
  at Xamarin.Forms.Platform.iOS.VisualElementRenderer`1[TElement].Xamarin.Forms.Platform.iOS.IVisualElementRenderer.SetElement (Xamarin.Forms.VisualElement element) [0x0000c] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementRenderer.cs:142 
  at Telerik.XamarinForms.Common.RadPlatform.RetireRenderer (Xamarin.Forms.VisualElement visualElement) [0x0001a] in <854ee8369bca461384d3ac3224bfd96a>:0 
  at Telerik.XamarinForms.Common.iOS.RadViewContainer.ClearContainer () [0x00075] in <854ee8369bca461384d3ac3224bfd96a>:0 
  at Telerik.XamarinForms.Common.iOS.RadViewContainer.Dispose (System.Boolean disposing) [0x0000a] in <854ee8369bca461384d3ac3224bfd96a>:0 
  at Foundation.NSObject.Dispose 
() [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/12.0.0.15/src/Xamarin.iOS/Foundation/NSObject2.cs:147 
  at Telerik.XamarinForms.PrimitivesRenderer.iOS.ScrollViewRenderer.RetireViewContainer (Telerik.XamarinForms.Common.iOS.RadViewContainer viewContainer) [0x00004] in <c4c4f7bc21d74b21927d9e243e48a659>:0 
  at Telerik.XamarinForms.PrimitivesRenderer.iOS.ScrollViewRenderer.OnElementContentChanged () [0x0000c] in <c4c4f7bc21d74b21927d9e243e48a659>:0 
  at Telerik.XamarinForms.PrimitivesRenderer.iOS.ScrollViewRenderer.OnElementDetached (Telerik.XamarinForms.Primitives.RadScrollView oldElement) [0x00032] in <c4c4f7bc21d74b21927d9e243e48a659>:0 
  at Telerik.XamarinForms.Common.iOS.IosRendererBase`2[S,T].OnElementChanged (Xamarin.Forms.Platform.iOS.ElementChangedEventArgs`1[TElement] e) [0x00016] in <854ee8369bca461384d3ac3224bfd96a>:0 
  at Xamarin.Forms.Platform.iOS.VisualElementRenderer`1[TElement].SetElement (TElement element) [0x00122] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementRen
derer.cs:259 
  at Xamarin.Forms.Platform.iOS.VisualElementRenderer`1[TElement].Dispose (System.Boolean disposing) [0x0008c] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementRenderer.cs:340 
  at Xamarin.Forms.Platform.iOS.ViewRenderer`2[TView,TNativeView].Dispose (System.Boolean disposing) [0x00000] in D:\a\1\s\Xamarin.Forms.Platform.iOS\ViewRenderer.cs:84 
  at Foundation.NSObject.Dispose () [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/12.0.0.15/src/Xamarin.iOS/Foundation/NSObject2.cs:147 
  at Xamarin.Forms.Platform.iOS.VisualElementPackager.Dispose (System.Boolean disposing) [0x0003f] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:69 
  at Xamarin.Forms.Platform.iOS.VisualElementPackager.Dispose () [0x00000] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:37 
  at Xamarin.Forms.Platform.iOS.VisualElementRenderer`1[TElement].Dispose (System.Boolean disposing) [0x00058] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementRenderer.cs:331 
  at Foundation
.NSObject.Dispose () [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/12.0.0.15/src/Xamarin.iOS/Foundation/NSObject2.cs:147 
  at Xamarin.Forms.Platform.iOS.VisualElementPackager.Dispose (System.Boolean disposing) [0x0003f] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:69 
  at Xamarin.Forms.Platform.iOS.VisualElementPackager.Dispose () [0x00000] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:37 
  at Xamarin.Forms.Platform.iOS.VisualElementRenderer`1[TElement].Dispose (System.Boolean disposing) [0x00058] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementRenderer.cs:331 
  at Foundation.NSObject.Dispose () [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/12.0.0.15/src/Xamarin.iOS/Foundation/NSObject2.cs:147 
  at Xamarin.Forms.Platform.iOS.VisualElementPackager.Dispose (System.Boolean disposing) [0x0003f] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:69 
  at Xamarin.Forms.Platform.iOS.VisualElementPackager.Dispose () [0x0000
0] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:37 
  at Xamarin.Forms.Platform.iOS.PageRenderer.Dispose (System.Boolean disposing) [0x00070] in D:\a\1\s\Xamarin.Forms.Platform.iOS\Renderers\PageRenderer.cs:164 
  at Foundation.NSObject.Dispose () [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/12.0.0.15/src/Xamarin.iOS/Foundation/NSObject2.cs:147 
  at Xamarin.Forms.Platform.iOS.DisposeHelpers.DisposeModalAndChildRenderers (Xamarin.Forms.Element view) [0x00038] in D:\a\1\s\Xamarin.Forms.Platform.iOS\DisposeHelpers.cs:17 
  at Xamarin.Forms.Platform.iOS.Platform.HandleChildRemoved (System.Object sender, Xamarin.Forms.ElementEventArgs e) [0x00006] in D:\a\1\s\Xamarin.Forms.Platform.iOS\Platform.cs:297 
  at Xamarin.Forms.Element.OnDescendantRemoved (Xamarin.Forms.Element child) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\Element.cs:617 
  at Xamarin.Forms.Element.OnChildRemoved (Xamarin.Forms.Element child) [0x0001f] in D:\a\1\s\Xamarin.Forms.Core\Element.cs:357 
  at Xamarin.Fo
rms.VisualElement.OnChildRemoved (Xamarin.Forms.Element child) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:748 
  at Xamarin.Forms.Page.OnInternalRemoved (Xamarin.Forms.VisualElement view) [0x00013] in D:\a\1\s\Xamarin.Forms.Core\Page.cs:380 
  at Xamarin.Forms.Page.InternalChildrenOnCollectionChanged (System.Object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) [0x00022] in D:\a\1\s\Xamarin.Forms.Core\Page.cs:358 
  at System.Collections.ObjectModel.ObservableCollection`1[T].OnCollectionChanged (System.Collections.Specialized.NotifyCollectionChangedEventArgs e) [0x0000f] in /Library/Frameworks/Xamarin.iOS.framework/Versions/12.0.0.15/src/Xamarin.iOS/mcs/class/referencesource/System/compmod/system/collections/objectmodel/observablecollection.cs:288 
  at System.Collections.ObjectModel.ObservableCollection`1[T].OnCollectionChanged (System.Collections.Specialized.NotifyCollectionChangedAction action, System.Object item, System.Int32 index) [0x00000] in /Library/Framewor
ks/Xamarin.iOS.framework/Versions/12.0.0.15/src/Xamarin.iOS/mcs/class/referencesource/System/compmod/system/collections/objectmodel/observablecollection.cs:351 
  at System.Collections.ObjectModel.ObservableCollection`1[T].RemoveItem (System.Int32 index) [0x0002b] in /Library/Frameworks/Xamarin.iOS.framework/Versions/12.0.0.15/src/Xamarin.iOS/mcs/class/referencesource/System/compmod/system/collections/objectmodel/observablecollection.cs:205 
  at System.Collections.ObjectModel.Collection`1[T].Remove (T item) [0x00027] in /Library/Frameworks/Xamarin.iOS.framework/Versions/12.0.0.15/src/Xamarin.iOS/mcs/class/referencesource/mscorlib/system/collections/objectmodel/collection.cs:113 
  at Xamarin.Forms.MasterDetailPage.set_Detail (Xamarin.Forms.Page value) [0x0004b] in D:\a\1\s\Xamarin.Forms.Core\MasterDetailPage.cs:44 
  at Dynimetrics.UI.Views.MainPage+<NavigateFromMenu>d__6.MoveNext () [0x0006f] in C:\src\PlantFloorConnect\Dynimetrics\Dynimetrics.UI\Views\MainPage.xaml.cs:54 
--- End of stack trace from previo
us location where exception was thrown ---
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00037] in /Library/Frameworks/Xamarin.iOS.framework/Versions/12.0.0.15/src/Xamarin.iOS/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:187 
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in /Library/Frameworks/Xamarin.iOS.framework/Versions/12.0.0.15/src/Xamarin.iOS/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:156 
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in /Library/Frameworks/Xamarin.iOS.framework/Versions/12.0.0.15/src/Xamarin.iOS/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:128 
  at System.Runtime.CompilerServices.TaskAwaiter.GetResult () [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/1
2.0.0.15/src/Xamarin.iOS/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:113 
  at Dynimetrics.UI.Views.MenuPage+<<-ctor>b__3_0>d.MoveNext () [0x0005d] in C:\src\PlantFloorConnect\Dynimetrics\Dynimetrics.UI\Views\MenuPage.xaml.cs:54 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__6_0 (System.Object state) [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/12.0.0.15/src/Xamarin.iOS/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/AsyncMethodBuilder.cs:1018 
  at Foundation.NSAsyncSynchronizationContextDispatcher.Apply () [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/12.0.0.15/src/Xamarin.iOS/Foundation/NSAction.cs:178 
--- End of stack trace from previous location where exception was thrown ---
  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 /Library/Frameworks/Xamarin.iOS.framework/Versions/12.0.0.15/src/Xamarin.iOS/UIKit/UIApplication.cs:79 
  at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x0002c] in /Library/Frameworks/Xamarin.iOS.framework/Versions/12.0.0.15/src/Xamarin.iOS/UIKit/UIApplication.cs:63 
  at Dynimetrics.iOS.Application.Main (System.String[] args) [0x00001] in C:\src\PlantFloorConnect\Dynimetrics\Dynimetrics.UI.iOS\Main.cs:17
2018-10-22 14:56:01.780638-0400 Dynimetrics.iOS[9217:125873] Unhandled managed exception:
Object reference not set to an instance of an object (System.NullReferenceException)
  at Xamarin.Forms.Platform.iOS.VisualElementRenderer`1[TElement].UpdateTabStop () [0x00000] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementRenderer.cs:159 
  at Xamarin.Forms.Platform.iOS.VisualElementRenderer`1[TElement].Xamarin.Forms.Platform.iOS.IVisualElementRenderer.SetE
lement (Xamarin.Forms.VisualElement element) [0x0000c] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementRenderer.cs:142 
  at Telerik.XamarinForms.Common.RadPlatform.RetireRenderer (Xamarin.Forms.VisualElement visualElement) [0x0001a] in <854ee8369bca461384d3ac3224bfd96a>:0 
  at Telerik.XamarinForms.Common.iOS.RadViewContainer.ClearContainer () [0x00075] in <854ee8369bca461384d3ac3224bfd96a>:0 
  at Telerik.XamarinForms.Common.iOS.RadViewContainer.Dispose (System.Boolean disposing) [0x0000a] in <854ee8369bca461384d3ac3224bfd96a>:0 
  at Foundation.NSObject.Dispose () [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/12.0.0.15/src/Xamarin.iOS/Foundation/NSObject2.cs:147 
  at Telerik.XamarinForms.PrimitivesRenderer.iOS.ScrollViewRenderer.RetireViewContainer (Telerik.XamarinForms.Common.iOS.RadViewContainer viewContainer) [0x00004] in <c4c4f7bc21d74b21927d9e243e48a659>:0 
  at Telerik.XamarinForms.PrimitivesRenderer.iOS.ScrollViewRenderer.OnElementContentChanged () [0x0000c] in <c4c4f7bc21d74b
21927d9e243e48a659>:0 
  at Telerik.XamarinForms.PrimitivesRenderer.iOS.ScrollViewRenderer.OnElementDetached (Telerik.XamarinForms.Primitives.RadScrollView oldElement) [0x00032] in <c4c4f7bc21d74b21927d9e243e48a659>:0 
  at Telerik.XamarinForms.Common.iOS.IosRendererBase`2[S,T].OnElementChanged (Xamarin.Forms.Platform.iOS.ElementChangedEventArgs`1[TElement] e) [0x00016] in <854ee8369bca461384d3ac3224bfd96a>:0 
  at Xamarin.Forms.Platform.iOS.VisualElementRenderer`1[TElement].SetElement (TElement element) [0x00122] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementRenderer.cs:259 
  at Xamarin.Forms.Platform.iOS.VisualElementRenderer`1[TElement].Dispose (System.Boolean disposing) [0x0008c] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementRenderer.cs:340 
  at Xamarin.Forms.Platform.iOS.ViewRenderer`2[TView,TNativeView].Dispose (System.Boolean disposing) [0x00000] in D:\a\1\s\Xamarin.Forms.Platform.iOS\ViewRenderer.cs:84 
  at Foundation.NSObject.Dispose () [0x00000] in /Library/Frameworks/Xamarin.iOS.fram
ework/Versions/12.0.0.15/src/Xamarin.iOS/Foundation/NSObject2.cs:147 
  at Xamarin.Forms.Platform.iOS.VisualElementPackager.Dispose (System.Boolean disposing) [0x0003f] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:69 
  at Xamarin.Forms.Platform.iOS.VisualElementPackager.Dispose () [0x00000] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:37 
  at Xamarin.Forms.Platform.iOS.VisualElementRenderer`1[TElement].Dispose (System.Boolean disposing) [0x00058] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementRenderer.cs:331 
  at Foundation.NSObject.Dispose () [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/12.0.0.15/src/Xamarin.iOS/Foundation/NSObject2.cs:147 
  at Xamarin.Forms.Platform.iOS.VisualElementPackager.Dispose (System.Boolean disposing) [0x0003f] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:69 
  at Xamarin.Forms.Platform.iOS.VisualElementPackager.Dispose () [0x00000] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:37 

  at Xamarin.Forms.Platform.iOS.VisualElementRenderer`1[TElement].Dispose (System.Boolean disposing) [0x00058] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementRenderer.cs:331 
  at Foundation.NSObject.Dispose () [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/12.0.0.15/src/Xamarin.iOS/Foundation/NSObject2.cs:147 
  at Xamarin.Forms.Platform.iOS.VisualElementPackager.Dispose (System.Boolean disposing) [0x0003f] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:69 
  at Xamarin.Forms.Platform.iOS.VisualElementPackager.Dispose () [0x00000] in D:\a\1\s\Xamarin.Forms.Platform.iOS\VisualElementPackager.cs:37 
  at Xamarin.Forms.Platform.iOS.PageRenderer.Dispose (System.Boolean disposing) [0x00070] in D:\a\1\s\Xamarin.Forms.Platform.iOS\Renderers\PageRenderer.cs:164 
  at Foundation.NSObject.Dispose () [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/12.0.0.15/src/Xamarin.iOS/Foundation/NSObject2.cs:147 
  at Xamarin.Forms.Platform.iOS.DisposeHelpers.DisposeModalAndC
hildRenderers (Xamarin.Forms.Element view) [0x00038] in D:\a\1\s\Xamarin.Forms.Platform.iOS\DisposeHelpers.cs:17 
  at Xamarin.Forms.Platform.iOS.Platform.HandleChildRemoved (System.Object sender, Xamarin.Forms.ElementEventArgs e) [0x00006] in D:\a\1\s\Xamarin.Forms.Platform.iOS\Platform.cs:297 
  at Xamarin.Forms.Element.OnDescendantRemoved (Xamarin.Forms.Element child) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\Element.cs:617 
  at Xamarin.Forms.Element.OnChildRemoved (Xamarin.Forms.Element child) [0x0001f] in D:\a\1\s\Xamarin.Forms.Core\Element.cs:357 
  at Xamarin.Forms.VisualElement.OnChildRemoved (Xamarin.Forms.Element child) [0x00000] in D:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:748 
  at Xamarin.Forms.Page.OnInternalRemoved (Xamarin.Forms.VisualElement view) [0x00013] in D:\a\1\s\Xamarin.Forms.Core\Page.cs:380 
  at Xamarin.Forms.Page.InternalChildrenOnCollectionChanged (System.Object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) [0x00022] in D:\a\1\s\Xamarin.Forms.Core\P
age.cs:358 
  at System.Collections.ObjectModel.ObservableCollection`1[T].OnCollectionChanged (System.Collections.Specialized.NotifyCollectionChangedEventArgs e) [0x0000f] in /Library/Frameworks/Xamarin.iOS.framework/Versions/12.0.0.15/src/Xamarin.iOS/mcs/class/referencesource/System/compmod/system/collections/objectmodel/observablecollection.cs:288 
  at System.Collections.ObjectModel.ObservableCollection`1[T].OnCollectionChanged (System.Collections.Specialized.NotifyCollectionChangedAction action, System.Object item, System.Int32 index) [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/12.0.0.15/src/Xamarin.iOS/mcs/class/referencesource/System/compmod/system/collections/objectmodel/observablecollection.cs:351 
  at System.Collections.ObjectModel.ObservableCollection`1[T].RemoveItem (System.Int32 index) [0x0002b] in /Library/Frameworks/Xamarin.iOS.framework/Versions/12.0.0.15/src/Xamarin.iOS/mcs/class/referencesource/System/compmod/system/collections/objectmodel/observablecollection.cs:205 
  a
t System.Collections.ObjectModel.Collection`1[T].Remove (T item) [0x00027] in /Library/Frameworks/Xamarin.iOS.framework/Versions/12.0.0.15/src/Xamarin.iOS/mcs/class/referencesource/mscorlib/system/collections/objectmodel/collection.cs:113 
  at Xamarin.Forms.MasterDetailPage.set_Detail (Xamarin.Forms.Page value) [0x0004b] in D:\a\1\s\Xamarin.Forms.Core\MasterDetailPage.cs:44 
  at Dynimetrics.UI.Views.MainPage+<NavigateFromMenu>d__6.MoveNext () [0x0006f] in C:\src\PlantFloorConnect\Dynimetrics\Dynimetrics.UI\Views\MainPage.xaml.cs:54 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00037] in /Library/Frameworks/Xamarin.iOS.framework/Versions/12.0.0.15/src/Xamarin.iOS/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:187 
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0
x00028] in /Library/Frameworks/Xamarin.iOS.framework/Versions/12.0.0.15/src/Xamarin.iOS/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:156 
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in /Library/Frameworks/Xamarin.iOS.framework/Versions/12.0.0.15/src/Xamarin.iOS/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:128 
  at System.Runtime.CompilerServices.TaskAwaiter.GetResult () [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/12.0.0.15/src/Xamarin.iOS/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:113 
  at Dynimetrics.UI.Views.MenuPage+<<-ctor>b__3_0>d.MoveNext () [0x0005d] in C:\src\PlantFloorConnect\Dynimetrics\Dynimetrics.UI\Views\MenuPage.xaml.cs:54 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__6_0 (System.Object state)
 [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/12.0.0.15/src/Xamarin.iOS/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/AsyncMethodBuilder.cs:1018 
  at Foundation.NSAsyncSynchronizationContextDispatcher.Apply () [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/12.0.0.15/src/Xamarin.iOS/Foundation/NSAction.cs:178 
--- End of stack trace from previous location where exception was thrown ---
  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 /Library/Frameworks/Xamarin.iOS.framework/Versions/12.0.0.15/src/Xamarin.iOS/UIKit/UIApplication.cs:79 
  at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x0002c] in /Library/Frameworks/Xamarin.iOS.framework/Versions/12.0.0.15/src/Xamarin.iOS/UIKit/UIApplication.cs:63 
  at Dynimetrics.iOS.Ap
plication.Main (System.String[] args) [0x00001] in C:\src\PlantFloorConnect\Dynimetrics\Dynimetrics.UI.iOS\Main.cs:17

4 comments
Carey
Posted on: 29 Oct 2018 22:56
Ugh, I wasted a day on this exact issue - thank you for posting this! It has saved me any more slashing around in the code :)
ADMIN
Yana
Posted on: 23 Oct 2018 06:47
Hi Jeremy,

Indeed, as you found out, .this is caused by a bug in Xamarin.Forms 3.3.  We have reported it to the Xamarin team and they've already worked on a fix.

So, I've updated the status of this item to "Declined".

Regards,
Yana

Jeremy
Posted on: 22 Oct 2018 20:54
Looks like this was a known issue, on the Xamarin side:
https://github.com/xamarin/Xamarin.Forms/issues/4146
Jeremy
Posted on: 22 Oct 2018 19:11
I left out an important detail:
This error occurs with Xamarin.Forms: 3.3.0.912540. It does NOT occur on Xamarin.Forms: 3.2.0.839982. I don't know about 3.2.0871581 - I upgraded from 3.2.0.839982 to 3.3.0.912540 and then this error started occurring. I'm on the latest telerik.ui for Xamarin as of 10/22/2018.