Hi There,
I have a data bound SfTreeView on a screen, when it's navigated to the first time it works. When I navigate away and then back to the SfTreeView screen (with different or same bound data) the app crashes.
I have found that setting the
NotificationSubscriptionMode property to "None" stops the crash but no data is displayed the first time the SfTreeView is navigated to but, subsequent navigations work fine. The original value of the property that produces the crash is "
CollectionChange
".
Here is the crash report:
System.NullReferenceException: 'Object reference not set to an instance of an object.'
No compatible code running
0xFFFFFFFFFFFFFFFF in System.Diagnostics.Debugger.Mono_UnhandledException_internal C#
0x1 in System.Diagnostics.Debugger.Mono_UnhandledException C#
0x2C in Android.Runtime.DynamicMethodNameCounter.35 C#
0x5C in Syncfusion.TreeView.Engine.TreeNodesTraversalHelper.GetPrevious C#
0x60 in Syncfusion.TreeView.Engine.TopLevelNode.GetNodeAt C#
0x2 in Syncfusion.TreeView.Engine.TopLevelNode.get_Item C#
0x12D in Syncfusion.Android.TreeView.LinearLayout.EnsureItems C#
0x1C in Syncfusion.Android.TreeView.TreeNodesContainerBase.EnsureItems C#
0xAC in Syncfusion.Android.TreeView.TreeNodeContainer.OnMeasureTreeNodeContainer C#
0x5 in Syncfusion.Android.TreeView.TreeNodeContainer.OnMeasure C#
0xC in Android.Views.View.n_OnMeasure_II C#
0x1D in Android.Runtime.DynamicMethodNameCounter.35 C#
0xFFFFFFFFFFFFFFFF in Java.Interop.NativeMethods.java_interop_jnienv_call_nonvirtual_void_method_a C#
0x74 in Java.Interop.JniEnvironment.InstanceMethods.CallNonvirtualVoidMethod C#
0x21 in Java.Interop.JniPeerMembers.JniInstanceMethods.InvokeNonvirtualVoidMethod C#
0x3C in Android.Views.View.Measure C#
0x41 in Syncfusion.Android.TreeView.ExtendedScrollView.MeasureChildWithMargins C#
0x1A in Android.Views.ViewGroup.n_MeasureChildWithMargins_Landroid_view_View_IIII C#
0x2F in Android.Runtime.DynamicMethodNameCounter.111 C#
0xFFFFFFFFFFFFFFFF in Java.Interop.NativeMethods.java_interop_jnienv_call_nonvirtual_void_method_a C#
0x74 in Java.Interop.JniEnvironment.InstanceMethods.CallNonvirtualVoidMethod C#
0x5F in Java.Interop.JniPeerMembers.JniInstanceMethods.InvokeVirtualVoidMethod C#
0x3C in Android.Views.View.OnMeasure C#
0x3C in Syncfusion.Android.TreeView.ExtendedScrollView.OnMeasure C#
0xC in Android.Views.View.n_OnMeasure_II C#
0x1D in Android.Runtime.DynamicMethodNameCounter.35 C#
0xFFFFFFFFFFFFFFFF in Java.Interop.NativeMethods.java_interop_jnienv_call_nonvirtual_void_method_a C#
0x74 in Java.Interop.JniEnvironment.InstanceMethods.CallNonvirtualVoidMethod C#
0x5F in Java.Interop.JniPeerMembers.JniInstanceMethods.InvokeVirtualVoidMethod C#
0x3C in Android.Views.View.OnMeasure C#
0x19 in Syncfusion.Android.TreeView.SfTreeView.OnMeasure C#
0xC in Android.Views.View.n_OnMeasure_II C#
0x1D in Android.Runtime.DynamicMethodNameCounter.35 C#
0xFFFFFFFFFFFFFFFF in Java.Interop.NativeMethods.java_interop_jnienv_call_nonvirtual_void_method_a C#
0x74 in Java.Interop.JniEnvironment.InstanceMethods.CallNonvirtualVoidMethod C#
0x21 in Java.Interop.JniPeerMembers.JniInstanceMethods.InvokeNonvirtualVoidMethod C#
0x3C in Android.Views.View.Measure C#
0x54 in Xamarin.Forms.Platform.Android.ViewRenderer.OnLayout at D:\a\1\s\Xamarin.Forms.Platform.Android\ViewRenderer.cs:206,4 C#
0x11 in Syncfusion.XForms.Android.TreeView.TreeViewRenderer.OnLayout C#
0x10 in Xamarin.Forms.Platform.Android.FormsViewGroup.n_OnLayout_ZIIII at D:\a\1\s\Xamarin.Forms.Platform.Android.FormsViewGroup\obj\Release\generated\src\Xamarin.Forms.Platform.Android.FormsViewGroup.cs:198,4 C#
0x2F in Android.Runtime.DynamicMethodNameCounter.31 C#
0xFFFFFFFFFFFFFFFF in Java.Interop.NativeMethods.java_interop_jnienv_call_nonvirtual_void_method_a C#
0x74 in Java.Interop.JniEnvironment.InstanceMethods.CallNonvirtualVoidMethod C#
0x5F in Java.Interop.JniPeerMembers.JniInstanceMethods.InvokeVirtualVoidMethod C#
0x97 in Xamarin.Forms.Platform.Android.FormsViewGroup.MeasureAndLayout at D:\a\1\s\Xamarin.Forms.Platform.Android.FormsViewGroup\obj\Release\generated\src\Xamarin.Forms.Platform.Android.FormsViewGroup.cs:181,5 C#
0x171 in Xamarin.Forms.Platform.Android.VisualElementTracker.UpdateLayout at D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementTracker.cs:102,5 C#
0x1E in Xamarin.Forms.Platform.Android.VisualElementRenderer.UpdateLayout at D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:135,4 C#
0x35 in Xamarin.Forms.Platform.Android.FastRenderers.FrameRenderer.OnLayout at D:\a\1\s\Xamarin.Forms.Platform.Android\FastRenderers\FrameRenderer.cs:209,5 C#
0x12 in Android.Widget.FrameLayout.n_OnLayout_ZIIII C#
0x2F in Android.Runtime.DynamicMethodNameCounter.38 C#
0xFFFFFFFFFFFFFFFF in Java.Interop.NativeMethods.java_interop_jnienv_call_nonvirtual_void_method_a C#
0x74 in Java.Interop.JniEnvironment.InstanceMethods.CallNonvirtualVoidMethod C#
0x21 in Java.Interop.JniPeerMembers.JniInstanceMethods.InvokeNonvirtualVoidMethod C#
0x69 in Android.Views.ViewGroup.Layout C#
0x118 in Xamarin.Forms.Platform.Android.VisualElementTracker.UpdateLayout at D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementTracker.cs:96,5 C#
0xB in Xamarin.Forms.Platform.Android.FastRenderers.FrameRenderer.Xamarin.Forms.Platform.Android.IVisualElementRenderer.UpdateLayout at D:\a\1\s\Xamarin.Forms.Platform.Android\FastRenderers\FrameRenderer.cs:100,4 C#
0x3A in Xamarin.Forms.Platform.Android.VisualElementRenderer.UpdateLayout at D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:391,5 C#
0x1E in Xamarin.Forms.Platform.Android.VisualElementRenderer.OnLayout at D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:376,4 C#
0x10 in Xamarin.Forms.Platform.Android.FormsViewGroup.n_OnLayout_ZIIII at D:\a\1\s\Xamarin.Forms.Platform.Android.FormsViewGroup\obj\Release\generated\src\Xamarin.Forms.Platform.Android.FormsViewGroup.cs:198,4 C#
0x2F in Android.Runtime.DynamicMethodNameCounter.31 C#
0xFFFFFFFFFFFFFFFF in Java.Interop.NativeMethods.java_interop_jnienv_call_nonvirtual_void_method_a C#
0x74 in Java.Interop.JniEnvironment.InstanceMethods.CallNonvirtualVoidMethod C#
0x5F in Java.Interop.JniPeerMembers.JniInstanceMethods.InvokeVirtualVoidMethod C#
0x97 in Xamarin.Forms.Platform.Android.FormsViewGroup.MeasureAndLayout at D:\a\1\s\Xamarin.Forms.Platform.Android.FormsViewGroup\obj\Release\generated\src\Xamarin.Forms.Platform.Android.FormsViewGroup.cs:181,5 C#
0x171 in Xamarin.Forms.Platform.Android.VisualElementTracker.UpdateLayout at D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementTracker.cs:102,5 C#
0x1E in Xamarin.Forms.Platform.Android.VisualElementRenderer.UpdateLayout at D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:135,4 C#
0x3A in Xamarin.Forms.Platform.Android.VisualElementRenderer.UpdateLayout at D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:391,5 C#
0x1E in Xamarin.Forms.Platform.Android.VisualElementRenderer.OnLayout at D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:376,4 C#
0x10 in Xamarin.Forms.Platform.Android.FormsViewGroup.n_OnLayout_ZIIII at D:\a\1\s\Xamarin.Forms.Platform.Android.FormsViewGroup\obj\Release\generated\src\Xamarin.Forms.Platform.Android.FormsViewGroup.cs:198,4 C#
0x2F in Android.Runtime.DynamicMethodNameCounter.31 C#
0xFFFFFFFFFFFFFFFF in Java.Interop.NativeMethods.java_interop_jnienv_call_nonvirtual_void_method_a C#
0x74 in Java.Interop.JniEnvironment.InstanceMethods.CallNonvirtualVoidMethod C#
0x5F in Java.Interop.JniPeerMembers.JniInstanceMethods.InvokeVirtualVoidMethod C#
0x97 in Xamarin.Forms.Platform.Android.FormsViewGroup.MeasureAndLayout at D:\a\1\s\Xamarin.Forms.Platform.Android.FormsViewGroup\obj\Release\generated\src\Xamarin.Forms.Platform.Android.FormsViewGroup.cs:181,5 C#
0x171 in Xamarin.Forms.Platform.Android.VisualElementTracker.UpdateLayout at D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementTracker.cs:102,5 C#
0x1E in Xamarin.Forms.Platform.Android.VisualElementRenderer.UpdateLayout at D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:135,4 C#
0x3A in Xamarin.Forms.Platform.Android.VisualElementRenderer.UpdateLayout at D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:391,5 C#
0x1E in Xamarin.Forms.Platform.Android.VisualElementRenderer.OnLayout at D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:376,4 C#
0x8 in Xamarin.Forms.Platform.Android.PageRenderer.OnLayout at D:\a\1\s\Xamarin.Forms.Platform.Android\Renderers\PageRenderer.cs:217,4 C#
0x10 in Xamarin.Forms.Platform.Android.FormsViewGroup.n_OnLayout_ZIIII at D:\a\1\s\Xamarin.Forms.Platform.Android.FormsViewGroup\obj\Release\generated\src\Xamarin.Forms.Platform.Android.FormsViewGroup.cs:198,4 C#
0x2F in Android.Runtime.DynamicMethodNameCounter.31 C#
0xFFFFFFFFFFFFFFFF in Java.Interop.NativeMethods.java_interop_jnienv_call_nonvirtual_void_method_a C#
0x74 in Java.Interop.JniEnvironment.InstanceMethods.CallNonvirtualVoidMethod C#
0x5F in Java.Interop.JniPeerMembers.JniInstanceMethods.InvokeVirtualVoidMethod C#
0x97 in Xamarin.Forms.Platform.Android.FormsViewGroup.MeasureAndLayout at D:\a\1\s\Xamarin.Forms.Platform.Android.FormsViewGroup\obj\Release\generated\src\Xamarin.Forms.Platform.Android.FormsViewGroup.cs:181,5 C#
0x171 in Xamarin.Forms.Platform.Android.VisualElementTracker.UpdateLayout at D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementTracker.cs:102,5 C#
0x1E in Xamarin.Forms.Platform.Android.VisualElementRenderer.UpdateLayout at D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:135,4 C#
0x3A in Xamarin.Forms.Platform.Android.VisualElementRenderer.UpdateLayout at D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:391,5 C#
0x1E in Xamarin.Forms.Platform.Android.VisualElementRenderer.OnLayout at D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:376,4 C#
0x15 in Xamarin.Forms.Platform.Android.AppCompat.NavigationPageRenderer.OnLayout at D:\a\1\s\Xamarin.Forms.Platform.Android\AppCompat\NavigationPageRenderer.cs:390,4 C#
0x10 in Xamarin.Forms.Platform.Android.FormsViewGroup.n_OnLayout_ZIIII at D:\a\1\s\Xamarin.Forms.Platform.Android.FormsViewGroup\obj\Release\generated\src\Xamarin.Forms.Platform.Android.FormsViewGroup.cs:198,4 C#
0x2F in Android.Runtime.DynamicMethodNameCounter.31 C#
0xFFFFFFFFFFFFFFFF in Java.Interop.NativeMethods.java_interop_jnienv_call_nonvirtual_void_method_a C#
0x74 in Java.Interop.JniEnvironment.InstanceMethods.CallNonvirtualVoidMethod C#
0x5F in Java.Interop.JniPeerMembers.JniInstanceMethods.InvokeVirtualVoidMethod C#
0x97 in Xamarin.Forms.Platform.Android.FormsViewGroup.MeasureAndLayout at D:\a\1\s\Xamarin.Forms.Platform.Android.FormsViewGroup\obj\Release\generated\src\Xamarin.Forms.Platform.Android.FormsViewGroup.cs:181,5 C#
0x171 in Xamarin.Forms.Platform.Android.VisualElementTracker.UpdateLayout at D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementTracker.cs:102,5 C#
0x1E in Xamarin.Forms.Platform.Android.VisualElementRenderer.UpdateLayout at D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementRenderer.cs:135,4 C#
0x4E in Xamarin.Forms.Platform.Android.MasterDetailContainer.OnLayout at D:\a\1\s\Xamarin.Forms.Platform.Android\Renderers\MasterDetailContainer.cs:108,4 C#
0x8 in Xamarin.Forms.Platform.Android.AppCompat.MasterDetailContainer.OnLayout at D:\a\1\s\Xamarin.Forms.Platform.Android\AppCompat\MasterDetailContainer.cs:33,4 C#
0x12 in Android.Views.ViewGroup.n_OnLayout_ZIIII C#
0x2F in Android.Runtime.DynamicMethodNameCounter.34 C#
0xFFFFFFFFFFFFFFFF in Java.Interop.NativeMethods.java_interop_jnienv_call_nonvirtual_void_method_a C#
0x74 in Java.Interop.JniEnvironment.InstanceMethods.CallNonvirtualVoidMethod C#
0x5F in Java.Interop.JniPeerMembers.JniInstanceMethods.InvokeVirtualVoidMethod C#
0x80 in Android.Support.V4.Widget.DrawerLayout.OnLayout C#
0x8 in Xamarin.Forms.Platform.Android.AppCompat.MasterDetailPageRenderer.OnLayout at D:\a\1\s\Xamarin.Forms.Platform.Android\AppCompat\MasterDetailPageRenderer.cs:282,4 C#
0x10 in Android.Support.V4.Widget.DrawerLayout.n_OnLayout_ZIIII C#
0x2F in Android.Runtime.DynamicMethodNameCounter.46 C#
0xFFFFFFFFFFFFFFFF in Java.Interop.NativeMethods.java_interop_jnienv_call_nonvirtual_void_method_a C#
0x74 in Java.Interop.JniEnvironment.InstanceMethods.CallNonvirtualVoidMethod C#
0x21 in Java.Interop.JniPeerMembers.JniInstanceMethods.InvokeNonvirtualVoidMethod C#
0x69 in Android.Views.ViewGroup.Layout C#
0x118 in Xamarin.Forms.Platform.Android.VisualElementTracker.UpdateLayout at D:\a\1\s\Xamarin.Forms.Platform.Android\VisualElementTracker.cs:96,5 C#
0xB in Xamarin.Forms.Platform.Android.AppCompat.MasterDetailPageRenderer.Xamarin.Forms.Platform.Android.IVisualElementRenderer.UpdateLayout at D:\a\1\s\Xamarin.Forms.Platform.Android\AppCompat\MasterDetailPageRenderer.cs:195,4 C#
0x2B in Xamarin.Forms.Platform.Android.AppCompat.Platform.Xamarin.Forms.Platform.Android.IPlatformLayout.OnLayout at D:\a\1\s\Xamarin.Forms.Platform.Android\AppCompat\Platform.cs:232,4 C#
0x2E in Xamarin.Forms.Platform.Android.PlatformRenderer.OnLayout at D:\a\1\s\Xamarin.Forms.Platform.Android\PlatformRenderer.cs:75,4 C#
0x12 in Android.Views.ViewGroup.n_OnLayout_ZIIII C#
0x2F in Android.Runtime.DynamicMethodNameCounter.34 C#