XFCalendar & DBH

edscott wilson garcia edscott at imp.mx
Thu Jul 10 15:24:21 CEST 2003


El jue, 10-07-2003 a las 01:19, Mickael Graf escribió:
> Here it comes:
> 
> Program received signal SIGSEGV, Segmentation fault.
> 0x405d4a7e in _int_free () from /lib/libc.so.6
> (gdb) backtrace
> #0  0x405d4a7e in _int_free () from /lib/libc.so.6
> #1  0x405d385c in free () from /lib/libc.so.6
> #2  0x405377ee in DBH_size (node=0x408, record_length=135702688) at 
> dbh_s.c:776
> #3  0x40536d3e in DBH_write (newinfo=0 '\0', node=0x8161df8, 
> write_branches=1 '\001') at dbh_s.c:328
> #4  0x40538234 in DBH_update (node=0x8161df8) at dbh_v.c:282
> #5  0x0804c143 in on_btSave_clicked (button=0x813bfb0, user_data=0x0) at 
> callbacks.c:399

This says that at callbacks.c:399, xfcalendar is trying to write a
record of length 135702688 (135 MB), which is definitely wrong. It means
that the strlen function failed. Try the following patch. Maybe the
DBH_Size function only works on an open DBHashTable.

BTW, xfcalendar does not compile on gtk-2.0.6:

/fast/CVS/sourceforge/xfce/xfce4-extras/xfcalendar/src/main.c:185:
undefined reference to `gdk_screen_get_default'
/fast/CVS/sourceforge/xfce/xfce4-extras/xfcalendar/src/main.c:185:
undefined reference to `GDK_SCREEN_XSCREEN'


regards,

Edscott


> #6  0x404a9d57 in g_cclosure_marshal_VOID__VOID () from 
> /usr/lib/libgobject-2.0.so.0
> #7  0x40496ec7 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
> #8  0x404a9963 in g_signal_emit_by_name () from /usr/lib/libgobject-2.0.so.0
> #9  0x404a8988 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
> #10 0x404a8bc4 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
> #11 0x401888bb in gtk_button_clicked () from /usr/lib/libgtk-x11-2.0.so.0
> #12 0x401898ab in _gtk_button_paint () from /usr/lib/libgtk-x11-2.0.so.0
> #13 0x404a9d57 in g_cclosure_marshal_VOID__VOID () from 
> /usr/lib/libgobject-2.0.so.0
> #14 0x40497237 in g_cclosure_new_swap () from /usr/lib/libgobject-2.0.so.0
> #15 0x40496ec7 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
> #16 0x404a91ef in g_signal_emit_by_name () from /usr/lib/libgobject-2.0.so.0
> #17 0x404a8988 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
> #18 0x404a8bc4 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
> #19 0x401887fb in gtk_button_released () from /usr/lib/libgtk-x11-2.0.so.0
> #20 0x4018972b in _gtk_button_paint () from /usr/lib/libgtk-x11-2.0.so.0
> #21 0x40213b6f in _gtk_marshal_BOOLEAN__BOXED () from 
> /usr/lib/libgtk-x11-2.0.so.0
> #22 0x40497237 in g_cclosure_new_swap () from /usr/lib/libgobject-2.0.so.0
> #23 0x40496ec7 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
> #24 0x404a9419 in g_signal_emit_by_name () from /usr/lib/libgobject-2.0.so.0
> #25 0x404a878d in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
> #26 0x404a8bc4 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
> #27 0x402f8f3b in gtk_widget_send_expose () from 
> /usr/lib/libgtk-x11-2.0.so.0
> #28 0x40213967 in gtk_propagate_event () from /usr/lib/libgtk-x11-2.0.so.0
> #29 0x40212665 in gtk_main_do_event () from /usr/lib/libgtk-x11-2.0.so.0
> #30 0x403d2c95 in _gdk_events_queue () from /usr/lib/libgdk-x11-2.0.so.0
> #31 0x404edc75 in g_get_current_time () from /usr/lib/libglib-2.0.so.0
> #32 0x404eece8 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
> #33 0x404eeffd in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
> #34 0x404ef6ff in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
> #35 0x40211e9f in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
> #36 0x0804e1c7 in main (argc=1, argv=0xbffff9b4) at main.c:205
> #37 0x40573bb4 in __libc_start_main () from /lib/libc.so.6
> 
> Cheers
> Mickael
> 
> edscott wilson garcia wrote:
> > El mi? 09-07-2003 a las 14:22, Mickael Graf escribió:
> > 
> >>Hi Edscott
> >>
> >>some days ago I reduce MAX_APP_LENGTH in callback.c from 4096 to 1024 
> >>coz DBH_update made the application crash with big volumes of text.
> >>
> >>Now it work fine, but I think 4096 is a good length...
> > 
> > 
> > DBH_Size is supposed to extend the maximum record size from 1024 to
> > whatever, say 4096. It should work. A backtrace might give us a hint as
> > to what is wrong.
> > 
> > regards,
> > 
> > Edscott
> >   
> > 
> >>Cheers
> >>
> >>Mickaël
> > 
> > 
> > _______________________________________________
> > Xfce4-dev mailing list
> > Xfce4-dev at xfce.org
> > http://moongroup.com/mailman/listinfo/xfce4-dev
> > 
> 
-------------- next part --------------
--- /fast/CVS/sourceforge/xfce/xfce4-extras/xfcalendar/src/callbacks.c-0	Wed Jul  9 20:43:58 2003
+++ /fast/CVS/sourceforge/xfce/xfce4-extras/xfcalendar/src/callbacks.c	Thu Jul 10 08:16:11 2003
@@ -374,10 +374,10 @@
 	
 
 	if (gtk_text_buffer_get_modified(tb)) {
-		DBH_Size(NULL,MAX_APP_LENGTH);
 		if ((fapp = DBH_open(fpath)) == NULL){
 			fapp = DBH_create(fpath,8) ;
 		}
+		DBH_Size(fapp,MAX_APP_LENGTH);
 		if (!fapp) {
 			g_warning("Cannot open file %s\n", fpath);
 		}


More information about the Xfce4-dev mailing list