[Mono-bugs] [Bug 78944][Cri] New - A winform app crashes when keyboard is pressed.

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Tue Jul 25 03:33:55 EDT 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 mandark at cu-cdo.edu.ph.

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

--- shadow/78944	2006-07-25 03:33:54.000000000 -0400
+++ shadow/78944.tmp.10510	2006-07-25 03:33:54.000000000 -0400
@@ -0,0 +1,261 @@
+Bug#: 78944
+Product: Mono: Runtime
+Version: 1.1
+OS: 
+OS Details: ubuntu 6.06 lts
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Critical
+Component: JIT
+AssignedTo: lupus at ximian.com                            
+ReportedBy: mandark at cu-cdo.edu.ph               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: A winform app crashes when keyboard is pressed.
+
+Description of Problem: A simple winform app will crash when a key is pressed.
+
+Steps to reproduce the problem:
+1. Use the vs.net generated source code below.
+//Filename Form1.cs
+using System;
+
+using System.Drawing;
+
+using System.Collections;
+
+using System.ComponentModel;
+
+using System.Windows.Forms;
+
+
+
+namespace WindowsApplication2
+
+{
+  public class Form1 : System.Windows.Forms.Form
+
+  {
+
+     private System.Windows.Forms.Button button1;
+
+     private System.ComponentModel.Container components = null;
+
+     private System.Windows.Forms.Button button2;
+
+     private System.Windows.Forms.TextBox textBox1;
+
+
+
+     static void Main()
+
+     {
+
+	Application.Run(new Form1());
+
+     }
+
+	
+     public Form1()
+
+     {
+
+        InitializeComponent();
+
+
+     }
+
+
+     
+     protected override void Dispose( bool disposing )
+
+     {
+
+        if( disposing )
+
+	{
+
+  	   if(components != null)
+
+	   {
+
+	         components.Dispose();
+
+	   }
+
+        }
+
+	base.Dispose( disposing );
+
+     }
+
+
+
+     private void InitializeComponent()
+
+     {
+
+        this.button1 = new System.Windows.Forms.Button();
+
+        this.button2 = new System.Windows.Forms.Button();
+
+	this.textBox1 = new System.Windows.Forms.TextBox();
+
+	this.SuspendLayout();
+
+	this.button1.Location = new System.Drawing.Point(0, 0);
+
+	this.button1.Name = "button1";
+
+	this.button1.TabIndex = 0;
+
+	this.button2.Location = new System.Drawing.Point(160, 112);
+
+	this.button2.Name = "button2";
+
+	this.button2.Size = new System.Drawing.Size(96, 24);
+
+	this.button2.TabIndex = 0;
+
+	this.button2.Text = "button2";
+
+	this.button2.Click += new System.EventHandler(this.button2_Click);
+
+	this.textBox1.Location = new System.Drawing.Point(136, 48);
+
+	this.textBox1.Name = "textBox1";
+
+	this.textBox1.Size = new System.Drawing.Size(168, 20);
+
+	this.textBox1.TabIndex = 1;
+
+	this.textBox1.Text = "textBox1";
+
+	this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
+
+	this.ClientSize = new System.Drawing.Size(432, 350);
+
+	this.Controls.Add(this.textBox1);
+
+	this.Controls.Add(this.button2);
+
+	this.Name = "Form1";
+
+	this.ResumeLayout(false);
+
+
+     }
+
+
+     private void button2_Click(object sender, System.EventArgs e)
+
+     {
+
+	Console.WriteLine(textBox1.Text);
+
+     }
+
+
+   }
+
+}
+
+2. compile in mono
+mcs /r:System.Windows.Forms /r:System.Drawing Form1.cs
+
+3. run the sample app
+mono Form1.exe
+
+Actual Results: The winform will be displayed. The button will function
+properly by try to type any key and the following will be displayed in the
+console.
+
+Mono System.Windows.Forms Assembly [$auto_build_revision$]
+
+(Form1.exe:5594): Gdk-WARNING **: locale not supported by Xlib
+
+(Form1.exe:5594): Gdk-WARNING **: cannot set locale modifiers
+Gtk colorscheme read
+textBox1
+textBox1
+textBox1
+X does not support your locale
+Could not set X locale modifiers
+Could not get XIM
+
+=================================================================
+Got a SIGSEGV while executing native code. This usually indicates
+a fatal error in the mono runtime or one of the native libraries
+used by your application.
+=================================================================
+
+Stacktrace:
+
+  at (wrapper managed-to-native) System.Windows.Forms.X11Keyboard.XCreateIC
+(intptr,string,System.Windows.Forms.XIMProperties,string,intptr,string,intptr,intptr)
+<0x00004>
+  at (wrapper managed-to-native) System.Windows.Forms.X11Keyboard.XCreateIC
+(intptr,string,System.Windows.Forms.XIMProperties,string,intptr,string,intptr,intptr)
+<0xffffffff>
+  at System.Windows.Forms.X11Keyboard.CreateXic (intptr,intptr) <0x00030>
+  at System.Windows.Forms.X11Keyboard.EnsureLayoutInitialized () <0x00105>
+  at System.Windows.Forms.X11Keyboard.KeyEvent
+(intptr,System.Windows.Forms.XEvent,System.Windows.Forms.MSG&) <0x0003f>
+  at System.Windows.Forms.XplatUIX11.GetMessage
+(object,System.Windows.Forms.MSG&,intptr,int,int) <0x0047a>
+  at System.Windows.Forms.XplatUI.GetMessage
+(object,System.Windows.Forms.MSG&,intptr,int,int) <0x00021>
+  at System.Windows.Forms.Application.RunLoop
+(bool,System.Windows.Forms.ApplicationContext) <0x008c1>
+  at System.Windows.Forms.Application.Run (System.Windows.Forms.Form) <0x00024>
+  at WindowsApplication2.Form1.Main () <0x0001f>
+  at (wrapper runtime-invoke) System.Object.runtime_invoke_void
+(object,intptr,intptr,intptr) <0xffffffff>
+
+Native stacktrace:
+
+        mono(mono_handle_native_sigsegv+0xe6) [0x81594a6]
+        mono [0x8143727]
+        [0xffffe440]
+        [0xb68bcc4b]
+        [0xb68bcbb9]
+        [0xb68f086e]
+        [0xb68f0478]
+        [0xb68e2abb]
+        [0xb68e263a]
+        [0xb6854352]
+        [0xb68536f5]
+        [0xb74e9708]
+        [0xb74e87be]
+        mono [0x81435d0]
+        mono(mono_runtime_invoke+0x27) [0x80db577]
+        mono(mono_runtime_exec_main+0x5c) [0x80dc72c]
+        mono(mono_runtime_run_main+0x182) [0x80dc312]
+        mono(strftime+0x1bbe) [0x805c962]
+        mono(mono_main+0x857) [0x805d347]
+        mono(__fxstat64+0x137) [0x805bd0b]
+        /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xd2) [0xb7d57ea2]
+        mono(sinh+0x4d) [0x805bc61]
+Aborted
+
+
+
+Expected Results: Application should not crash.
+
+
+How often does this happen?  Always
+
+
+Additional Information:
+OS: Ubuntu 6.06 LTS
+Installed Using: mono installer 
+mono -V output :
+Mono JIT compiler version 1.1.16.1, (C) 2002-2006 Novell, Inc and
+Contributors. www.mono-project.com
+        TLS:           normal
+        GC:            Included Boehm (with typed GC)
+        SIGSEGV:       normal
+        Disabled:      none


More information about the mono-bugs mailing list