Package: dia
Severity: normal
Version: 0.86
Synopsis: "About" menu option crashes dia, plus libxml2 warning
Class: sw-bug
System: SunOS 5.6 sun4u sparc
C compiler: 2.95.2
glib: 1.2.8
GTK+: 1.2.8
ORBit: ORBit 0.5.3
gnome-libs: gnome-libs 1.2.3
libxml: 2.2.1
gnome-print: gnome-print-0.20
gnome-core: gnome-core 1.2.1
Description:
I compiled Dia 0.86 this morning, and it crashed when I clicked on the
"About" menu. Here's a patch that cures this problem:
*** app/commands.c.orig Tue Aug 1 07:56:31 2000
--- app/commands.c Mon Aug 7 13:16:59 2000
***************
*** 496,502 ****
gdk_pixbuf_render_pixmap_and_mask(logo, &pixmap, &bitmap, 128);
gpixmap = gtk_pixmap_new(pixmap, bitmap);
gdk_pixmap_unref(pixmap);
! gdk_bitmap_unref(bitmap);
#else
gdk_imlib_render(logo, logo->rgb_width, logo->rgb_height);
frame = gtk_frame_new (NULL);
--- 496,503 ----
gdk_pixbuf_render_pixmap_and_mask(logo, &pixmap, &bitmap, 128);
gpixmap = gtk_pixmap_new(pixmap, bitmap);
gdk_pixmap_unref(pixmap);
! if (bitmap != NULL)
! gdk_bitmap_unref(bitmap);
#else
gdk_imlib_render(logo, logo->rgb_width, logo->rgb_height);
frame = gtk_frame_new (NULL);
(It is possible for gdk_pixbuf_render_pixmap_and_mask() to return a
NULL
pointer for the mask, which is why it can crash.)
Also, if you get reports about dia crashing on startup, it could be
because
it's causing a bug in libxml2-2.2.1 to manifest itself; this bug is
only
found on systems where LIBXML_ICONV_ENABLED is set (such as on my
Solaris
2.6 system). The cure for this is to get the latest copy of the file
"encoding.c" from the CVS archive at:
http://dev.w3.org/cvsweb/XML/