ports/118202: [patch] wxgtk26 + gtk20 incompatibility crashes audio/audacity

Henrik Gulbrandsen henrik at gulbra.net
Thu Nov 22 16:40:01 UTC 2007


>Number:         118202
>Category:       ports
>Synopsis:       [patch] wxgtk26 + gtk20 incompatibility crashes audio/audacity
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Nov 22 16:40:01 UTC 2007
>Closed-Date:
>Last-Modified:
>Originator:     Henrik Gulbrandsen
>Release:        7.0-BETA3
>Organization:
>Environment:
FreeBSD Particle 7.0-BETA3 FreeBSD 7.0-BETA3 #0: Wed Nov 21 12:44:38 CET 2007
henrik at Particle:/usr/src/sys/i386/compile/GENERIC  i386

>Description:
The audio/audacity port segfaults in 7.0-BETA3. If the $HOME/.audacity file is
missing, this happens immediately at startup. It turns out that the wxWidgets
port (x11-toolkits/wxgtk26) is incompatible with a recent upgrade of the GTK+
port (x11-toolkits/gtk20) from 2.10.14 to 2.12.1, since GtkBorder objects can
no longer be released with g_free(). Attempting to do so anyway will instead
release a large block of internal data structures needed for memory allocation
in GLib, leading to extensive memory corruption and premature death.

Note that many programs using the wxgtk26 port are likely to be affected by this
bug in more or less subtle ways. The required patches are already included in
wx-2.8.x and are not needed for wx-2.4.x, so this is specific to wxgtk26.

>How-To-Repeat:
Memory corruption problems can be tricky to reproduce, but I would try removing
any pre-existing $HOME/.audacity file before starting audacity. The bug may also
depend on the actual GTK theme in use, so you might need some variation there.

>Fix:
The attached shell archive contains two single-line patches suitable for the
x11-toolkits/wxgtk26/files directory. With a lack of bad luck, that's it!


Patch attached with submission follows:

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	patch-src-gtk-button.cpp
#	patch-src-gtk-window.cpp
#
echo x - patch-src-gtk-button.cpp
sed 's/^X//' >patch-src-gtk-button.cpp << 'END-of-patch-src-gtk-button.cpp'
X--- src/gtk/button.cpp.orig	2006-03-22 00:42:16.000000000 +0100
X+++ src/gtk/button.cpp	2007-11-22 14:00:47.000000000 +0100
X@@ -89,7 +89,7 @@
X             right_border += default_border->right;
X             top_border += default_border->top;
X             bottom_border += default_border->bottom;
X-            g_free( default_border );
X+            gtk_border_free( default_border );
X         }
X #else
X         left_border = 6;
END-of-patch-src-gtk-button.cpp
echo x - patch-src-gtk-window.cpp
sed 's/^X//' >patch-src-gtk-window.cpp << 'END-of-patch-src-gtk-window.cpp'
X--- src/gtk/window.cpp.orig	2006-03-22 00:42:17.000000000 +0100
X+++ src/gtk/window.cpp	2007-11-22 14:01:22.000000000 +0100
X@@ -3279,7 +3279,7 @@
X                 right_border += default_border->right;
X                 top_border += default_border->top;
X                 bottom_border += default_border->bottom;
X-                g_free( default_border );
X+                gtk_border_free( default_border );
X             }
X #else
X             left_border = 6;
END-of-patch-src-gtk-window.cpp
exit



>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list