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 [EMAIL PROTECTED] http://bugzilla.ximian.com/show_bug.cgi?id=81739 --- shadow/81739 2007-05-26 05:58:26.000000000 -0400 +++ shadow/81739.tmp.14986 2007-05-26 05:58:26.000000000 -0400 @@ -0,0 +1,131 @@ +Bug#: 81739 +Product: Mono: Class Libraries +Version: 1.0 +OS: Red Hat 8.0 +OS Details: Linux skif 2.4.27 #1 SMP Thu Apr 14 15:25:11 MSD 2005 i686 athlon i386 GNU/Linux +Status: NEW +Resolution: +Severity: +Priority: Wishlist +Component: Windows.Forms +AssignedTo: [EMAIL PROTECTED] +ReportedBy: [EMAIL PROTECTED] +QAContact: [EMAIL PROTECTED] +TargetMilestone: --- +URL: +Cc: +Summary: Mouse Click on Tree Node Bug + +Description of Problem: + +Program crashes after mouse click on tree node. + +Steps to reproduce the problem: +1. Compile the program as +>gmcs /r:System.Windows.Forms,System.Drawing TreeNodeClickTest.cs + +2. Run it as +>mono TreeNodeClickTest.exe + +3. Expand the Node0 and then click by right button on Node1 - +program crashes with + [EMAIL PROTECTED] TreeClick]$ mono TreeNodeClickTest.exe +System.NullReferenceException: Object reference not set to an instance of +an object + at System.Windows.Forms.TreeView.MouseUpHandler (System.Object sender, +System.Windows.Forms.MouseEventArgs e) [0x00000] + at (wrapper delegate-invoke) +System.MulticastDelegate:invoke_void_object_MouseEventArgs +(object,System.Windows.Forms.MouseEventArgs) + at System.Windows.Forms.Control.OnMouseUp +(System.Windows.Forms.MouseEventArgs e) [0x00000] + at System.Windows.Forms.Control.WmRButtonUp +(System.Windows.Forms.Message& m) [0x00000] + at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message& +m) [0x00000] + at System.Windows.Forms.TreeView.WndProc (System.Windows.Forms.Message& +m) [0x00000] + at System.Windows.Forms.Control+ControlWindowTarget.OnMessage +(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] + + +How often does this happen? + +Always + +Additional Information: + +The test program: + +using System; +using System.ComponentModel; +using System.Drawing; +using System.Text; +using System.Windows.Forms; + + +public class Form1 : Form +{ + public Form1() + { + TreeNode treeNode1 = new TreeNode("Node1"); + TreeNode treeNode0 = new TreeNode("Node0", new TreeNode[] { +treeNode1 }); + + this.treeView1 = new System.Windows.Forms.TreeView(); + this.SuspendLayout(); + + this.treeView1.Dock = DockStyle.Fill; + this.treeView1.Location = new Point(0, 0); + this.treeView1.Name = "treeView1"; + + this.treeView1.Nodes.AddRange(new TreeNode[] { treeNode0 } ); + + this.treeView1.Size = new Size(292, 266); + this.treeView1.TabIndex = 0; + this.treeView1.MouseClick += new MouseEventHandler +(this.treeView1_MouseClick); + + + this.AutoScaleDimensions = new SizeF(6F, 13F); + this.AutoScaleMode = AutoScaleMode.Font; + this.ClientSize = new Size(292, 266); + this.Controls.Add(this.treeView1); + this.Name = "Form1"; + this.Text = "Form1"; + this.ResumeLayout(false); + } + + private TreeView treeView1; + + private void treeView1_MouseClick(object sender, MouseEventArgs e) + { + MessageBox.Show(" Click !!! "); + } +} + +static class Program +{ + [STAThread] + static void Main() + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new Form1()); + } +} + +Mono and libgdiplus version: +$ mono -V +Mono JIT compiler version 1.2.4 (tarball) +Copyright (C) 2002-2007 Novell, Inc and Contributors. www.mono-project.com + TLS: __thread + GC: Included Boehm (with typed GC) + SIGSEGV: normal + Architecture: x86 + Disabled: none _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
