Hello, I am using GTK# with Mono on Windows. The following test program works on Mono versions 1.2 and older. On Mono versions 1.2.1 and later (all the way to 1.2.5.2) when I click the button widget, I get an error (see below). I have included the test app (test2.cs) and the command line arguments used to compile it below. I have the exact same problem with Glade#. The test program is copied off of the GTK# tutorial page.
This seems to be a problem since 1.2.1, but I was surprised not to have found any information about this problem in searching around. Should I be using GTK# on Windows or is no one actually using it on Windows (hence no bug report)? Thanks, Phil Covington http://www.philcovington.com --------------------------------------------------------- test2.cs: --------------------------------------------------------- using Gtk; using System; public class ButtonApp { public static int Main (string[] args) { Application.Init (); Window win = new Window ("Button Tester"); win.SetDefaultSize (200, 150); win.DeleteEvent += new DeleteEventHandler (Window_Delete); Button btn = new Button ("Click Me"); btn.Clicked += new EventHandler (btn_click); win.Add (btn); win.ShowAll (); Application.Run (); return 0; } static void btn_click (object obj, EventArgs args) { Console.WriteLine ("Button Clicked"); } static void Window_Delete (object obj, DeleteEventArgs args) { Application.Quit (); args.RetVal = true; } } ------------------------------------------------------------------------------------- test2.cs compiled with: >mcs -pkg:gtk-sharp test2.cs run: >mono test2.exe -------------------------------------------------------------------- Mono 1.2: C:\Data\project>mono test2.exe Button Clicked Button Clicked Button Clicked Button Clicked C:\Data\project> --------------------------------------------------------------------- Mono 1.2.1: C:\Data\project>>mono test2.exe Button Clicked ================================================================= 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) Gtk.Application.gtk_main () <0x00004> at (wrapper managed-to-native) Gtk.Application.gtk_main () <0xffffffff> at Gtk.Application.Run () <0x00007> at ButtonApp.Main (string[]) <0x000f2> at (wrapper runtime-invoke) System.Object.runtime_invoke_int_string[] (object, intptr,intptr,intptr) <0xffffffff> This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. C:\Data\project> ------------------------------------------------------------------- Mono 1.2.5.2: C:\Data\project>mono test2.exe Button Clicked Stacktrace: at (wrapper managed-to-native) Gtk.Application.gtk_main () <0x00004> at (wrapper managed-to-native) Gtk.Application.gtk_main () <0xffffffff> at Gtk.Application.Run () <0x00007> at ButtonApp.Main (string[]) <0x000ee> at (wrapper runtime-invoke) ButtonApp.runtime_invoke_int_string[] (object,intp tr,intptr,intptr) <0xffffffff> This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. C:\Data\project> ----------------------------------------------------------------------- _______________________________________________ Mono-list maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-list
