[Mono-bugs] [Bug 79813][Nor] New - ObjectDisposedException accessing Handle after ShowDialog

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Thu Nov 2 17:44:22 EST 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 monkey at jpobst.com.


--- shadow/79813	2006-11-02 17:44:22.000000000 -0500
+++ shadow/79813.tmp.20530	2006-11-02 17:44:22.000000000 -0500
@@ -0,0 +1,80 @@
+Bug#: 79813
+Product: Mono: Class Libraries
+Version: 1.1
+OS Details: 
+Status: NEW   
+Priority: Normal
+Component: Windows.Forms
+AssignedTo: toshok at ximian.com                            
+ReportedBy: monkey at jpobst.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+Summary: ObjectDisposedException accessing Handle after ShowDialog
+Description of Problem:
+See attached sample, causes an ObjectDisposedException.
+Steps to reproduce the problem:
+1. Run attached program.
+2. Click button.
+3. Close second form.
+Actual Results:
+Crash with ObjectDisposedException.
+Expected Results:
+MessageBox with some number.
+Additional Information:
+Unhandled Exception: System.ObjectDisposedException: The object was used
+after being disposed.
+  at System.Windows.Forms.Control.CreateHandle () [0x00000] 
+  at System.Windows.Forms.Form.CreateHandle () [0x00000] 
+  at System.Windows.Forms.Control.get_Handle () [0x00000] 
+  at (wrapper remoting-invoke-with-check)
+System.Windows.Forms.Control:get_Handle ()
+  at MonoTest32.Form1.b_Click (System.Object sender, System.EventArgs e)
+  at (wrapper delegate-invoke)
+System.MulticastDelegate:invoke_void_object_EventArgs (object,System.EventArgs)
+  at System.Windows.Forms.Control.OnClick (System.EventArgs e) [0x00000] 
+  at System.Windows.Forms.Button.OnClick (System.EventArgs e) [0x00000] 
+  at System.Windows.Forms.ButtonBase.OnMouseUp
+(System.Windows.Forms.MouseEventArgs mevent) [0x00000] 
+  at System.Windows.Forms.Button.OnMouseUp
+(System.Windows.Forms.MouseEventArgs e) [0x00000] 
+  at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message m)
+  at System.Windows.Forms.ButtonBase.WndProc (System.Windows.Forms.Message
+m) [0x00000] 
+  at System.Windows.Forms.Button.WndProc (System.Windows.Forms.Message m)
+  at System.Windows.Forms.Control+ControlNativeWindow.WndProc
+(System.Windows.Forms.Message m) [0x00000] 
+  at System.Windows.Forms.NativeWindow.WndProc (IntPtr hWnd, Msg msg,
+IntPtr wParam, IntPtr lParam) [0x00000] 
+  at (wrapper native-to-managed) System.Windows.Forms.NativeWindow:WndProc
+  at <0x00000> <unknown method>
+  at (wrapper managed-to-native)
+  at System.Windows.Forms.XplatUIWin32.DispatchMessage
+(System.Windows.Forms.MSG msg) [0x00000] 
+  at System.Windows.Forms.XplatUI.DispatchMessage (System.Windows.Forms.MSG
+msg) [0x00000] 
+  at System.Windows.Forms.Application.RunLoop (Boolean Modal,
+System.Windows.Forms.ApplicationContext context) [0x00000] 
+  at System.Windows.Forms.Application.Run (System.Windows.Forms.Form
+mainForm) [0x00000] 
+  at MonoTest32.Form1.Main () [0x00000] 
+Offending line in Controls.cs (3321)
+  if (IsDisposed) {
+    throw new ObjectDisposedException(GetType().FullName.ToString());
+  }

More information about the mono-bugs mailing list