Hi! The new 0.7.1 bugfix release is out. It solves the problem of disappearing bookmarks and some other minor things. It works on 64bit machines and some problems remain on _some_ Solaris stations; these should be fixed in 0.7.2. Please upgrade ASAP!!! Cheers Jorge.- PS: I want to thank the few people who helped to debug it and sent some feedback.
On Mon, Mar 10, 2003 at 10:13:55AM -0400, Jorge Arellano Cid wrote:
The new 0.7.1 bugfix release is out. It solves the problem of
Indeed it now compiles out-of-the-box here on Solaris (SunOS 5.8 Generic_108528-13 sun4u sparc SUNW,Ultra-1) with gcc-3.2.2. But still whenever I choose "Bookmark this page" I get an immediate "Segmentation Fault (core dumped)" with no additional message. Below 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: ldd src/dillo libgtk-1.2.so.0 => /users/danield/.r/lib/libgtk-1.2.so.0 libgdk-1.2.so.0 => /users/danield/.r/lib/libgdk-1.2.so.0 libgmodule-1.2.so.0 => /users/danield/.r/lib/libgmodule-1.2.so.0 libglib-1.2.so.0 => /users/danield/.r/lib/libglib-1.2.so.0
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); }
On Mon, Mar 10, 2003 at 08:37:09PM +0200, Daniel Daboul wrote:
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
well, your solution is the old version of that function :-) a fix I sent to Jorge earlier would be (it might even get acceptexd ;-) ...) : --- src/bookmark.c.orig Mon Mar 10 19:13:26 2003 +++ src/bookmark.c Mon Mar 10 18:47:22 2003 @@ -80,7 +80,7 @@ BrowserWindow *bw = (BrowserWindow *)client_data; gchar *title; DilloUrl *url; - char *cmd = NULL; + gchar *cmd = NULL; url = a_Menu_popup_get_url(bw); g_return_if_fail(url != NULL); @@ -88,7 +88,7 @@ /* if the page has no title, we'll use the url string */ title = (gchar *) a_History_get_title_by_url(url, 1); - g_strdup_printf(cmd, "<dpi cmd='add_bookmark' url='%s' title='%s'>", + cmd = g_strdup_printf("<dpi cmd='add_bookmark' url='%s' title='%s'>", URL_STR(url), title); a_Bookmarks_chat_add(bw, cmd, NULL); g_free(cmd); Cheers Andreas -- **************************** NEW ADDRESS ****************************** Hamburger Sternwarte Universitaet Hamburg Gojenbergsweg 112 Tel. ++49 40 42891 4016 D-21029 Hamburg, Germany Fax. ++49 40 42891 4198
On Mon, Mar 10, 2003 at 07:45:18PM +0100, Andreas Schweitzer wrote:
well, your solution is the old version of that function :-) a fix I sent to Jorge earlier would be (it might even get acceptexd ;-) ...) :
Your patch is much better, I'm using it now. The limit of 100 in my malloc() allowed for only short bookmarks anyway ;-) Daniel
On Mon, 10 Mar 2003 19:45:18 +0100 Andreas Schweitzer <Andreas.Schweitzer@hs.uni-hamburg.de> wrote:
On Mon, Mar 10, 2003 at 08:37:09PM +0200, Daniel Daboul wrote:
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
well, your solution is the old version of that function :-) a fix I sent to Jorge earlier would be (it might even get acceptexd ;-) ...) :
--- src/bookmark.c.orig Mon Mar 10 19:13:26 2003 +++ src/bookmark.c Mon Mar 10 18:47:22 2003 @@ -80,7 +80,7 @@ BrowserWindow *bw = (BrowserWindow *)client_data; gchar *title; DilloUrl *url; - char *cmd = NULL; + gchar *cmd = NULL;
url = a_Menu_popup_get_url(bw); g_return_if_fail(url != NULL); @@ -88,7 +88,7 @@ /* if the page has no title, we'll use the url string */ title = (gchar *) a_History_get_title_by_url(url, 1);
- g_strdup_printf(cmd, "<dpi cmd='add_bookmark' url='%s' title='%s'>", + cmd = g_strdup_printf("<dpi cmd='add_bookmark' url='%s' title='%s'>", URL_STR(url), title); a_Bookmarks_chat_add(bw, cmd, NULL); g_free(cmd);
It seems strange to me it has worked at all before, even though I thought I had tested add bookmark. However, the above is clearly correct, and now it works beautifully. -- //Hugo Hallqvist
It seems strange to me it has worked at all before, even though I thought I had tested add bookmark. However, the above is clearly correct, and now it works beautifully.
If you check the CVS history, the core-dumping version was introduced only very recently. Before, it was a sprintf solution. If you ask me, it is more like a typo in converting from sprintf to g_strdup_printf. Cheers Andreas -- **************************** NEW ADDRESS ****************************** Hamburger Sternwarte Universitaet Hamburg Gojenbergsweg 112 Tel. ++49 40 42891 4016 D-21029 Hamburg, Germany Fax. ++49 40 42891 4198
On Mon, 10 Mar 2003 20:12:33 +0100 Andreas Schweitzer <Andreas.Schweitzer@hs.uni-hamburg.de> wrote:
It seems strange to me it has worked at all before, even though I thought I had tested add bookmark. However, the above is clearly correct, and now it works beautifully.
If you check the CVS history, the core-dumping version was introduced only very recently. Before, it was a sprintf solution. If you ask me, it is more like a typo in converting from sprintf to g_strdup_printf.
Then maybe I _had_ added bookmarks after all :). Anyway, thanks for fixing it. -- //Hugo Hallqvist
participants (4)
-
Andreas Schweitzer
-
Daniel Daboul
-
hugo hallqvist
-
Jorge Arellano Cid