在树视图中的WPF应用程序中崩溃

时间:2012-08-07 15:52:28

标签: c# .net wpf

在我们的应用程序中,我们使用了WPF并实现了TreeView。此应用程序适用于所有计算机,但在一台计算机(Windows 7,而不是所有Windows 7计算机)中崩溃。

当我在TreeView中重命名节点并选择其他节点时,它会崩溃。

请为我提供解决方案,或者我们有什么方法可以找出特定机器中出现此问题的原因。

注意:此m / c不是开发人员m / c。

下面是堆栈跟踪:

  

Void OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs)

     

对象引用未设置为对象的实例。

     

System.NullReferenceException:未将对象引用设置为实例   一个对象。      在   System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs   E)      在   System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs   参数)      在   System.Windows.DependencyObject.InvalidateSubProperty(的DependencyProperty   DP)      在   System.Windows.Freezable.GetChangeHandlersAndInvalidateSubProperties(EventStorage&安培;   calledHandlers)      在   System.Windows.Freezable.GetChangeHandlersAndInvalidateSubProperties(EventStorage&安培;   calledHandlers)      在   System.Windows.Freezable.GetChangeHandlersAndInvalidateSubProperties(EventStorage&安培;   calledHandlers)      在   System.Windows.Freezable.GetChangeHandlersAndInvalidateSubProperties(EventStorage&安培;   calledHandlers)      在System.Windows.Freezable.FireChanged()      在   System.Windows.Freezable.OnPropertyChanged(DependencyPropertyChangedEventArgs   E)      在   System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs   参数)      在System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex   entryIndex,DependencyProperty dp,PropertyMetadata元数据,   EffectiveValueEntry oldEntry,EffectiveValueEntry& newEntry,布尔值   coerceWithDeferredReference,OperationType operationType)      在   System.Windows.DependencyObject.InvalidateProperty(的DependencyProperty   DP)      在System.Windows.Data.BindingExpression.Invalidate(布尔值   isASubPropertyChange)      在System.Windows.Data.BindingExpression.TransferValue(Object   newValue,Boolean isASubPropertyChange)      在System.Windows.Data.BindingExpression.ScheduleTransfer(布尔值   isASubPropertyChange)      在MS.Internal.Data.ClrBindingWorker.NewValueAvailable(布尔值   dependencySourcesChanged,Boolean initialValue,Boolean   isASubPropertyChange)      在MS.Internal.Data.PropertyPathWorker.UpdateSourceValueState(Int32   k,ICollectionView collectionView,Object newValue,Boolean   isASubPropertyChange)      在   MS.Internal.Data.PropertyPathWorker.OnDependencyPropertyChanged(DependencyObject的   d,DependencyProperty dp,Boolean isASubPropertyChange)      在   MS.Internal.Data.ClrBindingWorker.OnSourceInvalidation(DependencyObject的   d,DependencyProperty dp,Boolean isASubPropertyChange)      在   System.Windows.Data.BindingExpression.HandlePropertyInvalidation(DependencyObject的   d,DependencyPropertyChangedEventArgs args)      在   System.Windows.Data.BindingExpression.OnPropertyInvalidation(DependencyObject的   d,DependencyPropertyChangedEventArgs args)      在   System.Windows.DependentList.InvalidateDependents(DependencyObject的   source,DependencyPropertyChangedEventArgs sourceArgs)      在   System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs   参数)      在System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex   entryIndex,DependencyProperty dp,PropertyMetadata元数据,   EffectiveValueEntry oldEntry,EffectiveValueEntry& newEntry,布尔值   coerceWithDeferredReference,OperationType operationType)      在   System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp,   对象值,PropertyMetadata元数据,布尔值   coerceWithDeferredReference,OperationType operationType,Boolean   isInternal)      在System.Windows.DependencyObject.SetValue(DependencyPropertyKey   键,对象值)      在System.Windows.Controls.TreeView.SetSelectedItem(对象数据)      在System.Windows.Controls.TreeView.ChangeSelection(对象数据,   TreeViewItem容器,布尔选中)      在System.Windows.Controls.TreeViewItem.Select(布尔选中)      在   System.Windows.Controls.TreeViewItem.OnIsSelectedChanged(DependencyObject的   d,DependencyPropertyChangedEventArgs e)      在   System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs   E)      在   System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs   E)      在   System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs   参数)      在System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex   entryIndex,DependencyProperty dp,PropertyMetadata元数据,   EffectiveValueEntry oldEntry,EffectiveValueEntry& newEntry,布尔值   coerceWithDeferredReference,OperationType operationType)      在   System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp,   对象值,PropertyMetadata元数据,布尔值   coerceWithDeferredReference,OperationType operationType,Boolean   isInternal)      在System.Windows.DependencyObject.SetValue(DependencyProperty dp,   对象值)      在System.Windows.DependencyObject.SetValue(DependencyProperty dp,   布尔值)      在System.Windows.Controls.TreeViewItem.set_IsSelected(布尔值   值)      在   Lutron.Gulliver.QuantumResi.Common.StretchingTreeViewItem.OnPreviewMouseDown(MouseButtonEventArgs   E)      在System.Windows.UIElement.OnPreviewMouseDownThunk(对象发送者,   MouseButtonEventArgs e)      在   System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(代表   genericHandler,Object genericTarget)      在System.Windows.RoutedEventArgs.InvokeHandler(委托处理程序,   对象目标)      在System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object   target,RoutedEventArgs routedEventArgs)      在System.Windows.EventRoute.InvokeHandlersImpl(对象源,   RoutedEventArgs args,Boolean reRaised)      在System.Windows.UIElement.RaiseEventImpl(DependencyObject sender,   RoutedEventArgs args)      在System.Windows.UIElement.RaiseEvent(RoutedEventArgs args,   布尔可信)      在System.Windows.Input.InputManager.ProcessStagingArea()      在System.Windows.Input.InputManager.ProcessInput(InputEventArgs   输入)      在System.Windows.Input.InputProviderSite.ReportInput(InputReport   inputReport)      在System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr   hwnd,InputMode模式,Int32时间戳,RawMouseActions操作,Int32   x,Int32 y,Int32轮)      在   System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr的   hwnd,Int32 msg,IntPtr wParam,IntPtr lParam,Boolean&处理)      在System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr   hwnd,Int32 msg,IntPtr wParam,IntPtr lParam,Boolean&处理)      在MS.Win32.HwndWrapper.WndProc(IntPtr hwnd,Int32 msg,IntPtr   wParam,IntPtr lParam,Boolean&处理)      在MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)      在   System.Windows.Threading.ExceptionWrapper.InternalRealCall(代表   callback,Object args,Boolean isSingleParameter)      在System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object   source,Delegate callback,Object args,Boolean isSingleParameter,   委托catchHandler)

0 个答案:

没有答案