[Mono-bugs] [Bug 75736][Wis] New - null ref in doevents

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Sat Aug 6 18:55:56 EDT 2005


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 smeegoan at yahoo.com.br.

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

--- shadow/75736	2005-08-06 18:55:56.000000000 -0400
+++ shadow/75736.tmp.7820	2005-08-06 18:55:56.000000000 -0400
@@ -0,0 +1,153 @@
+Bug#: 75736
+Product: Mono: Class Libraries
+Version: 1.1
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: Windows.Forms
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: smeegoan at yahoo.com.br               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: null ref in doevents
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+
+
+Steps to reproduce the problem:
+1. compile the following code:
+using System;
+using System.Drawing;
+using System.Collections;
+using System.ComponentModel;
+using System.Windows.Forms;
+using System.Data;
+
+namespace WindowsApplication1
+{
+	/// <summary>
+	/// Summary description for Form1.
+	/// </summary>
+	public class Form1 : System.Windows.Forms.Form
+	{
+		/// <summary>
+		/// Required designer variable.
+		/// </summary>
+		private System.ComponentModel.Container components = null;
+
+		public Form1()
+		{
+			//
+			// Required for Windows Form Designer support
+			//
+			InitializeComponent();
+
+			//
+			// TODO: Add any constructor code after InitializeComponent call
+			//
+		}
+
+		/// <summary>
+		/// Clean up any resources being used.
+		/// </summary>
+		protected override void Dispose( bool disposing )
+		{
+			if( disposing )
+			{
+				if (components != null) 
+				{
+					components.Dispose();
+				}
+			}
+			base.Dispose( disposing );
+		}
+
+		#region Windows Form Designer generated code
+		/// <summary>
+		/// Required method for Designer support - do not modify
+		/// the contents of this method with the code editor.
+		/// </summary>
+		private void InitializeComponent()
+		{
+			// 
+			// Form1
+			// 
+			this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
+			this.ClientSize = new System.Drawing.Size(292, 269);
+			this.Name = "Form1";
+			this.Text = "Form1";
+			this.Load += new System.EventHandler(this.Form1_Load);
+		
+		}
+		#endregion
+
+		/// <summary>
+		/// The main entry point for the application.
+		/// </summary>
+		[STAThread]
+		static void Main() 
+		{
+			Application.Run(new Form1());
+		}
+
+		private void Form1_Load(object sender, System.EventArgs e)
+		{
+			System.Windows.Forms.Cursor.Current =
+System.Windows.Forms.Cursors.WaitCursor;
+			System.Windows.Forms.Application.DoEvents();
+		}
+
+	}
+}
+
+2. run with mono
+
+
+Actual Results:
+
+C:\Documents and Settings\Pedro>mono "C:\Documents and Settings\Pedro\My
+Documen
+ts\Visual Studio
+Projects\WindowsApplication1\bin\Debug\WindowsApplication1.exe"
+
+Mono System.Windows.Forms Assembly [Revision: 44786; built: 2005/5/25 22:34:45]
+
+Unhandled Exception: System.NullReferenceException: Object reference not set to
+an instance of an object
+in <0x0002b> System.Windows.Forms.Cursor:set_Current
+(System.Windows.Forms.Curso
+r value)
+in <0x00035> System.Windows.Forms.XplatUIWin32:DoEvents ()
+in <0x00012> System.Windows.Forms.XplatUI:DoEvents ()
+in <0x00007> System.Windows.Forms.Application:DoEvents ()
+in <0x00019> WindowsApplication1.Form1:Form1_Load (System.Object sender,
+System.
+EventArgs e)
+in (wrapper delegate-invoke)
+System.MulticastDelegate:invoke_void_object_EventAr
+gs (object,System.EventArgs)
+in <0x00023> System.Windows.Forms.Form:OnLoad (System.EventArgs e)
+in <0x000b5> System.Windows.Forms.Form:OnCreateControl ()
+in <0x00045> System.Windows.Forms.Control:CreateControl ()
+in (wrapper remoting-invoke-with-check)
+System.Windows.Forms.Control:CreateContr
+ol ()
+in <0x0000e> System.Windows.Forms.Application:Run
+(System.Windows.Forms.Form mai
+nForm)
+in <0x00021> WindowsApplication1.Form1:Main ()
+
+Expected Results:
+the exception should not be thrown
+
+How often does this happen? 
+always
+
+Additional Information:


More information about the mono-bugs mailing list