[Gtk-sharp-list] Help in GnomeDB# implementation

Daniel Espinosa esodan at gmail.com
Fri Nov 3 15:15:05 EST 2006


I'm trying to GnomeDB# to work, but I have an error on the init.

Actually GnomeDB# have a Class Application, where you have this function:

(I have a fake GnomeDb2 namespace for test porpouses)

public static void Init (string app_id, string version, ref string[] args)
		{
			IntPtr native_appid = GLib.Marshaller.StringToPtrGStrdup (app_id);
			IntPtr native_version = GLib.Marshaller.StringToPtrGStrdup (version);
			GLib.Argv argv = new GLib.Argv (args);
			IntPtr arg_ptr = argv.Handle;
			
			int argc = args.Length;
			gnome_db_init (native_appid, native_version, ref argc, ref arg_ptr);
			GLib.Marshaller.Free (native_appid);
			GLib.Marshaller.Free (native_version);
			if (arg_ptr != argv.Handle)
				throw new Exception ("Init returned new argv handle.");
			if (argc <= 1)
				args = new string [0];
			else
				args = argv.GetArgs (argc);
		}

Internaly gnome_db_init, call gnome_init and create the gnome_program.

When run the program and call Init, I have this:

GLib-ERROR **: gmem.c:135: failed to allocate 4272502644 bytes
aborting...

=================================================================
Got a SIGABRT 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) GnomeDb2.Application.gnome_db_init
(intptr,intptr,int&,intptr&) <0x00004>
  at (wrapper managed-to-native) GnomeDb2.Application.gnome_db_init
(intptr,intptr,int&,intptr&) <0xffffffff>
  at GnomeDb2.Application.Init (string,string,string[]&) [0x00023] in
/home/esodan/Projects/gnomedb-sharp-tutorial-step1/MyProgram.cs:45
  at MyProgram..ctor (string[]) [0x00006] in
/home/esodan/Projects/gnomedb-sharp-tutorial-step1/MyProgram.cs:82
  at MainClass.Main (string[]) [0x00000] in
/home/esodan/Projects/gnomedb-sharp-tutorial-step1/Main.cs:9
  at (wrapper runtime-invoke)
System.Object.runtime_invoke_void_string[]
(object,intptr,intptr,intptr) <0xffffffff>

Native stacktrace:

	mono [0x815abd6]
	[0xffffe440]
	/lib/tls/i686/cmov/libc.so.6(abort+0x103) [0xb7cfbef3]
	/usr/lib/libglib-2.0.so.0(g_logv+0x4c2) [0xb7e72122]
	/usr/lib/libglib-2.0.so.0(g_log+0x29) [0xb7e72159]
	/usr/lib/libglib-2.0.so.0(g_malloc+0x79) [0xb7e70d29]
	/usr/lib/libgnome-2.so.0(gnome_program_preinit+0x11f) [0xb666bc5f]
	/usr/lib/libgnome-2.so.0 [0xb666cd75]
	/usr/lib/libgnome-2.so.0(gnome_program_init+0x59) [0xb666d099]
	/usr/lib/libgnomedb-3.so(gnome_db_init+0x114) [0xb6b07fd4]
	[0xb792aa9b]
	[0xb7921e6b]
	[0xb7921ada]
	[0xb79210fa]
	[0xb7921063]
	mono [0x8144910]
	mono(mono_runtime_invoke+0x27) [0x80d8487]
	mono(mono_runtime_exec_main+0x5c) [0x80d963c]
	mono(mono_runtime_run_main+0x182) [0x80d9222]
	mono(strftime+0x1c4a) [0x8058452]
	mono(mono_main+0x857) [0x8058e47]
	mono(__fxstat64+0x133) [0x80577bb]
	/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xdc) [0xb7ce68cc]
	mono(sinh+0x49) [0x8057711]

Debug info from gdb:

(no debugging symbols found)
Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread -1211341136 (LWP 12682)]
[New Thread -1220809824 (LWP 12686)]
[New Thread -1209132128 (LWP 12683)]
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
0xffffe410 in __kernel_vsyscall ()
  3 Thread -1209132128 (LWP 12683)  0xffffe410 in __kernel_vsyscall ()
  2 Thread -1220809824 (LWP 12686)  0xffffe410 in __kernel_vsyscall ()
  1 Thread -1211341136 (LWP 12682)  0xffffe410 in __kernel_vsyscall ()

Thread 3 (Thread -1209132128 (LWP 12683)):
#0  0xffffe410 in __kernel_vsyscall ()
#1  0xb7e36bf6 in __nanosleep_nocancel ()
   from /lib/tls/i686/cmov/libpthread.so.0
#2  0x08103e20 in mono_pthread_key_for_tls ()
#3  0xb7e30504 in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#4  0xb7d9e51e in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 2 (Thread -1220809824 (LWP 12686)):
#0  0xffffe410 in __kernel_vsyscall ()
#1  0xb7e33816 in pthread_cond_wait@@GLIBC_2.3.2 ()
   from /lib/tls/i686/cmov/libpthread.so.0
#2  0x0810913f in mono_pthread_key_for_tls ()
#3  0x081093db in mono_pthread_key_for_tls ()
#4  0x0810926e in mono_pthread_key_for_tls ()
#5  0x0810c89f in mono_pthread_key_for_tls ()
#6  0x080d4e1d in mono_gchandle_free ()
#7  0x08093322 in mono_signature_explicit_this ()
#8  0x080fa5e7 in mono_environment_exitcode_set ()
#9  0x08119fe5 in GC_end_blocking ()
#10 0xb7e30504 in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#11 0xb7d9e51e in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 1 (Thread -1211341136 (LWP 12682)):
#0  0xffffe410 in __kernel_vsyscall ()
#1  0xb7d97321 in select () from /lib/tls/i686/cmov/libc.so.6
#2  0xb7e94d10 in g_spawn_sync () from /usr/lib/libglib-2.0.so.0
#3  0xb7e950dc in g_spawn_command_line_sync () from /usr/lib/libglib-2.0.so.0
#4  0x0815ac6f in mono_debugger_run_finally ()
#5  <signal handler called>
#6  0xffffe410 in __kernel_vsyscall ()
#7  0xb7cfa770 in raise () from /lib/tls/i686/cmov/libc.so.6
#8  0xb7cfbef3 in abort () from /lib/tls/i686/cmov/libc.so.6
#9  0xb7e72122 in g_logv () from /usr/lib/libglib-2.0.so.0
#10 0xb7e72159 in g_log () from /usr/lib/libglib-2.0.so.0
#11 0xb7e70d29 in g_malloc () from /usr/lib/libglib-2.0.so.0
#12 0xb666bc5f in gnome_program_preinit () from /usr/lib/libgnome-2.so.0
#13 0xb666cd75 in gnome_program_postinit () from /usr/lib/libgnome-2.so.0
#14 0xb666d099 in gnome_program_init () from /usr/lib/libgnome-2.so.0
#15 0xb6b07fd4 in gnome_db_init () from /usr/lib/libgnomedb-3.so
#16 0xb792aa9b in ?? ()
#17 0x08300d48 in ?? ()
#18 0x08304cc0 in ?? ()
#19 0xbfaa4ddc in ?? ()
#20 0xbfaa4de0 in ?? ()
#21 0x00aa4dfc in ?? ()
#22 0xb7921e6b in ?? ()
#23 0x08201090 in ?? ()
#24 0x08200918 in ?? ()
#25 0x0820560c in ?? ()
#26 0x0004dfe0 in ?? ()
#27 0xbfaa4e54 in ?? ()
#28 0x00058fd8 in ?? ()
#29 0xbfaa4dc4 in ?? ()
#30 0xb792aa6c in ?? ()
#31 0xbfaa4dfc in ?? ()
#32 0xb7921e6b in ?? ()
#33 0x08300d48 in ?? ()
#34 0x08304cc0 in ?? ()
#35 0xbfaa4ddc in ?? ()
#36 0xbfaa4de0 in ?? ()
#37 0x00000000 in ?? ()
#0  0xffffe410 in __kernel_vsyscall ()

Aborted (core dumped)

-- 
Trabajar, la mejor arma para tu superación
"de grano en grano, se hace la arena" (R) (entrámite, pero para los
cuates: LIBRE)


More information about the Gtk-sharp-list mailing list