Hello,
I have a tree list view that contains a set of hierarchical data. I have set up a filter to recreate the observable collection to filter out certain items from the tree. The initial load works fine and the data is presented. I can recreate the filter just fine. As soon as the property changed event fires, I get a null reference exception from the tree list view. I've tried replacing the data source collection with a new collection and I've tried just removing and adding filtered items back to the collection. Both result in the exception below.
I Don't have a null item in my dataset - though there are some NULLs in the data itself which is fine when the tree is first loaded.
00000e42 mov dword ptr [ebp+FFFFF734h],eax
System.NullReferenceException was unhandled
Message=Object reference not set to an instance of an object.
Source=Telerik.Windows.Controls.GridView
StackTrace:
at Telerik.Windows.Controls.TreeListView.TreeListViewRow.UpdateIsExpandable() in c:\TB\105\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\TreeListView\TreeListViewRow.cs:line 307
at Telerik.Windows.Controls.TreeListView.TreeListViewRow.OnItemsChanged(Object sender, NotifyCollectionChangedEventArgs e) in c:\TB\105\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\TreeListView\TreeListViewRow.cs:line 301
at Telerik.Windows.Controls.TreeListView.TreeListViewRow.OnItemsCollectionChanged(HierarchicalChildCollectionView oldValue, HierarchicalChildCollectionView newValue) in c:\TB\105\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\TreeListView\TreeListViewRow.cs:line 240
at Telerik.Windows.Controls.TreeListView.TreeListViewRow.set_Items(HierarchicalChildCollectionView value) in c:\TB\105\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\TreeListView\TreeListViewRow.cs:line 220
at Telerik.Windows.Controls.RadTreeListView.InitializeHierarchyProperties(GridViewRowItem gridViewRow, Object item) in c:\TB\105\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\TreeListView\RadTreeListView.cs:line 260
at Telerik.Windows.Controls.GridView.GridViewDataControl.PrepareContainerForItemOverride(DependencyObject element, Object item) in c:\TB\105\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\GridViewDataControl.cs:line 7600
at Telerik.Windows.Controls.RadTreeListView.PrepareContainerForItemOverride(DependencyObject element, Object item) in c:\TB\105\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\TreeListView\RadTreeListView.cs:line 248
at Telerik.Windows.Controls.GridView.BaseItemsControl.Telerik.Windows.Controls.GridView.IGeneratorHost.PrepareItemContainer(DependencyObject container, Object item) in c:\TB\105\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\ItemsControl\BaseItemsControl.cs:line 336
at Telerik.Windows.Controls.GridView.GridViewItemContainerGenerator.System.Windows.Controls.Primitives.IItemContainerGenerator.PrepareItemContainer(DependencyObject container) in c:\TB\105\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\ItemsControl\GridViewItemContainerGenerator.cs:line 237
at Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.InsertContainer(Int32 childIndex, UIElement container, Boolean isRecycled) in c:\TB\105\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Virtualization\GridViewVirtualizingPanel.cs:line 2312
at Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.InsertNewContainer(Int32 childIndex, UIElement container) in c:\TB\105\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Virtualization\GridViewVirtualizingPanel.cs:line 2206
at Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.AddContainerFromGenerator(Int32 childIndex, UIElement child, Boolean newlyRealized) in c:\TB\105\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Virtualization\GridViewVirtualizingPanel.cs:line 2366
at Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.GenerateNextChild(IItemContainerGenerator generator, Int32 childIndex) in c:\TB\105\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Virtualization\GridViewVirtualizingPanel.cs:line 1530
at Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.MeasureOverride(Size constraint) in c:\TB\105\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Virtualization\GridViewVirtualizingPanel.cs:line 1228
at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
at System.Windows.UIElement.Measure(Size availableSize)
at System.Windows.ContextLayoutManager.UpdateLayout()
at System.Windows.UIElement.UpdateLayout()
at System.Windows.Controls.TabItem.OnPreviewGotKeyboardFocus(KeyboardFocusChangedEventArgs e)
at System.Windows.UIElement.OnPreviewGotKeyboardFocusThunk(Object sender, KeyboardFocusChangedEventArgs e)
at System.Windows.Input.KeyboardFocusChangedEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
at System.Windows.Input.InputManager.ProcessStagingArea()
at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
at System.Windows.Input.KeyboardDevice.TryChangeFocus(DependencyObject newFocus, IKeyboardInputProvider keyboardInputProvider, Boolean askOld, Boolean askNew, Boolean forceToNullIfFailed)
at System.Windows.Input.KeyboardDevice.Focus(DependencyObject focus, Boolean askOld, Boolean askNew, Boolean forceToNullIfFailed)
at System.Windows.Input.KeyboardDevice.Focus(IInputElement element)
at System.Windows.UIElement.Focus()
at System.Windows.Controls.TabItem.SetFocus()
at System.Windows.Controls.TabItem.OnMouseLeftButtonDown(MouseButtonEventArgs e)
at System.Windows.UIElement.OnMouseLeftButtonDownThunk(Object sender, MouseButtonEventArgs e)
at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
at System.Windows.UIElement.OnMouseDownThunk(Object sender, MouseButtonEventArgs e)
at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
at System.Windows.Input.InputManager.ProcessStagingArea()
at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
at System.Windows.Application.RunDispatcher(Object ignore)
at System.Windows.Application.RunInternal(Window window)
at System.Windows.Application.Run(Window window)
at System.Windows.Application.Run()
at APPLICATION.App.Main() in APPLICATION_PATH\App.g.cs:line 0
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:
I have a tree list view that contains a set of hierarchical data. I have set up a filter to recreate the observable collection to filter out certain items from the tree. The initial load works fine and the data is presented. I can recreate the filter just fine. As soon as the property changed event fires, I get a null reference exception from the tree list view. I've tried replacing the data source collection with a new collection and I've tried just removing and adding filtered items back to the collection. Both result in the exception below.
I Don't have a null item in my dataset - though there are some NULLs in the data itself which is fine when the tree is first loaded.
00000e42 mov dword ptr [ebp+FFFFF734h],eax
System.NullReferenceException was unhandled
Message=Object reference not set to an instance of an object.
Source=Telerik.Windows.Controls.GridView
StackTrace:
at Telerik.Windows.Controls.TreeListView.TreeListViewRow.UpdateIsExpandable() in c:\TB\105\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\TreeListView\TreeListViewRow.cs:line 307
at Telerik.Windows.Controls.TreeListView.TreeListViewRow.OnItemsChanged(Object sender, NotifyCollectionChangedEventArgs e) in c:\TB\105\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\TreeListView\TreeListViewRow.cs:line 301
at Telerik.Windows.Controls.TreeListView.TreeListViewRow.OnItemsCollectionChanged(HierarchicalChildCollectionView oldValue, HierarchicalChildCollectionView newValue) in c:\TB\105\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\TreeListView\TreeListViewRow.cs:line 240
at Telerik.Windows.Controls.TreeListView.TreeListViewRow.set_Items(HierarchicalChildCollectionView value) in c:\TB\105\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\TreeListView\TreeListViewRow.cs:line 220
at Telerik.Windows.Controls.RadTreeListView.InitializeHierarchyProperties(GridViewRowItem gridViewRow, Object item) in c:\TB\105\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\TreeListView\RadTreeListView.cs:line 260
at Telerik.Windows.Controls.GridView.GridViewDataControl.PrepareContainerForItemOverride(DependencyObject element, Object item) in c:\TB\105\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\GridViewDataControl.cs:line 7600
at Telerik.Windows.Controls.RadTreeListView.PrepareContainerForItemOverride(DependencyObject element, Object item) in c:\TB\105\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\TreeListView\RadTreeListView.cs:line 248
at Telerik.Windows.Controls.GridView.BaseItemsControl.Telerik.Windows.Controls.GridView.IGeneratorHost.PrepareItemContainer(DependencyObject container, Object item) in c:\TB\105\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\ItemsControl\BaseItemsControl.cs:line 336
at Telerik.Windows.Controls.GridView.GridViewItemContainerGenerator.System.Windows.Controls.Primitives.IItemContainerGenerator.PrepareItemContainer(DependencyObject container) in c:\TB\105\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\ItemsControl\GridViewItemContainerGenerator.cs:line 237
at Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.InsertContainer(Int32 childIndex, UIElement container, Boolean isRecycled) in c:\TB\105\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Virtualization\GridViewVirtualizingPanel.cs:line 2312
at Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.InsertNewContainer(Int32 childIndex, UIElement container) in c:\TB\105\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Virtualization\GridViewVirtualizingPanel.cs:line 2206
at Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.AddContainerFromGenerator(Int32 childIndex, UIElement child, Boolean newlyRealized) in c:\TB\105\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Virtualization\GridViewVirtualizingPanel.cs:line 2366
at Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.GenerateNextChild(IItemContainerGenerator generator, Int32 childIndex) in c:\TB\105\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Virtualization\GridViewVirtualizingPanel.cs:line 1530
at Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.MeasureOverride(Size constraint) in c:\TB\105\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Virtualization\GridViewVirtualizingPanel.cs:line 1228
at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
at System.Windows.UIElement.Measure(Size availableSize)
at System.Windows.ContextLayoutManager.UpdateLayout()
at System.Windows.UIElement.UpdateLayout()
at System.Windows.Controls.TabItem.OnPreviewGotKeyboardFocus(KeyboardFocusChangedEventArgs e)
at System.Windows.UIElement.OnPreviewGotKeyboardFocusThunk(Object sender, KeyboardFocusChangedEventArgs e)
at System.Windows.Input.KeyboardFocusChangedEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
at System.Windows.Input.InputManager.ProcessStagingArea()
at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
at System.Windows.Input.KeyboardDevice.TryChangeFocus(DependencyObject newFocus, IKeyboardInputProvider keyboardInputProvider, Boolean askOld, Boolean askNew, Boolean forceToNullIfFailed)
at System.Windows.Input.KeyboardDevice.Focus(DependencyObject focus, Boolean askOld, Boolean askNew, Boolean forceToNullIfFailed)
at System.Windows.Input.KeyboardDevice.Focus(IInputElement element)
at System.Windows.UIElement.Focus()
at System.Windows.Controls.TabItem.SetFocus()
at System.Windows.Controls.TabItem.OnMouseLeftButtonDown(MouseButtonEventArgs e)
at System.Windows.UIElement.OnMouseLeftButtonDownThunk(Object sender, MouseButtonEventArgs e)
at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
at System.Windows.UIElement.OnMouseDownThunk(Object sender, MouseButtonEventArgs e)
at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
at System.Windows.Input.InputManager.ProcessStagingArea()
at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
at System.Windows.Application.RunDispatcher(Object ignore)
at System.Windows.Application.RunInternal(Window window)
at System.Windows.Application.Run(Window window)
at System.Windows.Application.Run()
at APPLICATION.App.Main() in APPLICATION_PATH\App.g.cs:line 0
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException: