Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
610
XamDataTree crash (null exception)
posted

Hi,

Were are using XamDataTree for a long time, in the last weeks we're having a problems, mostly with new computers - running Windows 7, dot net 4.6, i7 Intel CPU.

With Infragistics WPF 14.2 - the Exception is:

An unhandled exception of type 'System.NullReferenceException' occurred in InfragisticsWPF4.Controls.Menus.XamDataTree.v14.2.dll

Additional information: Object reference not set to an instance of an object.

InfragisticsWPF4.Controls.Menus.XamDataTree.v14.2.dll!Infragistics

                .Controls.Menus.IntermediateNodesManager.DataCount.get() 

With Infragistics WPF 16.1:

An unhandled exception of type 'System.NullReferenceException' occurred in InfragisticsWPF4.Controls.Menus.XamDataTree.v16.1.dll

Additional information: Object reference not set to an instance of an object.


Copy of Call Stack :

> InfragisticsWPF4.Controls.Menus.XamDataTree.v16.1.dll!Infragistics.Controls.Menus.NodesManager.GetDataItem(int index) Unknown
InfragisticsWPF4.DataManager.v16.1.dll!Infragistics.Collections.BindableItemCollection<Infragistics.Controls.Menus.XamDataTreeNode>.GetItem(int index) Unknown
InfragisticsWPF4.v16.1.dll!Infragistics.Collections.CollectionBaseEnumerator<Infragistics.Controls.Menus.XamDataTreeNode>.System.Collections.IEnumerator.MoveNext() Unknown
InfragisticsWPF4.Controls.Menus.XamDataTree.v16.1.dll!Infragistics.AutomationPeers.XamDataTreeNodeAutomationPeer.GetChildrenCore() Unknown
PresentationCore.dll!System.Windows.Automation.Peers.AutomationPeer.EnsureChildren() Unknown
PresentationCore.dll!System.Windows.Automation.Peers.AutomationPeer.UpdateChildrenInternal(int invalidateLimit) Unknown
InfragisticsWPF4.Controls.Menus.XamDataTree.v16.1.dll!Infragistics.AutomationPeers.XamDataTreeNodeAutomationPeer.Node_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e) Unknown
InfragisticsWPF4.v16.1.dll!Infragistics.DependencyObjectNotifier.OnPropertyChanged(string propertyName) Unknown
InfragisticsWPF4.Controls.Menus.XamDataTree.v16.1.dll!Infragistics.Controls.Menus.XamDataTreeNode.OnElementReleased(Infragistics.Controls.Menus.XamDataTreeNodeControl element) Unknown
InfragisticsWPF4.v16.1.dll!Infragistics.RecyclingManager.PanelInfo.ReleaseElement(Infragistics.ISupportRecycling obj) Unknown
InfragisticsWPF4.Controls.Menus.XamDataTree.v16.1.dll!Infragistics.Controls.Menus.Primitives.NodesPanel.ReleaseNode(Infragistics.Controls.Menus.XamDataTreeNode node, bool removeManager) Unknown
InfragisticsWPF4.Controls.Menus.XamDataTree.v16.1.dll!Infragistics.Controls.Menus.Primitives.NodesPanel.MeasureOverride(System.Windows.Size availableSize) Unknown
Please help me with this problem, it seems that this is a null reference in your code,
Thanks!
Parents
No Data
Reply
  • 16495
    Offline posted

    Hello,

    I followed the steps you suggested and was unable to reproduce the exception you're describing. I have attached the sample project I used to test this.  Please test this project on your PC.  Whether or not it works correctly may help indicate the nature of this problem. If the project does not work correctly, this indicates either a problem possibly specific to your environment, or a difference in the DLL versions we are using.  My test was performed using version 16.1 – 1000 and 16.1 – 2134 of our WPF product with .Net 4.6.

    If the project does show the product feature working correctly, this indicates a possible problem in the code of your application.  It will help if you can provide a small, isolated sample application that demonstrates the behavior you are seeing. Or, if this sample project is not an accurate demonstration of what you're trying to do, please feel free to modify it and send it back, or send a small sample project of your own if you have one.

    Please let me know if I can provide any further assistance.

    Sincerely,
    Zhivko
    Entry Level Software Developer

    treeSampleExeption.zip
Children
  • 390
    Offline posted in reply to [Infragistics]Zhivko Nikolov

    Hello Zhivko,

    In old version of Infragistic our tool is working fine.
    But after inundation Infragistics version 16.2.20162.1006 exception is coming from XamDataTree.

    We also update our PC Window 10.

    Log.txt
    System.NullReferenceException
      HResult=0x80004003
      Message=Object reference not set to an instance of an object.
      Source=InfragisticsWPF.Controls.Menus.XamDataTree
      StackTrace:
       at Infragistics.Controls.Menus.Primitives.NodeLineControl.NodeChanged(DependencyObject obj, DependencyPropertyChangedEventArgs e)
       at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
       at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
       at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
       at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
       at System.Windows.DependencyObject.InvalidateProperty(DependencyProperty dp, Boolean preserveCurrentValue)
       at System.Windows.Data.BindingExpressionBase.Invalidate(Boolean isASubPropertyChange)
       at System.Windows.Data.BindingExpression.TransferValue(Object newValue, Boolean isASubPropertyChange)
       at System.Windows.Data.BindingExpression.Activate(Object item)
       at System.Windows.Data.BindingExpression.OnDataContextChanged(DependencyObject contextElement)
       at System.Windows.Data.BindingExpression.HandlePropertyInvalidation(DependencyObject d, DependencyPropertyChangedEventArgs args)
       at System.Windows.Data.BindingExpressionBase.OnPropertyInvalidation(DependencyObject d, DependencyPropertyChangedEventArgs args)
       at System.Windows.Data.BindingExpression.OnPropertyInvalidation(DependencyObject d, DependencyPropertyChangedEventArgs args)
       at System.Windows.DependentList.InvalidateDependents(DependencyObject source, DependencyPropertyChangedEventArgs sourceArgs)
       at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
       at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
       at System.Windows.TreeWalkHelper.OnInheritablePropertyChanged(DependencyObject d, InheritablePropertyChangeInfo info, Boolean visitedViaVisualTree)
       at System.Windows.DescendentsWalker`1._VisitNode(DependencyObject d, Boolean visitedViaVisualTree)
       at System.Windows.DescendentsWalker`1.WalkLogicalChildren(FrameworkElement feParent, FrameworkContentElement fceParent, IEnumerator logicalChildren)
       at System.Windows.DescendentsWalker`1.WalkFrameworkElementLogicalThenVisualChildren(FrameworkElement feParent, Boolean hasLogicalChildren)
       at System.Windows.DescendentsWalker`1.IterateChildren(DependencyObject d)
       at System.Windows.DescendentsWalker`1._VisitNode(DependencyObject d, Boolean visitedViaVisualTree)
       at System.Windows.DescendentsWalker`1.WalkLogicalChildren(FrameworkElement feParent, FrameworkContentElement fceParent, IEnumerator logicalChildren)
       at System.Windows.DescendentsWalker`1.WalkFrameworkElementLogicalThenVisualChildren(FrameworkElement feParent, Boolean hasLogicalChildren)
       at System.Windows.DescendentsWalker`1.IterateChildren(DependencyObject d)
       at System.Windows.DescendentsWalker`1._VisitNode(DependencyObject d, Boolean visitedViaVisualTree)
       at System.Windows.DescendentsWalker`1.WalkFrameworkElementLogicalThenVisualChildren(FrameworkElement feParent, Boolean hasLogicalChildren)
       at System.Windows.DescendentsWalker`1.IterateChildren(DependencyObject d)
       at System.Windows.DescendentsWalker`1.StartWalk(DependencyObject startNode, Boolean skipStartNode)
       at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
       at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
       at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
       at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
       at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
       at Infragistics.Controls.Menus.XamDataTreeNodeControl.OnAttached(XamDataTreeNode node)
       at Infragistics.Controls.Menus.XamDataTreeNode.OnElementAttached(XamDataTreeNodeControl element)
       at Infragistics.RecyclingManager.PanelInfo.AttachElement(ISupportRecycling obj)
       at Infragistics.Controls.Menus.Primitives.NodesPanel.RenderNode(XamDataTreeNode node, Double availableWidth)
       at Infragistics.Controls.Menus.Primitives.NodesPanel.MeasureOverride(Size availableSize)
       at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
       at System.Windows.UIElement.Measure(Size availableSize)
       at System.Windows.ContextLayoutManager.UpdateLayout()
       at Infragistics.Windows.DataPresenter.DataPresenterBase.BringRecordIntoView(Record record)
       at Infragistics.Windows.DataPresenter.DataPresenterBase.OnActiveRecordChange(Record newActiveRecord, Boolean scrollIntoView)
       at Infragistics.Windows.DataPresenter.DataPresenterBase.SetActiveRecord(Record record, Boolean scrollIntoView)
       at Infragistics.Windows.DataPresenter.DataPresenterBase.OnCoerceActiveRecord(DependencyObject target, Object value)
       at System.Windows.DependencyObject.ProcessCoerceValue(DependencyProperty dp, PropertyMetadata metadata, EntryIndex& entryIndex, Int32& targetIndex, EffectiveValueEntry& newEntry, EffectiveValueEntry& oldEntry, Object& oldValue, Object baseValue, Object controlValue, CoerceValueCallback coerceValueCallback, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, Boolean skipBaseValueChecks)
       at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
       at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
       at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
       at Infragistics.Windows.DataPresenter.RecordManager.SetActiveRecordFromCurrentItemHelper(DataRecord& dr)
       at Infragistics.Windows.DataPresenter.RecordManager.SetActiveRecordFromCurrentItem(Boolean calledFromCurrentItemChanged)
       at Infragistics.Windows.DataPresenter.RecordManager.OnSourceCollectionReset()
       at Infragistics.Windows.DataPresenter.RecordManager.SetDataSource(IEnumerable currentValue, Boolean postReset)
       at Infragistics.Windows.DataPresenter.RecordManager.set_DataSource(IEnumerable value)
       at Infragistics.Windows.DataPresenter.DataPresenterBase.VerifyRecordManagerDataSource()
       at Infragistics.Windows.DataPresenter.DataPresenterBase.InitializeRecordManagerDataSource()
       at Infragistics.Windows.DataPresenter.DataPresenterBase.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
       at Infragistics.Windows.DataPresenter.XamDataGrid.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
       at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
       at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
       at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
       at System.Windows.DependencyObject.SetValue(DependencyPropertyKey key, Object value)
       at Infragistics.Windows.DataPresenter.DataPresenterBase.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
       at Infragistics.Windows.DataPresenter.XamDataGrid.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
       at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
       at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
       at System.Windows.DependencyObject.InvalidateProperty(DependencyProperty dp, Boolean preserveCurrentValue)
       at System.Windows.Data.BindingExpressionBase.Invalidate(Boolean isASubPropertyChange)
       at System.Windows.Data.BindingExpression.TransferValue(Object newValue, Boolean isASubPropertyChange)
       at MS.Internal.Data.ClrBindingWorker.NewValueAvailable(Boolean dependencySourcesChanged, Boolean initialValue, Boolean isASubPropertyChange)
       at MS.Internal.Data.PropertyPathWorker.UpdateSourceValueState(Int32 k, ICollectionView collectionView, Object newValue, Boolean isASubPropertyChange)
       at MS.Internal.Data.ClrBindingWorker.OnSourcePropertyChanged(Object o, String propName)
       at System.Windows.WeakEventManager.ListenerList`1.DeliverEvent(Object sender, EventArgs e, Type managerType)
       at System.ComponentModel.PropertyChangedEventManager.OnPropertyChanged(Object sender, PropertyChangedEventArgs args)
       at System.ComponentModel.PropertyChangedEventHandler.Invoke(Object sender, PropertyChangedEventArgs e)
       at CANDB.OverViewContentControlVM.OnPropertyChanged(PropertyChangedEventArgs e) in D:\Master_R4\OneParam_V10\Subsystems\PumaParam\Application\IoSubSystems\CANDBEditor\CANDBEditor\View\OverViewContentControlVM.cs:line 575
       at CANDB.OverViewContentControlVM.set_MessageLayoutView(ICollectionView value) in D:\Master_R4\OneParam_V10\Subsystems\PumaParam\Application\IoSubSystems\CANDBEditor\CANDBEditor\View\OverViewContentControlVM.cs:line 1730
       at CANDB.OverViewContentControlVM.GenerateMessageLayout(String messageName, String signame, ICollectionView singnallist) in D:\Master_R4\OneParam_V10\Subsystems\PumaParam\Application\IoSubSystems\CANDBEditor\CANDBEditor\View\OverViewContentControlVM.cs:line 1782
       at CANDB.CANSignalVM.set_Message(CANMessageVM value) in D:\Master_R4\OneParam_V10\Subsystems\PumaParam\Application\IoSubSystems\CANDBEditor\CANDBEditor\CANSignalVM.cs:line 178
    

    Here i try to reproduce issue by using sample but not able to reproduce.
    Here i have attached log file for exception.
    Please give me feedback according to log file Or if you have any suggestion please give me.

    With Best Regards

    Nadeem