From owner-freebsd-ports Sat Nov 30 15:38:40 2002 Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7CC6637B401; Sat, 30 Nov 2002 15:38:36 -0800 (PST) Received: from hotmail.com (f97.law14.hotmail.com [64.4.21.97]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2FA6543EAF; Sat, 30 Nov 2002 15:38:36 -0800 (PST) (envelope-from macklobell@hotmail.com) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Sat, 30 Nov 2002 15:38:08 -0800 Received: from 217.215.99.176 by lw14fd.law14.hotmail.msn.com with HTTP; Sat, 30 Nov 2002 23:38:07 GMT X-Originating-IP: [217.215.99.176] From: "Mack Lobell" To: ports@FreeBSD.org Cc: billf@FreeBSD.org Subject: Ethereal core dumping Date: Sat, 30 Nov 2002 23:38:07 +0000 Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: X-OriginalArrivalTime: 30 Nov 2002 23:38:08.0094 (UTC) FILETIME=[896807E0:01C298C9] Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Everytime i close (hit the X with the mouse) ethereal, the program core dumps (SIGBUS). This happens eveytime i close the program this way. It looks like the gtk lib is doing something bad with a window reference. A check is made in the code if the window pointer is != NULL, if so a call is made into the gtk lib with the pointer value as the first argument. I did a litle amateur debugging, here are the traces: root~#uname -a FreeBSD volvo.tomten.homelinux.net 5.0-CURRENT FreeBSD 5.0-CURRENT #0: Sun Nov 17 23:11:17 CET 2002 root@volvo.tomten.homelinux.net:/usr/obj/usr/src/sys/KERNEL10 i386 root~#pkg_info | grep gtk gtk-1.2.10_9 Gimp Toolkit for X11 GUI (previous stable version (gdb) info breakpoints Num Type Disp Enb Address What 1 breakpoint keep y 0x08203a38 in main at main.c:2024 2 breakpoint keep y 0x08203a3d in main at main.c:2042 3 breakpoint keep y 0x08202987 in main at main.c:1201 (gdb) run Starting program: /usr/ports/net/ethereal/work/ethereal-0.9.7/.libs/ethereal Breakpoint 3, main (argc=1, argv=0xbfbff864) at main.c:1201 (gdb) p top_level $1 = (struct _GtkWidget *) 0x0 (gdb) list 1196 #endif 1197 char *s; 1198 int i; 1199 int opt; 1200 extern char *optarg; 1201 gboolean arg_error = FALSE; 1202 #ifdef HAVE_LIBPCAP 1203 #ifdef HAVE_PCAP_VERSION 1204 extern char pcap_version[]; 1205 #endif /* HAVE_PCAP_VERSION */ (gdb) c Continuing. Breakpoint 1, main (argc=0, argv=0xbfbff868) at main.c:2024 (gdb) list 2019 } 2020 #else 2021 set_menus_for_capture_in_progress(FALSE); 2022 #endif 2023 2024 gtk_main(); 2025 2026 /* Try to save our geometry. GTK+ provides two routines to get a 2027 window's position relative to the X root window. If I understand the 2028 documentation correctly, gdk_window_get_deskrelative_origin applies (gdb) p top_level $2 = (struct _GtkWidget *) 0x8566900 (gdb) p top_level->window $3 = (struct _GdkWindow *) 0x8623980 (gdb) watch top_level->window Hardware watchpoint 4: top_level->window (gdb) info breakpoints Num Type Disp Enb Address What 1 breakpoint keep y 0x08203a38 in main at main.c:2024 breakpoint already hit 1 time 2 breakpoint keep y 0x08203a3d in main at main.c:2042 3 breakpoint keep y 0x08202987 in main at main.c:1201 breakpoint already hit 1 time 4 hw watchpoint keep y top_level->window (gdb) c Continuing. ******************************* *** Here is ethereal closed *** ******************************* Hardware watchpoint 4: top_level->window Old value = (struct _GdkWindow *) 0x8623980 New value = (struct _GdkWindow *) 0x0 0x2868ce0a in gtk_widget_real_unrealize () from /usr/X11R6/lib/libgtk12.so.2 (gdb) c Continuing. Hardware watchpoint 4: top_level->window Old value = (struct _GdkWindow *) 0x0 New value = (struct _GdkWindow *) 0xd0d0d0d0 0x288b0bab in memset () from /usr/lib/libc.so.5 (gdb) c Continuing. Breakpoint 2, main (argc=0, argv=0xbfbff868) at main.c:2042 (gdb) list 2037 http://mail.gnome.org/archives/gtk-devel-list/2001-March/msg00289.html 2038 http://www.gtk.org/faq/#AEN600 */ 2039 2040 /* Re-read our saved preferences. */ 2041 /* XXX - Move all of this into a separate function? */ 2042 prefs = read_prefs(&gpf_open_errno, &gpf_path, &pf_open_errno, &pf_path); 2043 2044 if (pf_path == NULL) { 2045 if (prefs->gui_geometry_save_position) { 2046 if (top_level->window != NULL) { ************************************************************ *** Line 2047 shows the call with the errorneous pointer *** ************************************************************ (gdb) list 2047 gdk_window_get_root_origin(top_level->window, &root_x, &root_y); 2048 if (gdk_window_get_deskrelative_origin(top_level->window, 2049 &desk_x, &desk_y)) { 2050 if (desk_x <= root_x && desk_y <= root_y) { 2051 root_x = desk_x; 2052 root_y = desk_y; 2053 } 2054 } 2055 } 2056 if (prefs->gui_geometry_main_x != root_x) { (gdb) c Continuing. Program received signal SIGBUS, Bus error. 0x286e4c1e in gdk_window_get_size () from /usr/X11R6/lib/libgdk12.so.2 (gdb) _________________________________________________________________ STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message