[Mono-bugs] [Bug 79155][Nor] New - ObjectDisposedException not reported for disposed childform

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Thu Aug 24 15:57:08 EDT 2006


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by gert.driesen at pandora.be.

http://bugzilla.ximian.com/show_bug.cgi?id=79155

--- shadow/79155	2006-08-24 15:57:08.000000000 -0400
+++ shadow/79155.tmp.3665	2006-08-24 15:57:08.000000000 -0400
@@ -0,0 +1,60 @@
+Bug#: 79155
+Product: Mono: Class Libraries
+Version: 1.1
+OS: GNU/Linux [Other]
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: Windows.Forms
+AssignedTo: peter at novonyx.com                            
+ReportedBy: gert.driesen at pandora.be               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: ObjectDisposedException not reported for disposed childform
+
+When a child form is created and closed, Mono still allows methods to be 
+invoked on that form although it's disposed (Form.IsDisposed == true).
+
+To reproduce:
+
+1. Compile and run the attached code snippet.
+2. Click the "OK" button.
+3. Close the form that is opened.
+4. Click the "OK" button again.
+
+Expected result:
+
+An ObjectDisposedException, which is what MS reports:
+
+System.ObjectDisposedException: Cannot access a disposed object 
+named "ChildForm".
+Object name: "ChildForm".
+   at System.Windows.Forms.Control.CreateHandle()
+   at System.Windows.Forms.Form.CreateHandle()
+   at System.Windows.Forms.Control.get_Handle()
+   at System.Windows.Forms.Control.SetVisibleCore(Boolean value)
+   at System.Windows.Forms.Form.SetVisibleCore(Boolean value)
+   at System.Windows.Forms.Control.set_Visible(Boolean value)
+   at System.Windows.Forms.Control.Show()
+   at MainForm.okButton_Click(Object sender, EventArgs e)
+   at System.Windows.Forms.Control.OnClick(EventArgs e)
+   at System.Windows.Forms.Button.OnClick(EventArgs e)
+   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
+   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons 
+button, Int32 clicks)
+   at System.Windows.Forms.Control.WndProc(Message& m)
+   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
+   at System.Windows.Forms.Button.WndProc(Message& m)
+   at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
+   at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
+   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, 
+IntPtr wparam, IntPtr lparam)
+
+Actual result:
+
+A message box is displayed saying "Activate&Show on disposed ChildForm 
+did not fail.".


More information about the mono-bugs mailing list