[Gtk-sharp-list] Gnome.Program crash

Jacob Ilsø Christensen jacobilsoe at gmail.com
Mon Mar 13 15:31:08 EST 2006


Hi.

I am trying to get the following piece of code to work:

using Gtk;

public class C
{
	public static void Main (string[] args)
	{
		Gnome.Program program = new Gnome.Program("HelloWorld", "1.0",
Gnome.Modules.UI, args, "gnome-datadir", "/usr/share");

                Gnome.App app = new Gnome.App("HelloWorld",
"HelloWorld");
		app.ShowAll();

		program.Run();	
	}
}

It compiles but when I run it, I get the following error:

=================================================================
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 (wrapper managed-to-native)
Gnome.Program:gtksharp_gnome_program_init
(string,string,intptr,int,intptr,int,Gnome.Program/PropertyArg[])
<0x4>
in (wrapper managed-to-native)
Gnome.Program:gtksharp_gnome_program_init
(string,string,intptr,int,intptr,int,Gnome.Program/PropertyArg[])
<0x104d4c0>
in Gnome.Program:.ctor
(string,string,Gnome.ModuleInfo,string[],object[]) <0x2e8>
in C:Main (string[]) <0x7a>
in (wrapper runtime-invoke) System.Object:runtime_invoke_void_string[]
(object,intptr,intptr,intptr) <0x50c4c7a9>

Native stacktrace:

        mono(mono_handle_native_sigsegv+0x81) [0x81441b1]
        mono [0x81144cb]
        [0xffffe440]
        /usr/lib/libgobject-2.0.so.0(g_value_get_string+0x2f) [0xb6924a24]
        /home/jacobilsoe/Libs/lib/libgnomesharpglue-2.so(gtksharp_gnome_program_init+0x1fd)
[0xb70cf1ed]
        [0xb63f8975]
        [0xb7445d01]
        [0xb74451cb]
        [0xb7444823]
        mono(mono_runtime_exec_main+0x52) [0x8090fa2]
        mono(mono_runtime_run_main+0x12f) [0x8093bcf]
        mono(mono_main+0xf2d) [0x805c82d]
        /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xd2) [0xb7d47ea2]
        mono [0x805b3a1]

If I use Gnome.Program program = new Gnome.Program("HelloWorld",
"1.0", Gnome.Modules.UI, args); instead it works. So I guess it is the
gnome parameters that cause the crash. Anyone know how to make this
work?

/Jacob


More information about the Gtk-sharp-list mailing list