I hacked a fix for function "a_Bookmarks_add" in src/bookmark.c that avoids the seg-fault and allow me to use bookmarks. Since I use malloc, sprintf and free instead of g_strdup_printf and g_free I don't submit it as patch, but I hope it'll help to find the clean fix. I attached the fixed "a_Bookmarks_add" at the bottom. -- Daniel On Mon, Mar 10, 2003 at 05:24:25PM +0200, Daniel Daboul wrote:
The new 0.7.1 bugfix release is out. It solves the problem of [...] whenever I choose "Bookmark this page" I get an immediate "Segmentation Fault (core dumped)" with no additional message. Below
On Mon, Mar 10, 2003 at 10:13:55AM -0400, Jorge Arellano Cid wrote: the top of gdb's output:
(gdb) where #0 0xfed81618 in _doprnt () from /usr/lib/libc.so.1 #1 0xfed85118 in vsprintf () from /usr/lib/libc.so.1 #2 0xff05229c in g_strdup_vprintf (format=0x0, args1=0xffbee5b8) at gstrfuncs.c:158 #3 0xff0522c8 in g_strdup_printf (format=0x0) at gstrfuncs.c:172 #4 0x0002fac4 in a_Bookmarks_add (widget=0x21aca8, client_data=0x140538) at bookmark.c:91 #5 0xff1c2054 in gtk_marshal_NONE__NONE (object=0x21aca8, func=0x1a87c <a_Commands_addbm_callback>,
Is that a problem in gdk? Here's what dillo is linked with: [...]
void a_Bookmarks_add(GtkWidget *widget, gpointer client_data) { BrowserWindow *bw = (BrowserWindow *)client_data; gchar *title; DilloUrl *url; char *cmd = (char *)malloc(100);//NULL; url = a_Menu_popup_get_url(bw); g_return_if_fail(url != NULL); /* if the page has no title, we'll use the url string */ title = (gchar *) a_History_get_title_by_url(url, 1); sprintf(cmd,"<dpi cmd='add_bookmark' url='%s' title='%s'>",URL_STR(url), title); //g_strdup_printf(cmd,"<dpi cmd='add_bookmark' url='%s' title='%s'>", URL_STR(url), title); a_Bookmarks_chat_add(bw, cmd, NULL); free(cmd); //g_free(cmd); }