I am using UltraWinTree to display some hierarchy. User can change name of nodes by enter in edit mode of correspondent node. When I remain in edit mode of node name and select other application opened in Windows then sometimes I get Unhendled Exception error. See Call Stack:
************** Exception Text **************System.NullReferenceException: Object reference not set to an instance of an object. at Infragistics.Win.EmbeddableTextBox.ProcessOnLeave(EventArgs e) at Infragistics.Win.EmbeddableTextBox.OnLostFocus(EventArgs e) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.TextBoxBase.WndProc(Message& m) at System.Windows.Forms.TextBox.WndProc(Message& m) at Infragistics.Win.EmbeddableTextBoxWithUIPermissions.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)
************************************************************************************************
It looks like came from inside of Infragistic code.
This happens sometimes, not allways replicated. I can't find the reason of this behavior. After I click on Continue button my application works stable. This happend also when I change focus of application by pressing Alt+Tab shortcut.
I am investigating this issue for a few hours. I can't find any solution to solve this problem. Any Ideas ?
workaround
private void OnValidateLabelEdit(object sender, ValidateLabelEditEventArgs e) { DataTreeNode treeNode = e.Node as DataTreeNode; if (treeNode == null) return; if (!treeNode.Parent.Control.Focused) { e.Cancel = true; return; } ... }
I haven't submit this issue, because since we are using 8.3 version I can't replicate this bug. Maybe you can submit this issue for investigation?
Thanks.
Is your application using multiple threads? That's the only reason I can see why this might happen.
You should Submit an incident to Infragistics Developer Support so they can check this out. It would be best if you could include a small sample project with instructions on how to duplicate the issue. But even if you can't duplicate the issue reliably, the call stack may be enough information for them to check this out and try to fix it.