Bug#505832: python-gtk2: segfault with invalid $DISPLAY
Timo Juhani Lindfors
timo.lindfors at iki.fi
Sat Nov 15 23:33:23 UTC 2008
Package: python-gtk2
Version: 2.12.1-6
Severity: normal
Steps to reproduce:
1) cat > prog.py <<EOF
import gobject
import pygtk
import gtk
loop = gobject.MainLoop()
w = gtk.Window(gtk.WINDOW_TOPLEVEL)
w.set_default_size(480, 300)
w.show()
vbox = gtk.VBox(False, 0)
w.add(vbox)
vbox.show()
loop.run()
EOF
2) DISPLAY=:99 python prog.py
Expected results:
2) python-gtk complains about not being able to connect to DISPLAY :99
Actual results:
2) python-gtk prints a lot of warnings and then segfaults:
/var/lib/python-support/python2.5/gtk-2.0/gtk/__init__.py:72: GtkWarning: could not open display
warnings.warn(str(e), _gtk.Warning)
kapula:7: Warning: invalid (NULL) pointer instance
w = gtk.Window(gtk.WINDOW_TOPLEVEL)
kapula:7: Warning: g_signal_connect_data: assertion `G_TYPE_CHECK_INSTANCE (instance)' failed
w = gtk.Window(gtk.WINDOW_TOPLEVEL)
kapula:9: GtkWarning: Screen for GtkWindow not set; you must always set
a screen for a GtkWindow before using the window
w.show()
kapula:9: GtkWarning: gdk_screen_get_default_colormap: assertion `GDK_IS_SCREEN (screen)' failed
w.show()
kapula:9: GtkWarning: gdk_colormap_get_visual: assertion `GDK_IS_COLORMAP (colormap)' failed
w.show()
kapula:9: GtkWarning: gdk_screen_get_root_window: assertion `GDK_IS_SCREEN (screen)' failed
w.show()
kapula:9: GtkWarning: gdk_window_new: assertion `GDK_IS_WINDOW (parent)' failed
w.show()
kapula:9: GtkWarning: gdk_window_enable_synchronized_configure: assertion `GDK_IS_WINDOW (window)' failed
w.show()
kapula:9: GtkWarning: gdk_window_set_user_data: assertion `window != NULL' failed
w.show()
kapula:9: GtkWarning: gtk_style_attach: assertion `window != NULL' failed
w.show()
kapula:9: GtkWarning: gtk_style_set_background: assertion `GTK_IS_STYLE (style)' failed
w.show()
kapula:9: GtkWarning: gtk_paint_flat_box: assertion `GTK_IS_STYLE (style)' failed
w.show()
kapula:9: GtkWarning: gdk_window_set_accept_focus: assertion `GDK_IS_WINDOW (window)' failed
w.show()
kapula:9: GtkWarning: gdk_window_set_focus_on_map: assertion `GDK_IS_WINDOW (window)' failed
w.show()
kapula:9: GtkWarning: gdk_window_set_modal_hint: assertion `GDK_IS_WINDOW (window)' failed
w.show()
kapula:9: GtkWarning: gtk_window_realize_icon: assertion `widget->window != NULL' failed
w.show()
kapula:9: GtkWarning: gdk_window_set_geometry_hints: assertion `GDK_IS_WINDOW (window)' failed
w.show()
kapula:9: GtkWarning: gdk_window_unmaximize: assertion `GDK_IS_WINDOW (window)' failed
w.show()
kapula:9: GtkWarning: gdk_window_unstick: assertion `GDK_IS_WINDOW (window)' failed
w.show()
kapula:9: GtkWarning: gdk_window_deiconify: assertion `GDK_IS_WINDOW (window)' failed
w.show()
kapula:9: GtkWarning: gdk_window_unfullscreen: assertion `GDK_IS_WINDOW (window)' failed
w.show()
kapula:9: GtkWarning: gdk_window_set_keep_above: assertion `GDK_IS_WINDOW (window)' failed
w.show()
kapula:9: GtkWarning: gdk_window_set_keep_below: assertion `GDK_IS_WINDOW (window)' failed
w.show()
kapula:9: GtkWarning: gdk_window_show: assertion `GDK_IS_WINDOW (window)' failed
w.show()
kapula:12: Warning: g_object_ref: assertion `G_IS_OBJECT (object)' failed
w.add(vbox)
kapula:12: GtkWarning: gtk_style_attach: assertion `window != NULL' failed
w.add(vbox)
kapula:13: GtkWarning: _gtk_style_peek_property_value: assertion `GTK_IS_STYLE (style)' failed
vbox.show()
Segmentation fault (core dumped)
More info:
1) gdb shows
(gdb) bt
#0 0xb785e4e7 in gtk_widget_style_get_valist () from /usr/lib/libgtk-x11-2.0.so.0
#1 0xb785e726 in gtk_widget_style_get () from /usr/lib/libgtk-x11-2.0.so.0
#2 0xb785e7bf in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#3 0x082dcc18 in ?? ()
#4 0xb795a03f in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#5 0xbf8348c8 in ?? ()
#6 0x00000000 in ?? ()
(gdb) x/5i $eip
0xb785e4e7 <gtk_widget_style_get_valist+247>: mov (%eax),%eax
0xb785e4e9 <gtk_widget_style_get_valist+249>: mov %eax,(%esp)
0xb785e4ec <gtk_widget_style_get_valist+252>: call 0xb762ca80 <g_type_value_table_peek at plt>
0xb785e4f1 <gtk_widget_style_get_valist+257>: mov -0x60(%ebp),%edi
0xb785e4f4 <gtk_widget_style_get_valist+260>: mov $0x10,%ecx
(gdb) p $eax
$1 = 0
-- System Information:
Debian Release: lenny/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.18-6-686-bigmem (SMP w/1 CPU core)
Locale: LANG=C, LC_CTYPE=fi_FI (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/bash
Versions of packages python-gtk2 depends on:
ii libatk1.0-0 1.22.0-1 The ATK accessibility toolkit
ii libc6 2.7-15 GNU C Library: Shared libraries
ii libcairo2 1.6.4-6.1 The Cairo 2D vector graphics libra
ii libglib2.0-0 2.16.6-1 The GLib library of C routines
ii libgtk2.0-0 2.12.11-4 The GTK+ graphical user interface
ii libpango1.0-0 1.20.5-3 Layout and rendering of internatio
ii python 2.5.2-3 An interactive high-level object-o
ii python-cairo [python2.5-cairo 1.4.12-1.1 Python bindings for the Cairo vect
ii python-gobject [python2.5-gob 2.14.2-1 Python bindings for the GObject li
ii python-numeric [python2.5-num 24.2-9 Numerical (matrix-oriented) Mathem
ii python-support 0.8.7 automated rebuilding support for P
pn python2.4-cairo <none> (no description available)
pn python2.4-gobject <none> (no description available)
pn python2.4-numeric <none> (no description available)
ii python2.5 2.5.2-11.1 An interactive high-level object-o
python-gtk2 recommends no packages.
Versions of packages python-gtk2 suggests:
pn python-gtk2-doc <none> (no description available)
-- no debconf information
More information about the pkg-gnome-maintainers
mailing list