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
4165
Error when unchecking a node.
posted

Hi,

I have a tree with two nodes. One node and then a child node

Node Parent

     Node Child

The child is using the checkbox style. The parent is not.

When I uncheck the node, when the after_check event is finished: (version 13.2.20132.2023)

ystem.NullReferenceException: Object reference not set to an instance of an object.
   at Infragistics.Win.UltraWinTree.UltraTreeNode.NodeUiaProviderStub.GetParent()
   at Infragistics.Win.UIAutomation.Stubs.FragmentUIAProviderStub.GetParentStub()
   at Infragistics.Win.UIAutomation.Stubs.FragmentUIAProviderStub.GetAutomationId()
   at Infragistics.Win.UltraWinTree.UltraTreeNode.NodeUiaProviderStub.GetAutomationIDInternal()
   at Infragistics.Win.UltraWinTree.UltraTreeNode.VerifyNodeUiaProviderStub()
   at Infragistics.Win.UltraWinTree.UltraTreeNode.GetUiaProviderStub(Boolean createIfNeeded)
   at Infragistics.Win.UltraWinTree.UltraTreeNode.GetUiaProviderStub()
   at Infragistics.Win.UltraWinTree.NodeCheckBoxUIElement.DoClick()
   at Infragistics.Win.UltraWinTree.NodeCheckBoxUIElement.OnClick()
   at Infragistics.Win.ControlUIElementBase.ProcessMouseUpHelper(Object sender, MouseEventArgs e)
   at Infragistics.Win.ControlUIElementBase.ProcessMouseUp(Object sender, MouseEventArgs e)
   at Infragistics.Win.Utilities.ProcessEvent(Control control, ProcessEvent eventToProcess, EventArgs e)
   at Infragistics.Win.UltraControlBase.OnMouseUp(MouseEventArgs e)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Parents
  • 469350
    Suggested Answer
    Offline posted

    Hi,

    The error message appears to be coming from the UIAutomation implementation of the tree node. In order for that code to be hit at all, there must be some application running which is hooking into and listening for UIA notification like an accessibility application. I think Windows 8 has some apps that run by default which might be doing this.

    I took a look at the code, though, and I can't see any way this code could be failing under ordinary circumstances. The code is asking for the Node and it's owning  collection. Since the node in this case exists and is part of a collection, I can't see any way that this could fail, unless you are using the tree in a multi-threaded application and something is getting out of synch.

    Just to be sure, I tried it out in a very simple sample with a tree and two nodes just like you described and I can't get any exception to occur.

    So there must be some other factor here that isn't mentioned in your post.

    Are you able to reproduce the issue in a small sample project and post it here so we can check it out?

Reply Children
No Data