[Mono-bugs] [Bug 80768][Nor] New - ObjectDisposedException closing form in Paint
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Fri Feb 9 03:45:56 EST 2007
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=80768
--- shadow/80768 2007-02-09 03:45:56.000000000 -0500
+++ shadow/80768.tmp.25935 2007-02-09 03:45:56.000000000 -0500
@@ -0,0 +1,63 @@
+Bug#: 80768
+Product: Mono: Class Libraries
+Version: 1.2
+OS: GNU/Linux [Other]
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: Windows.Forms
+AssignedTo: toshok at ximian.com
+ReportedBy: gert.driesen at pandora.be
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: ObjectDisposedException closing form in Paint
+
+When closing a form in the Paint eventhandler, an ObjectDisposedException
+is reported:
+
+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 System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message&
+m) [0x00000]
+ at System.Windows.Forms.ScrollableControl.WndProc
+(System.Windows.Forms.Message& m) [0x00000]
+ at System.Windows.Forms.ContainerControl.WndProc
+(System.Windows.Forms.Message& m) [0x00000]
+ at System.Windows.Forms.Form.WndProc (System.Windows.Forms.Message& m)
+[0x00000]
+ 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]
+
+To reproduce, compile and run the following code snippet:
+
+using System;
+using System.Windows.Forms;
+
+public class MainForm : Form
+{
+ public MainForm ()
+ {
+ Paint += new PaintEventHandler (MainForm_Paint);
+ }
+
+ void MainForm_Paint (object sender, PaintEventArgs e)
+ {
+ Close ();
+ }
+
+ [STAThread]
+ static void Main ()
+ {
+ Application.Run (new MainForm ());
+ }
+}
More information about the mono-bugs
mailing list