realloc problem in gnome_init_with_popt_table



Hi, I'm trying to find a memory leak in my code but debanch dosen't get
past the call to gnome_init_with_popt_table

this is what debanch says 

rob samantha:~/projects/robs_gchord$ debauch -a src/gchord --disable-crash-dialog --g-fatal-warnings --db_file=src/small.gchordDb.xml
/usr/bin/debauch: line 35:  1636 Segmentation fault      (core dumped)
DebauchWarnReferenced=$fullwarn DebauchWarnUnreferenced=$fullwarn
LD_PRELOAD=/usr/lib/libdebauch.so $OBJ $* 2>$OUT
Reallocing from something not allocated
Reallocing from something not allocated

this is how I'm calling gnome_init_with_popt_table

gchar *defaultDbFile = NULL;

int
main (int argc, char *argv[])
{
//	GError *error;

	GChord *gchord;

	struct poptOption options[] = {
		{
			"db_file",
			'\0',
			POPT_ARG_STRING,
			&defaultDbFile,
			0,
			"Use the file DB_FILE instead of the default.",
			"DB_FILE"
		},
		{
			NULL,
			'\0',
			0,
			NULL,
			0,
			NULL,
			NULL
		}
	};

#ifdef ENABLE_NLS
	bindtextdomain (PACKAGE, PACKAGE_LOCALE_DIR);
	textdomain (PACKAGE);
#endif

	gnome_init_with_popt_table (PACKAGE, VERSION, argc, argv,
				    options, 0, NULL);
	

Am I doing something wrong here or is there a problem with
gnome_init_with_popt_table?

these are the functions called which are causeing the problem

#9  0x0805206d in main (argc=4, argv=0xbffff9b4) at main.c:48
(gdb) down
#8  0x400972ab in gnome_init_with_popt_table () from
/usr/lib/libgnomeui.so.32
(gdb) down
#7  0x403ae61c in gnomelib_init () from /usr/lib/libgnome.so.32
(gdb) down
#6  0x403ae575 in gnome_paper_convert_to_points () from
/usr/lib/libgnome.so.32
(gdb) down
#5  0x403ab119 in gnomelib_register_popt_table () from
/usr/lib/libgnome.so.32
(gdb) down
#4  0x404ad5b1 in g_array_append_vals () from /usr/lib/libglib-1.2.so.0
(gdb) down
#3  0x404ad911 in g_array_remove_index_fast () from
/usr/lib/libglib-1.2.so.0
(gdb) down
#2  0x404b875e in g_realloc () from /usr/lib/libglib-1.2.so.0
(gdb) down
#1  0x40018217 in realloc () from /usr/lib/libdebauch.so
(gdb)

this is on an upto date debian woody (gnome-libs 1.4.1.4)

thanks 
-- 

rob




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]