We are getting a null reference exception from the Infragistics4.Win.UltraWinTree assembly. This is after we remove the node we get the following error. Any help would be appreciated.
System.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.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)
Thank you for posting in our forums!
If you are not using CodedUI, you can disable the UIAutomation support with the following code.
Infragistics.Win.UltraControlBase.UIAutomationForCodedUITestingEnabled = false;
This should bypass the exception that is happening. If you still need the UIA support, please let me know which version and build of Infragistics you are using. e.g. 18.2.20182.175
If you need anything else, please let me know and I will be glad to help.
Thanks for your answer. We are not using CodedUI. But when I try the above solution, it still throws me the same error.
We are using version 17.2.20172.1000
Thank you for the information.
I am not able to reproduce this behavior in a sample with the information I have. I created a sample that used checkboxes on nodes and I have a button that removes a child node from a node. When I click the button, then click a checkbox nothing happens.
The following questions may help to resolve the issue.
1. What is the relation of the node that is removed and the node being clicked on?2. When are you removing the node, relative to clicking a checkbox?
I have also provided the sample I created. You may feel free to modify it to reproduce the behavior and send it back.
Looking forward to hearing from you.