From owner-freebsd-ports-bugs@FreeBSD.ORG Sun Apr 27 02:00:30 2003 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EFE4737B401 for ; Sun, 27 Apr 2003 02:00:30 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id D782B43FAF for ; Sun, 27 Apr 2003 02:00:29 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id h3R90TUp081812 for ; Sun, 27 Apr 2003 02:00:29 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id h3R90TGo081808; Sun, 27 Apr 2003 02:00:29 -0700 (PDT) Resent-Date: Sun, 27 Apr 2003 02:00:29 -0700 (PDT) Resent-Message-Id: <200304270900.h3R90TGo081808@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, macklobell@hotmail.com Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A7CC637B401; Sun, 27 Apr 2003 01:57:02 -0700 (PDT) Received: from tomten.homelinux.net (as7-3-3.ras.s.bonet.se [217.215.99.176]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9148743F3F; Sun, 27 Apr 2003 01:57:01 -0700 (PDT) (envelope-from root@tomten.homelinux.net) Received: from tomten.homelinux.net (localhost [127.0.0.1]) by tomten.homelinux.net (8.12.9/8.12.9) with ESMTP id h3R8uxfa053830; Sun, 27 Apr 2003 10:56:59 +0200 (CEST) (envelope-from root@tomten.homelinux.net) Received: (from root@localhost) by tomten.homelinux.net (8.12.9/8.12.9/Submit) id h3R8urcP053774; Sun, 27 Apr 2003 10:56:54 +0200 (CEST) Message-Id: <200304270856.h3R8urcP053774@tomten.homelinux.net> Date: Sun, 27 Apr 2003 10:56:54 +0200 (CEST) From: Charlie & To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 cc: billf@FreeBSD.org Subject: ports/51455: core dump when exiting ethereal X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: macklobell@hotmail.com List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Apr 2003 09:00:31 -0000 >Number: 51455 >Category: ports >Synopsis: core dump when exiting ethereal >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Apr 27 02:00:29 PDT 2003 >Closed-Date: >Last-Modified: >Originator: Charlie & >Release: FreeBSD 5.0-CURRENT i386 >Organization: >Environment: System: FreeBSD volvo.tomten.homelinux.net 5.0-CURRENT FreeBSD 5.0-CURRENT #0: Fri Apr 18 09:54:38 CEST 2003 root@volvo.tomten.homelinux.net:/usr/obj/usr/src/sys/KERNEL16 i386 root/usr/ports/net/ethereal#pkg_info | grep gtk-1.2 gtk-1.2.10_9 Gimp Toolkit for X11 GUI (previous stable version) >Description: Everytime i close ethereal the program core dumps. I ran the program in gdb and i can see that a bad pointer is used. The line that causes the crash is main.c:2320, here is part of the trace: Program received signal SIGBUS, Bus error. 0x287a5782 in gdk_window_get_size () from /usr/X11R6/lib/libgdk12.so.2 (gdb) where #0 0x287a5782 in gdk_window_get_size () from /usr/X11R6/lib/libgdk12.so.2 #1 0x08236dad in main (argc=0, argv=0xbfbff864) at main.c:2320 #2 0x08069faa in _start () (gdb) frame 1 #1 0x08236dad in main (argc=0, argv=0xbfbff864) at main.c:2320 2320 gdk_window_get_size(top_level->window, &top_width, &top_height); (gdb) list 2315 } 2316 2317 if (prefs->gui_geometry_save_size) { 2318 if (top_level->window != NULL) { 2319 /* XXX - Is this the "approved" method? */ 2320 gdk_window_get_size(top_level->window, &top_width, &top_height); 2321 } 2322 if (prefs->gui_geometry_main_width != top_width) { 2323 prefs->gui_geometry_main_width = top_width; 2324 prefs_write_needed = TRUE; (gdb) p top_level->window $2 = (struct _GdkWindow *) 0xd0d0d0d0 Here is my second trace, i have a watch on changes to top_level->window: (gdb) info breakpoints Num Type Disp Enb Address What 3 hw watchpoint keep y top_level->window (gdb) c Continuing. Hardware watchpoint 3: top_level->window Hardware watchpoint 3: top_level->window Hardware watchpoint 3: top_level->window Old value = (struct _GdkWindow *) 0x0 New value = (struct _GdkWindow *) 0x8695580 0x28756c6f in gtk_window_realize () from /usr/X11R6/lib/libgtk12.so.2 (gdb) where #0 0x28756c6f in gtk_window_realize () from /usr/X11R6/lib/libgtk12.so.2 #1 0x286ed0eb in gtk_marshal_NONE__NONE () from /usr/X11R6/lib/libgtk12.so.2 #2 0x2871b6bb in gtk_signal_real_emit () from /usr/X11R6/lib/libgtk12.so.2 #3 0x28719874 in gtk_signal_emit () from /usr/X11R6/lib/libgtk12.so.2 #4 0x2874c7af in gtk_widget_realize () from /usr/X11R6/lib/libgtk12.so.2 #5 0x28756755 in gtk_window_show () from /usr/X11R6/lib/libgtk12.so.2 #6 0x286ed0eb in gtk_marshal_NONE__NONE () from /usr/X11R6/lib/libgtk12.so.2 #7 0x2871b6bb in gtk_signal_real_emit () from /usr/X11R6/lib/libgtk12.so.2 #8 0x28719874 in gtk_signal_emit () from /usr/X11R6/lib/libgtk12.so.2 #9 0x2874bbf2 in gtk_widget_show () from /usr/X11R6/lib/libgtk12.so.2 #10 0x08238217 in create_main_window (pl_size=280, tv_size=95, bv_size=75, prefs=0x8552500) at main.c:2737 #11 0x08236f75 in main (argc=0, argv=0xbfbff864) at main.c:2139 #12 0x08069faa in _start () (gdb) c Continuing. Hardware watchpoint 3: top_level->window Old value = (struct _GdkWindow *) 0x8695580 New value = (struct _GdkWindow *) 0x0 0x2875387a in gtk_widget_real_unrealize () from /usr/X11R6/lib/libgtk12.so.2 (gdb) where #0 0x2875387a in gtk_widget_real_unrealize () from /usr/X11R6/lib/libgtk12.so.2 #1 0x286ed0eb in gtk_marshal_NONE__NONE () from /usr/X11R6/lib/libgtk12.so.2 #2 0x2871b6bb in gtk_signal_real_emit () from /usr/X11R6/lib/libgtk12.so.2 #3 0x28719874 in gtk_signal_emit () from /usr/X11R6/lib/libgtk12.so.2 #4 0x2874c985 in gtk_widget_unrealize () from /usr/X11R6/lib/libgtk12.so.2 #5 0x28753235 in gtk_widget_shutdown () from /usr/X11R6/lib/libgtk12.so.2 #6 0x28755d53 in gtk_window_shutdown () from /usr/X11R6/lib/libgtk12.so.2 #7 0x286feb85 in gtk_object_destroy () from /usr/X11R6/lib/libgtk12.so.2 #8 0x2874bae1 in gtk_widget_destroy () from /usr/X11R6/lib/libgtk12.so.2 #9 0x286ebde1 in gtk_main_do_event () from /usr/X11R6/lib/libgtk12.so.2 #10 0x28794718 in gdk_event_dispatch () from /usr/X11R6/lib/libgdk12.so.2 #11 0x287c2a75 in g_main_dispatch () from /usr/local/lib/libglib12.so.3 #12 0x287c2f2c in g_main_iterate () from /usr/local/lib/libglib12.so.3 #13 0x287c3164 in g_main_run () from /usr/local/lib/libglib12.so.3 #14 0x286eb903 in gtk_main () from /usr/X11R6/lib/libgtk12.so.2 #15 0x08236c54 in main (argc=0, argv=0xbfbff864) at main.c:2275 #16 0x08069faa in _start () (gdb) c Continuing. Hardware watchpoint 3: top_level->window Old value = (struct _GdkWindow *) 0x0 New value = (struct _GdkWindow *) 0xd0d0d0d0 0x2897d4e7 in memset () from /usr/lib/libc.so.5 (gdb) where #0 0x2897d4e7 in memset () from /usr/lib/libc.so.5 #1 0x085c6f80 in ?? () #2 0x2897c7ea in tcflow () from /usr/lib/libc.so.5 #3 0x2897ca19 in free () from /usr/lib/libc.so.5 #4 0x287c3bf1 in g_free () from /usr/local/lib/libglib12.so.3 #5 0x287426f9 in gtk_type_free () from /usr/X11R6/lib/libgtk12.so.2 #6 0x286fecb5 in gtk_object_finalize () from /usr/X11R6/lib/libgtk12.so.2 #7 0x287533c1 in gtk_widget_finalize () from /usr/X11R6/lib/libgtk12.so.2 #8 0x287565b7 in gtk_window_finalize () from /usr/X11R6/lib/libgtk12.so.2 #9 0x28700b0d in gtk_object_unref () from /usr/X11R6/lib/libgtk12.so.2 #10 0x287544b9 in gtk_widget_unref () from /usr/X11R6/lib/libgtk12.so.2 #11 0x286ebd9e in gtk_main_do_event () from /usr/X11R6/lib/libgtk12.so.2 #12 0x28794718 in gdk_event_dispatch () from /usr/X11R6/lib/libgdk12.so.2 #13 0x287c2a75 in g_main_dispatch () from /usr/local/lib/libglib12.so.3 #14 0x287c2f2c in g_main_iterate () from /usr/local/lib/libglib12.so.3 #15 0x287c3164 in g_main_run () from /usr/local/lib/libglib12.so.3 #16 0x286eb903 in gtk_main () from /usr/X11R6/lib/libgtk12.so.2 #17 0x08236c54 in main (argc=0, argv=0xbfbff864) at main.c:2275 #18 0x08069faa in _start () (gdb) c Continuing. Program received signal SIGBUS, Bus error. 0x287a5782 in gdk_window_get_size () from /usr/X11R6/lib/libgdk12.so.2 (gdb) where #0 0x287a5782 in gdk_window_get_size () from /usr/X11R6/lib/libgdk12.so.2 #1 0x08236dad in main (argc=0, argv=0xbfbff864) at main.c:2320 #2 0x08069faa in _start () (gdb) p top_level->window $1 = (struct _GdkWindow *) 0xd0d0d0d0 The lesson to learn from these traces are that when the call to gtk_main() returns the top_level->window pointer is never NULL. Unfortunately i don't know gtk enough to help, but from what i can see there is no guarantee that top_level->window should be NULL after the call to gtk_main()?? My ugly (but working!!) solution is to save the pointer before the call to gtk_main() and then test after the call. E.g. struct _GdkWindow *gtkWindowCopy_ptr = top_level->window; gtk_main(); if (NULL != top_level->window && top_level->window != gtkWindowCopy_ptr) { top_level->window = NULL; } >How-To-Repeat: install ethereal, start the program and then exit the program. >Fix: >Release-Note: >Audit-Trail: >Unformatted: