I'm not entirely sure where to start so I hope someone might have some ideas!
I have a rather large project that has been running with 2008.3 quite well for 24 months now. Today I have attempted to upgrade to 2010.2 - there have been no other code changes.
The error (that I cannot trap, debug nor find a stack trace on as it appears to be internal to Infragistics) is presented as
System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'MdiChildForm'.
at System.Windows.Forms.Control.CreateHandle()
at System.Windows.Forms.Form.CreateHandle()
at System.Windows.Forms.Control.get_Handle()
at System.Windows.Forms.Form.SetVisibleCore(Boolean value)
at System.Windows.Forms.Control.set_Visible(Boolean value)
at Infragistics.Win.UltraWinDock.UltraDockManager.OnMdiParentLoad(Object sender, EventArgs e)
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.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)
I guess the question I'm really asking is are there any breaking changes I am not aware of in UltraDockManager.OnMdiParentLoad?
Thanks in advance
Hi,
It is hard for me to determine what may cause this exception. Try checking the IsDisposed property before accessing the control. You can also check if on the FormClosing event, assuming you are using the FormClose event. If this does not resolve your issue, please let me know and I will create a case for you where you can send me your project or a sample illustrating the described behavior. Also can you please let me know which version are you using?
Regards,
Stefaniya
Let me know if you still experince this issue or if you need any additional help.
Hi Stefaniya,
I am currently trying to create a sample project to demonstrate the behaviour as the whole project is rather cumbersome! I have not been able to do this as yet.
I wil endeavour to get the sample finished early next week.
Thanks in advance.
I have opened the following support ticket for you: CAS-52642-GB9K3N. If you do not want to upload your sample here, you can submit it to the ticket.
I am looking forward new from you.