[Mono-bugs] [Bug 38959][Cri] New - MS VC#.NET-compiled WinForms program crashes mono

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
Sun, 2 Mar 2003 03:40:43 -0500 (EST)


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 lprimak@hope.nyc.ny.us.

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

--- shadow/38959	Sun Mar  2 03:40:43 2003
+++ shadow/38959.tmp.16203	Sun Mar  2 03:40:43 2003
@@ -0,0 +1,157 @@
+Bug#: 38959
+Product: Mono/Runtime
+Version: unspecified
+OS: Red Hat 8.0
+OS Details: Fresh RH 8.0 install
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Critical
+Component: misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: lprimak@hope.nyc.ny.us               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: MS VC#.NET-compiled WinForms program crashes mono
+
+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. Create default VC#.NET Project
+2. Create any kind of VC#.NET Windows Forms program that displays button & checkbox
+3. -- OR -- Paste the following code
+-------- START -----
+using System;
+using System.Drawing;
+using System.Collections;
+using System.ComponentModel;
+using System.Windows.Forms;
+using System.Data;
+
+namespace csapp1
+{
+	/// <summary>
+	/// Summary description for Form1.
+	/// </summary>
+	public class Form1 : System.Windows.Forms.Form
+	{
+		private System.Windows.Forms.Button button1;
+		private System.Windows.Forms.TreeView treeView1;
+		private System.Windows.Forms.CheckBox checkBox1;
+		/// <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()
+		{
+			this.button1 = new System.Windows.Forms.Button();
+			this.treeView1 = new System.Windows.Forms.TreeView();
+			this.checkBox1 = new System.Windows.Forms.CheckBox();
+			this.SuspendLayout();
+			// 
+			// button1
+			// 
+			this.button1.Location = new System.Drawing.Point(104, 184);
+			this.button1.Name = "button1";
+			this.button1.TabIndex = 0;
+			this.button1.Text = "Hello, World";
+			// 
+			// treeView1
+			// 
+			this.treeView1.ImageIndex = -1;
+			this.treeView1.Location = new System.Drawing.Point(56, 24);
+			this.treeView1.Name = "treeView1";
+			this.treeView1.SelectedImageIndex = -1;
+			this.treeView1.Size = new System.Drawing.Size(136, 112);
+			this.treeView1.TabIndex = 1;
+			// 
+			// checkBox1
+			// 
+			this.checkBox1.Location = new System.Drawing.Point(88, 144);
+			this.checkBox1.Name = "checkBox1";
+			this.checkBox1.TabIndex = 2;
+			this.checkBox1.Text = "Hello";
+			// 
+			// Form1
+			// 
+			this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
+			this.ClientSize = new System.Drawing.Size(304, 246);
+			this.Controls.AddRange(new System.Windows.Forms.Control[] {
+																		  this.checkBox1,
+																		  this.treeView1,
+																		  this.button1});
+			this.Name = "Form1";
+			this.Text = "CS App 1";
+			this.ResumeLayout(false);
+
+		}
+		#endregion
+
+		/// <summary>
+		/// The main entry point for the application.
+		/// </summary>
+		[STAThread]
+		static void Main() 
+		{
+			Application.Run(new Form1());
+		}
+	}
+}
+
+-------- END ----
+
+Actual Results:
+Program runs under Windows/.NET, crashes under mono
+$ mono csapp1.exe 
+
+Unhandled Exception: System.NullReferenceException: A null value was found where an object instance was required
+
+$ mint csapp1.exe 
+Segmentation fault
+
+
+
+Expected Results:
+Runs under mono
+
+How often does this happen? 
+every time
+
+Additional Information: