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 ?
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.
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; } ... }