dockbarx crash: mask has no attribute 'scale_simple'

Bug #560517 reported by Eemil Lagerspetz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
DockbarX
Invalid
Undecided
Unassigned

Bug Description

Hi, on Lucid, Dockbarx crashes on me pretty randomly:

Traceback (most recent call last):
  File "/usr/bin/dockbarx.py", line 1624, in on_window_state_changed
    self.groupbutton.needs_attention_changed()
  File "/usr/bin/dockbarx.py", line 2369, in needs_attention_changed
    self.update_state_request()
  File "/usr/bin/dockbarx.py", line 2274, in update_state_request
    self.update_state()
  File "/usr/bin/dockbarx.py", line 2264, in update_state
    pixbuf = self.icon_factory.pixbuf_update(self.state_type)
  File "/usr/bin/dockbarx.py", line 590, in pixbuf_update
    pixbuf = f(pixbuf, **args)
  File "/usr/bin/dockbarx.py", line 771, in command_if
    pixbuf = f(pixbuf, **args)
  File "/usr/bin/dockbarx.py", line 810, in command_pixmap
    self.temp[name] = f(self.temp[name], **args)
  File "/usr/bin/dockbarx.py", line 1161, in command_alpha_mask
    mask = mask.scale_simple(pixbuf.get_width(), pixbuf.get_height(), gtk.gdk.INTERP_BILINEAR)
AttributeError: 'str' object has no attribute 'scale_simple'
Traceback (most recent call last):
  File "/usr/bin/dockbarx.py", line 4332, in on_active_window_changed
    active_group.set_has_active_window(True)
  File "/usr/bin/dockbarx.py", line 2361, in set_has_active_window
    self.update_state_request()
  File "/usr/bin/dockbarx.py", line 2274, in update_state_request
    self.update_state()
  File "/usr/bin/dockbarx.py", line 2264, in update_state
    pixbuf = self.icon_factory.pixbuf_update(self.state_type)
  File "/usr/bin/dockbarx.py", line 590, in pixbuf_update
    pixbuf = f(pixbuf, **args)
  File "/usr/bin/dockbarx.py", line 771, in command_if
    pixbuf = f(pixbuf, **args)
  File "/usr/bin/dockbarx.py", line 810, in command_pixmap
    self.temp[name] = f(self.temp[name], **args)
  File "/usr/bin/dockbarx.py", line 1161, in command_alpha_mask
    mask = mask.scale_simple(pixbuf.get_width(), pixbuf.get_height(), gtk.gdk.INTERP_BILINEAR)
AttributeError: 'str' object has no attribute 'scale_simple'
Opened window matched with gio app on executable: apport-gtk

Revision history for this message
Eemil Lagerspetz (eemil-lagerspetz) wrote :

Actually, this may be because my theme, human_bar, uses a mask which is not defined. I corrected the mask in the theme file, and will now wait for this crash again.

Revision history for this message
Eemil Lagerspetz (eemil-lagerspetz) wrote :

The crash has still occurred:

Traceback (most recent call last):
  File "/usr/bin/dockbarx.py", line 1617, in on_window_state_changed
    self.groupbutton.update_state()
  File "/usr/bin/dockbarx.py", line 2264, in update_state
    pixbuf = self.icon_factory.pixbuf_update(self.state_type)
  File "/usr/bin/dockbarx.py", line 590, in pixbuf_update
    pixbuf = f(pixbuf, **args)
  File "/usr/bin/dockbarx.py", line 771, in command_if
    pixbuf = f(pixbuf, **args)
  File "/usr/bin/dockbarx.py", line 810, in command_pixmap
    self.temp[name] = f(self.temp[name], **args)
  File "/usr/bin/dockbarx.py", line 1161, in command_alpha_mask
    mask = mask.scale_simple(pixbuf.get_width(), pixbuf.get_height(), gtk.gdk.INTERP_BILINEAR)
AttributeError: 'str' object has no attribute 'scale_simple'
Opened window matched with gio app on executable: apport-gtk
Traceback (most recent call last):
  File "/usr/bin/dockbarx.py", line 1609, in on_window_state_changed
    self.groupbutton.update_state()
  File "/usr/bin/dockbarx.py", line 2264, in update_state
    pixbuf = self.icon_factory.pixbuf_update(self.state_type)
  File "/usr/bin/dockbarx.py", line 590, in pixbuf_update
    pixbuf = f(pixbuf, **args)
  File "/usr/bin/dockbarx.py", line 771, in command_if
    pixbuf = f(pixbuf, **args)
  File "/usr/bin/dockbarx.py", line 810, in command_pixmap
    self.temp[name] = f(self.temp[name], **args)
  File "/usr/bin/dockbarx.py", line 1161, in command_alpha_mask
    mask = mask.scale_simple(pixbuf.get_width(), pixbuf.get_height(), gtk.gdk.INTERP_BILINEAR)
AttributeError: 'str' object has no attribute 'scale_simple'

Revision history for this message
Matias Särs (msevens) wrote :

Another bug I haven't answered?

Does this still exist with x.0.30? If so, could you post the error again, so I get the correct row number?

Revision history for this message
Eemil Lagerspetz (eemil-lagerspetz) wrote :

This bug was caused by a mask name being misspelled in the theme file for human bar at one point. The resulting mask name was used instead of the mask so this is why the error refers to 'str'.
However, the error should be avoided somehow, for example by using an empty/full/default mask in this case, and printing an error that users can understand.
I will now bork the theme similarly and see which error pops up.

Revision history for this message
Eemil Lagerspetz (eemil-lagerspetz) wrote :
Download full text (3.2 KiB)

$ dockbarx.py

** (dockbarx.py:5438): WARNING **: Trying to register gtype 'WnckWindowState' as enum when in fact it is of type 'GFlags'

** (dockbarx.py:5438): WARNING **: Trying to register gtype 'WnckWindowActions' as enum when in fact it is of type 'GFlags'

** (dockbarx.py:5438): WARNING **: Trying to register gtype 'WnckWindowMoveResizeMask' as enum when in fact it is of type 'GFlags'
dockbar init
Gtk-Message: (for origin information, set GTK_DEBUG): failed to retrieve property `GtkWidget::visited-link-color' of type `GdkColor' from rc file value "((GString*) 0x188d4e0)" of type `GString'
 trying to find as untitled
/usr/bin/dockbarx.py:1135: DeprecationWarning: PyArray_FromDimsAndDataAndDescr: use PyArray_NewFromDescr.
  for row in pixbuf.get_pixels_array():
Gtk-Message: (for origin information, set GTK_DEBUG): failed to retrieve property `GtkWidget::visited-link-color' of type `GdkColor' from rc file value "((GString*) 0x1b1f600)" of type `GString'
Executing Qalculate!
Gtk-Message: (for origin information, set GTK_DEBUG): failed to retrieve property `GtkWidget::visited-link-color' of type `GdkColor' from rc file value "((GString*) 0x2146820)" of type `GString'
Traceback (most recent call last):
  File "/usr/bin/dockbarx.py", line 4347, in on_window_opened
    self.groups[class_group_name].add_window(window)
  File "/usr/bin/dockbarx.py", line 2308, in add_window
    self.windows[window] = WindowButton(window,self)
  File "/usr/bin/dockbarx.py", line 1523, in __init__
    self.groupbutton.needs_attention_changed()
  File "/usr/bin/dockbarx.py", line 2377, in needs_attention_changed
    self.update_state_request()
  File "/usr/bin/dockbarx.py", line 2274, in update_state_request
    self.update_state()
  File "/usr/bin/dockbarx.py", line 2264, in update_state
    pixbuf = self.icon_factory.pixbuf_update(self.state_type)
  File "/usr/bin/dockbarx.py", line 590, in pixbuf_update
    pixbuf = f(pixbuf, **args)
  File "/usr/bin/dockbarx.py", line 771, in command_if
    pixbuf = f(pixbuf, **args)
  File "/usr/bin/dockbarx.py", line 810, in command_pixmap
    self.temp[name] = f(self.temp[name], **args)
  File "/usr/bin/dockbarx.py", line 1161, in command_alpha_mask
    mask = mask.scale_simple(pixbuf.get_width(), pixbuf.get_height(), gtk.gdk.INTERP_BILINEAR)
AttributeError: 'str' object has no attribute 'scale_simple'
Gtk-Message: (for origin information, set GTK_DEBUG): failed to retrieve property `GtkWidget::visited-link-color' of type `GdkColor' from rc file value "((GString*) 0x24eda60)" of type `GString'
Traceback (most recent call last):
  File "/usr/bin/dockbarx.py", line 2209, in remove_launch_effect
    self.update_state()
  File "/usr/bin/dockbarx.py", line 2264, in update_state
    pixbuf = self.icon_factory.pixbuf_update(self.state_type)
  File "/usr/bin/dockbarx.py", line 590, in pixbuf_update
    pixbuf = f(pixbuf, **args)
  File "/usr/bin/dockbarx.py", line 771, in command_if
    pixbuf = f(pixbuf, **args)
  File "/usr/bin/dockbarx.py", line 810, in command_pixmap
    self.temp[name] = f(self.temp[name], **args)
  File "/usr/bin/dockbarx.py", line 1161, in command_alpha_mask
    mask = mask.scale_simple(pixbuf.get_width(), pi...

Read more...

Revision history for this message
Matias Särs (msevens) wrote :

I see this is _still_ marked as new. And I can't remember if I did anything about this one or not. Is this bug still there?

Revision history for this message
Matias Särs (msevens) wrote :

bump

Matias Särs (msevens)
Changed in dockbar:
status: New → Incomplete
Matias Särs (msevens)
Changed in dockbar:
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.