[Mono-bugs] [Bug 77365][Nor] New - Application crash at start!

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Thu Jan 26 03:54:48 EST 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 paulomorfeo at portugalmail.pt.

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

--- shadow/77365	2006-01-26 03:54:48.000000000 -0500
+++ shadow/77365.tmp.11115	2006-01-26 03:54:48.000000000 -0500
@@ -0,0 +1,237 @@
+Bug#: 77365
+Product: Mono: Runtime
+Version: 1.1
+OS: 
+OS Details: Red Hat Enterprise Linux 4 Desktop, Gnome, ugly as sin!
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: JIT
+AssignedTo: lupus at ximian.com                            
+ReportedBy: PauloMorfeo at Portugalmail.pt               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Application crash at start!
+
+Application crashes at start when i use the widget's constructor's outside
+of the main class constructor.
+I'm using X-Develop in Red Hat Enterprise 4 with mono 1.1.13 . I don't know
+what comand line arguments the program passes to the compiler. I've added
+the assembly Gtk Sharp 2.4, i'm using /mono/1.0 and building for Release.
+And i can't figure out how to attach files..................
+
+#####
+File 1:
+#####
+//using ByteFX;
+using System;
+using System.Text;
+
+namespace TestesBD
+{
+	class Program
+	{
+		static void Main(string[] args)
+		{
+			Console.WriteLine ("Início!");
+			
+			Ligar();
+			new Janela ();
+			
+			Console.WriteLine ("Fim!");
+		}
+		
+		static void Ligar()
+		{
+			ByteFX.Data.MySqlClient.MySqlConnection ligacao= new
+				ByteFX.Data.MySqlClient.MySqlConnection ();
+			ligacao.ConnectionString= "Server=localhost;Database=test;" +
+				"Uid=root;Pwd=pwd;";
+			ligacao.Open();
+			Console.WriteLine (ligacao.ConnectionString);
+			ligacao.Close();
+		}
+	}
+}
+
+#####
+File 2 working version:
+#####
+using Gtk;
+using System;
+
+namespace TestesBD
+{
+	public class Janela
+	{
+		Window win;
+		VBox vbox;
+		Entry entry;
+		Button btn;
+		Label lbl;
+		
+		public Janela ()
+		{
+			Application.Init();
+			
+			win= new Window ("Janela");
+			vbox= new VBox();
+			entry= new Entry();
+			btn= new Button ("Executar");
+			lbl= new Label();
+			
+			win.Add (vbox);
+			vbox.PackStart (entry);
+			vbox.PackStart (btn);
+			vbox.PackStart (lbl);
+			
+			win.DeleteEvent += win_DeleteEvent;
+			win.DefaultWidth= 640;
+			win.DefaultHeight= 480;
+			btn.Clicked += btn_Clicked;
+			
+			win.ShowAll();
+			Application.Run();
+		}
+		
+		void btn_Clicked (object obj, EventArgs args)
+		{
+			Console.WriteLine (entry.Text);
+		}
+		
+		void win_DeleteEvent (object obj, DeleteEventArgs args)
+		{
+			Application.Quit();
+		}
+	}
+}
+
+#####
+File 2 non-working version:
+#####
+using Gtk;
+using System;
+
+namespace TestesBD
+{
+	public class Janela
+	{
+		//!!!Changes here!!!
+		Window win= new Window ("Janela");
+		VBox vbox= new VBox();
+		Entry entry= new Entry();
+		Button btn= new Button ("Executar");
+		Label lbl= new Label();
+		//!!!Changes here!!!
+		
+		public Janela ()
+		{
+			Application.Init();
+			
+			win.Add (vbox);
+			vbox.PackStart (entry);
+			vbox.PackStart (btn);
+			vbox.PackStart (lbl);
+			
+			win.DeleteEvent += win_DeleteEvent;
+			win.DefaultWidth= 640;
+			win.DefaultHeight= 480;
+			btn.Clicked += btn_Clicked;
+			
+			win.ShowAll();
+			Application.Run();
+		}
+		
+		void btn_Clicked (object obj, EventArgs args)
+		{
+			Console.WriteLine (entry.Text);
+		}
+		
+		void win_DeleteEvent (object obj, DeleteEventArgs args)
+		{
+			Application.Quit();
+		}
+	}
+}
+
+#####
+With the non-working version of file 2, i get this output:
+#####
+Início!
+server=localhost;database=test;pwd=kona;uid=root
+
+(/home/paulo/.xdevelop/projects/TestesBD/TestesBD/bin/Release/TestesBD.exe:9295):
+GLib-GObject-CRITICAL **: gtype.c:2253: initialization assertion failed,
+use g_type_init() prior to this function
+
+(/home/paulo/.xdevelop/projects/TestesBD/TestesBD/bin/Release/TestesBD.exe:9295):
+GLib-GObject-CRITICAL **: gtype.c:2253: initialization assertion failed,
+use g_type_init() prior to this function
+
+(/home/paulo/.xdevelop/projects/TestesBD/TestesBD/bin/Release/TestesBD.exe:9295):
+GLib-GObject-CRITICAL **: gtype.c:2253: initialization assertion failed,
+use g_type_init() prior to this function
+
+(/home/paulo/.xdevelop/projects/TestesBD/TestesBD/bin/Release/TestesBD.exe:9295):
+GLib-GObject-CRITICAL **: file gtype.c: line 2319
+(g_type_add_interface_static): assertion `G_TYPE_IS_INSTANTIATABLE
+(instance_type)' failed
+
+(/home/paulo/.xdevelop/projects/TestesBD/TestesBD/bin/Release/TestesBD.exe:9295):
+GLib-GObject-CRITICAL **: gtype.c:2253: initialization assertion failed,
+use g_type_init() prior to this function
+
+(/home/paulo/.xdevelop/projects/TestesBD/TestesBD/bin/Release/TestesBD.exe:9295):
+GLib-GObject-CRITICAL **: gtype.c:2253: initialization assertion failed,
+use g_type_init() prior to this function
+
+(/home/paulo/.xdevelop/projects/TestesBD/TestesBD/bin/Release/TestesBD.exe:9295):
+GLib-GObject-CRITICAL **: gtype.c:2253: initialization assertion failed,
+use g_type_init() prior to this function
+
+(/home/paulo/.xdevelop/projects/TestesBD/TestesBD/bin/Release/TestesBD.exe:9295):
+GLib-GObject-CRITICAL **: file gobject.c: line 819 (g_object_new):
+assertion `G_TYPE_IS_OBJECT (object_type)' failed
+
+=================================================================
+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:
+
+in <0x4> (wrapper managed-to-native) Gtk.Window:gtk_window_new (int)
+in <0xfffffa2c> (wrapper managed-to-native) Gtk.Window:gtk_window_new (int)
+in <0x194> Gtk.Window:.ctor (Gtk.WindowType)
+in <0xc> Gtk.Window:.ctor (string)
+in <0x25> TestesBD.Janela:.ctor ()
+in <0x26> TestesBD.Program:Main (string[])
+in <0x50aa7d67> (wrapper runtime-invoke)
+System.Object:runtime_invoke_void_string[] (object,intptr,intptr,intptr)
+
+Native stacktrace:
+
+	/usr/bin/mono(mono_handle_native_sigsegv+0xba) [0x814c1da]
+	/usr/bin/mono [0x81386af]
+	/lib/tls/libpthread.so.0 [0x8ac7c0]
+	[0xb71ae503]
+	[0xb71adf05]
+	[0xb71add25]
+	[0xb71ada9e]
+	[0xb76908ff]
+	[0xb7690823]
+	/usr/bin/mono [0x8138560]
+	/usr/bin/mono(mono_runtime_invoke+0x27) [0x80d4d37]
+	/usr/bin/mono(mono_runtime_exec_main+0x5c) [0x80d5e4c]
+	/usr/bin/mono(mono_runtime_run_main+0x171) [0x80d5a71]
+	/usr/bin/mono(strftime+0x1b52) [0x805ce52]
+	/usr/bin/mono(mono_main+0x786) [0x805d766]
+	/usr/bin/mono(__fxstat64+0x12b) [0x805c21b]
+	/lib/tls/libc.so.6(__libc_start_main+0xd3) [0x673e23]
+	/usr/bin/mono(sinh+0x41) [0x805c171]
+
+#####


More information about the mono-bugs mailing list