Bug 914830 - [abrt] openbox-3.5.0-10.fc19: openbox-xdg-menu:50:icon_attr:AttributeError: 'IconInfo' object has no attribute 'free'
Summary: [abrt] openbox-3.5.0-10.fc19: openbox-xdg-menu:50:icon_attr:AttributeError: '...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: openbox
Version: rawhide
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Lichvar
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:de8c38be35a7cc4a443c2c36ec5...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-02-22 22:19 UTC by Neil
Modified: 2013-03-11 15:43 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-03-11 15:43:54 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: backtrace (726 bytes, text/plain)
2013-02-22 22:19 UTC, Neil
no flags Details
File: core_backtrace (263 bytes, text/plain)
2013-02-22 22:19 UTC, Neil
no flags Details
File: environ (1009 bytes, text/plain)
2013-02-22 22:19 UTC, Neil
no flags Details

Description Neil 2013-02-22 22:19:03 UTC
Version-Release number of selected component:
openbox-3.5.0-10.fc19

Additional info:
cmdline:        /usr/bin/python /usr/libexec/openbox-xdg-menu applications
executable:     /usr/libexec/openbox-xdg-menu
kernel:         3.8.0-2.fc19.x86_64
uid:            1000

Truncated backtrace:
openbox-xdg-menu:50:icon_attr:AttributeError: 'IconInfo' object has no attribute 'free'

Traceback (most recent call last):
  File "/usr/libexec/openbox-xdg-menu", line 104, in <module>
    map(walk_menu, menu.getEntries())
  File "/usr/libexec/openbox-xdg-menu", line 68, in walk_menu
    escape_utf8(icon_attr(entry)))
  File "/usr/libexec/openbox-xdg-menu", line 50, in icon_attr
    iconinfo.free()
AttributeError: 'IconInfo' object has no attribute 'free'

Local variables in innermost frame:
entry: <xdg.Menu.Menu instance at 0x2d16758>
iconinfo: <IconInfo object at 0x33af050 (GtkIconInfo at 0x2b668d0)>
iconfile: '/usr/share/icons/gnome/22x22/categories/applications-accessories.png'
name: u'applications-accessories'

Comment 1 Neil 2013-02-22 22:19:05 UTC
Created attachment 701384 [details]
File: backtrace

Comment 2 Neil 2013-02-22 22:19:07 UTC
Created attachment 701385 [details]
File: core_backtrace

Comment 3 Neil 2013-02-22 22:19:08 UTC
Created attachment 701386 [details]
File: environ

Comment 4 Michael Schwendt 2013-02-25 08:06:04 UTC
Description of problem:
Did just log in to an Openbox session to find that it runs into menu parsing errors, and all I could do is Exit to log out. It seems the new version is incompatible with the rc.xml in $HOME/.config/openbox/rc.xml from the previous release.

$ grep openbox /var/log/yum.log
Jan 05 10:18:29 Installed: openbox-libs-3.5.0-9.fc18.x86_64
Jan 05 10:18:30 Installed: openbox-3.5.0-9.fc18.x86_64
Jan 22 00:48:48 Updated: openbox-libs-3.5.0-9.fc19.x86_64
Jan 22 00:52:02 Updated: openbox-3.5.0-9.fc19.x86_64
Feb 21 11:07:36 Updated: openbox-libs-3.5.0-10.fc19.x86_64
Feb 21 11:11:03 Updated: openbox-3.5.0-10.fc19.x86_64

Version-Release number of selected component:
openbox-3.5.0-10.fc19

Additional info:
cmdline:        /usr/bin/python /usr/libexec/openbox-xdg-menu /etc/xdg/openbox/terminals
executable:     /usr/libexec/openbox-xdg-menu
kernel:         3.9.0-0.rc0.git5.1.fc19.x86_64
uid:            1000

Truncated backtrace:
openbox-xdg-menu:50:icon_attr:AttributeError: 'IconInfo' object has no attribute 'free'

Traceback (most recent call last):
  File "/usr/libexec/openbox-xdg-menu", line 104, in <module>
    map(walk_menu, menu.getEntries())
  File "/usr/libexec/openbox-xdg-menu", line 74, in walk_menu
    escape_utf8(icon_attr(entry.DesktopEntry)))
  File "/usr/libexec/openbox-xdg-menu", line 50, in icon_attr
    iconinfo.free()
AttributeError: 'IconInfo' object has no attribute 'free'

Local variables in innermost frame:
entry: <xdg.DesktopEntry.DesktopEntry instance at 0x25bb830>
iconinfo: <IconInfo object at 0x2965d20 (GtkIconInfo at 0x222e8b0)>
iconfile: '/usr/share/icons/gnome/22x22/apps/utilities-terminal.png'
name: u'utilities-terminal'

Comment 5 Michael Schwendt 2013-02-25 08:12:03 UTC
Reproducible with a fresh user account.

$ /usr/libexec/openbox-xdg-menu
<?xml version="1.0" encoding="UTF-8"?>
<openbox_pipe_menu>
Traceback (most recent call last):
  File "/usr/libexec/openbox-xdg-menu", line 104, in <module>
    map(walk_menu, menu.getEntries())
  File "/usr/libexec/openbox-xdg-menu", line 68, in walk_menu
    escape_utf8(icon_attr(entry)))
  File "/usr/libexec/openbox-xdg-menu", line 50, in icon_attr
    iconinfo.free()
AttributeError: 'IconInfo' object has no attribute 'free'

Comment 6 Michael Schwendt 2013-02-25 08:18:44 UTC
Temporary work-around (without examining it further):

# diff -u openbox-xdg-menu~ openbox-xdg-menu
--- openbox-xdg-menu~	2012-11-13 17:31:00.000000000 +0100
+++ openbox-xdg-menu	2013-02-25 09:15:42.983612403 +0100
@@ -47,7 +47,7 @@
 	iconinfo = theme.lookup_icon(name, 22, Gtk.IconLookupFlags.NO_SVG)
 	if iconinfo:
 		iconfile = iconinfo.get_filename()
-		iconinfo.free()
+		#iconinfo.free()
 		if iconfile:
 			return ' icon="' + iconfile + '"'
 	return ''

Comment 7 Michael Schwendt 2013-03-09 20:52:48 UTC
The explanation here is that openbox-xdg-menu uses gtk3 with introspection, and therefore this implementation is out-of-date, because gtk_icon_info_free() had been deprecated and has been dropped recently.

Comment 8 Miroslav Lichvar 2013-03-11 15:43:54 UTC
Thanks for the analysis, Michael.

I've modified the script to check if the object has the free attribute. It's in openbox-3.5.0-11.20121001git782b28.


Note You need to log in before you can comment on or make changes to this bug.