Bug#579723: hamster-applet: Crashes at start-up
As the colordepth is not used in these Pixmap objects. The author is going to simply set it to 1. For the current version. -- Étienne Loks --- facttree.py.origin 2010-07-20 17:23:41.161856511 +0200 +++ facttree.py 2010-07-20 17:22:39.490354401 +0200 @@ -89,7 +101,7 @@ self.box = None -pixmap = gtk.gdk.Pixmap(None, 10, 10, 24) +pixmap = gtk.gdk.Pixmap(None, 10, 10, 1) _test_context = pixmap.cairo_create() self._test_layout = _test_context.create_layout() font = pango.FontDescription(gtk.Style().font_desc.to_string()) @@ -454,7 +466,7 @@ return None fact = self.data -pixmap = gtk.gdk.Pixmap(None, 10, 10, 24) +pixmap = gtk.gdk.Pixmap(None, 10, 10, 1) context = pixmap.cairo_create() layout = context.create_layout() -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#579723: hamster-applet: Crashes at start-up
The error is for screen with colordepth different of 24 bits. A patch is attached to correct this. The patch has been also submited upstream. -- Étienne Loks --- facttree.py.origin 2010-07-20 11:31:32.633604826 +0200 +++ facttree.py 2010-07-20 11:30:32.989652290 +0200 @@ -45,6 +45,16 @@ else: cell.set_property(stock_id, gtk-edit) +def get_colordepth(): +depth = 24 +screen = gtk.gdk.screen_get_default() +if not screen: +return depth +visual = screen.get_system_visual() +if not visual: +return depth +return visual.depth + class FactTree(gtk.TreeView): __gsignals__ = { edit-clicked: (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, (gobject.TYPE_PYOBJECT, )), @@ -89,7 +99,7 @@ self.box = None -pixmap = gtk.gdk.Pixmap(None, 10, 10, 24) +pixmap = gtk.gdk.Pixmap(None, 10, 10, get_colordepth()) _test_context = pixmap.cairo_create() self._test_layout = _test_context.create_layout() font = pango.FontDescription(gtk.Style().font_desc.to_string())
Bug#579723: hamster-applet: Crashes at start-up
The previous patch is OK for the git version. In the current debian version, the Pixmap constructor is appealed twice with the bad colordepth. New patch for the debian version. -- Étienne Loks --- facttree.py.origin 2010-07-20 17:23:41.161856511 +0200 +++ facttree.py 2010-07-20 17:22:39.490354401 +0200 @@ -45,6 +45,18 @@ else: cell.set_property(stock_id, gtk-edit) +def get_colordepth(): +depth = 24 +screen = gtk.gdk.screen_get_default() +if not screen: +return depth +visual = screen.get_system_visual() +if not visual: +return depth +return visual.depth + +COLOR_DEPTH = get_colordepth() + class FactTree(gtk.TreeView): __gsignals__ = { edit-clicked: (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, (gobject.TYPE_PYOBJECT, )), @@ -89,7 +101,7 @@ self.box = None -pixmap = gtk.gdk.Pixmap(None, 10, 10, 24) +pixmap = gtk.gdk.Pixmap(None, 10, 10, COLOR_DEPTH) _test_context = pixmap.cairo_create() self._test_layout = _test_context.create_layout() font = pango.FontDescription(gtk.Style().font_desc.to_string()) @@ -454,7 +466,7 @@ return None fact = self.data -pixmap = gtk.gdk.Pixmap(None, 10, 10, 24) +pixmap = gtk.gdk.Pixmap(None, 10, 10, COLOR_DEPTH) context = pixmap.cairo_create() layout = context.create_layout()
Bug#579723: hamster-applet: Crashes at start-up
Still doesn't work in 2.30.2-1. Attached is the output of hamster- standalone. Best regards, Andreas ** (hamster-standalone:22317): WARNING **: Trying to register gtype 'WnckWindowState' as enum when in fact it is of type 'GFlags' ** (hamster-standalone:22317): WARNING **: Trying to register gtype 'WnckWindowActions' as enum when in fact it is of type 'GFlags' ** (hamster-standalone:22317): WARNING **: Trying to register gtype 'WnckWindowMoveResizeMask' as enum when in fact it is of type 'GFlags' /usr/lib/pymodules/python2.6/hamster/widgets/facttree.py:95: GtkWarning: Using Cairo rendering requires the drawable argument to have a specified colormap. All windows have a colormap, however, pixmaps only have colormap by default if they were created with a non-NULL window argument. Otherwise a colormap must be set on them with gdk_drawable_set_colormap _test_context = pixmap.cairo_create() Traceback (most recent call last): File /usr/bin/hamster-standalone, line 536, in module app = ProjectHamster() File /usr/bin/hamster-standalone, line 78, in __init__ self.treeview = widgets.FactTree() File /usr/lib/pymodules/python2.6/hamster/widgets/facttree.py, line 95, in __init__ _test_context = pixmap.cairo_create() cairo.Error: NULL pointer
Bug#579723: hamster-applet: Crashes at start-up
Package: hamster-applet Version: 2.30.0.1-2 Severity: normal File: /usr/bin/gnome-time-tracker Tags: sid After upgrading to 2.30.0.1-2, the applet doesn't start at all. Starting /usr/bin/gnome-time-tracker from the command line results in this output: $ /usr/bin/gnome-time-tracker /usr/lib/pymodules/python2.5/hamster/widgets/facttree.py:95: GtkWarning: Using Cairo rendering requires the drawable argument to have a specified colormap. All windows have a colormap, however, pixmaps only have colormap by default if they were created with a non-NULL window argument. Otherwise a colormap must be set on them with gdk_drawable_set_colormap _test_context = pixmap.cairo_create() Traceback (most recent call last): File /usr/bin/gnome-time-tracker, line 536, in module app = ProjectHamster() File /usr/bin/gnome-time-tracker, line 78, in __init__ self.treeview = widgets.FactTree() File /usr/lib/pymodules/python2.5/hamster/widgets/facttree.py, line 95, in __init__ _test_context = pixmap.cairo_create() cairo.Error: NULL pointer After downgrading to 2.28.2-1, everything works again. -- System Information: Debian Release: squeeze/sid APT prefers unstable APT policy: (500, 'unstable') Architecture: i386 (i686) Kernel: Linux 2.6.32-4-686 (SMP w/1 CPU core) Locale: LANG=en_US.ISO-8859-1, lc_ctype=de...@euro (charmap=ISO-8859-15) Shell: /bin/sh linked to /bin/bash Versions of packages hamster-applet depends on: ii gconf2 2.28.1-3GNOME configuration database syste ii libatk1.0-0 1.30.0-1The ATK accessibility toolkit ii libc62.10.2-6Embedded GNU C Library: Shared lib ii libcairo21.8.10-4The Cairo 2D vector graphics libra ii libfontconfig1 2.8.0-2.1 generic font configuration library ii libfreetype6 2.3.11-1FreeType 2 font engine, shared lib ii libglib2.0-0 2.24.0-1The GLib library of C routines ii libgtk2.0-0 2.20.0-3The GTK+ graphical user interface ii libpango1.0-01.28.0-1Layout and rendering of internatio ii python 2.5.4-9 An interactive high-level object-o ii python-cairo 1.8.8-1+b1 Python bindings for the Cairo vect ii python-dbus 0.83.1-1simple interprocess messaging syst ii python-evolution 2.28.0-7+b1 Python bindings for the evolution ii python-gconf 2.28.1-1Python bindings for the GConf conf ii python-gnome22.28.1-1Python bindings for the GNOME desk ii python-gnomeapplet 2.28.0-7+b1 Python bindings for the GNOME pane ii python-gobject 2.21.1-1Python bindings for the GObject li ii python-gtk2 2.17.0-2Python bindings for the GTK+ widge ii python-notify0.1.1-2+b2 Python bindings for libnotify ii python-support 1.0.8 automated rebuilding support for P ii python-wnck 2.28.0-7+b1 Python bindings for the WNCK libra ii python-xdg 0.19-1 Python library to access freedeskt hamster-applet recommends no packages. hamster-applet suggests no packages. -- no debconf information -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org