GNOME Bugzilla – Bug 661957
Magnatune plugin crashes Rhythmbox on Fedora 16
Last modified: 2012-02-05 10:00:36 UTC
Having Magnatune plugin enabled makes Rhythmbox crash on start-up on Fedora 16. It produces the following error: /usr/lib/python2.7/site-packages/gobject/constants.py:24: Warning: g_boxed_type_register_static: assertion `g_type_from_name (name) == 0' failed import gobject._gobject TypeError: metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases ** ERROR:pygobject.c:929:pygobject_new_full: assertion failed: (tp != NULL) The work-around is to manually update the active-plugins setting in gsettings. First, you need to do gsettings get org.gnome.rhythmbox.plugins active-plugins and then gsettings set org.gnome.rhythmbox.plugins active-plugins "[output of the above command with the 'magnatune' plugin removed]"
Problem seems to be that Rhythmbox is using pygobject3 and gobject-introspection, but the Magnatune plugin imports gnome-keyring which is using pygobject2, and pygobejct2 and pygobject3 aren't playing nice in the same process. See: # XXX use GnomeKeyring when available in magnatune.py Bug 598414 has a patch for adding gobject-introspection support for gnome-keyring, not sure if it's ready to land or not. A workaround is however needed for gnome-3.2 - maybe just disabling installing the Magnatune plugin.
The Magnatune plugin doesn't really work even when it's not crashing, so I'm going to disable it.
*** Bug 662116 has been marked as a duplicate of this bug. ***
Jonathan, Could you be more specific about what doesn't work with the plugin? I had been using the plugin daily on Ubuntu Lucid and it has been working great. Rhythmbox has (had?) the best Magnatune integration, is a primary reason I use Rhythmbox. Perhaps there's something I could do to help. (In related news, I worked with the Magnatune owner John Buckman on new splash screen content for Rhythmbox. It's working fine for me, I just haven't submitted it)
Jonathan & others: - the magnatune plugin for RB worked perfectly for me under Ubuntu 11.04, so in reply to your comment "The Magnatune plugin doesn't really work even when it's not crashing, so I'm going to disable it." it'd be helpful to know what your problem with it has been, as plenty of people use RB+Magnatune and don't have problems. It'd a shame to lose the RB+Magnatune functionality, and note that Magnatune sends a few thousand dollars per year in donations to Gnome Foundation for the sales that RB causes - I can confirm that RB+Magnatune does not work under Ubuntu 11.10, even though it worked on 11.04. Perhaps it's just as simple as removing the gnome-keyring support in the Magnatune plugin. I will also try to chase down the original developer and see if he has a suggested fix. -john from magnatune
Some background: as part of the transition from GTK+ 2.x to 3.x, we had to switch from static python bindings (pygobject and pygtk) to introspected bindings based on gobject-introspection. Ubuntu 11.04 shipped a version of rhythmbox based on GTK+ 2.x, so it's not affected by these issues. Last time I checked, which admittedly was some time ago, the introspected bindings were not capable of invoking some methods used in the Magnatune plugin for downloading files, and it was not clear how this capability would be added. On top of this there's also the gnome-keyring problem that causes these crashes. gnome-keyring is not yet accessible through introspection either. Making the Magnatune plugin work again is definitely on my list of rhythmbox-related things to do, but it's a very long list and I don't get all that much time to work on it.
gnome-keyring is used by the plugin to store the user's Magnatune account credentials, so it can't simply be disabled without breaking the plugin for people with accounts. As Jonathan mentioned, there are also several other issues with the bindings used by the plugin which make it a somewhat moot point, since the plugin wouldn't work even if the keyring issue wasn't there. Unfortunately, this means that the plugin will likely remain broken until 12.04 (and the corresponding Fedora release as well). I'm hoping to have some time in the new year to hack on it a bit. Hopefully by then the major issues with the libraries and bindings will be fixed, and I can get the plugin working again.
*** Bug 663940 has been marked as a duplicate of this bug. ***
*** Bug 667587 has been marked as a duplicate of this bug. ***
gnome-keyring recently added introspection support, so I've bashed the magnatune plugin sort of into shape and re-enabled it. I haven't tried downloading an album or anything, so that probably doesn't work at all.