GNOME Bugzilla – Bug 686608
Fails to start after failing to set tool item types
Last modified: 2013-02-19 18:42:45 UTC
Gaupol fails to start with Python 3.3 (on Arch Linux). It used to work with Python 3.2 as far as I recall. Software versions used: gaupol 0.20 python-gobject 3.4.1.1 iso-codes 3.38 Below are the warnings/errors I get when trying to launch Gaupol: $ gaupol /usr/lib/python3.3/site-packages/gi/types.py:47: Warning: g_object_set: assertion `G_IS_OBJECT (object)' failed return info.invoke(*args, **kwargs) (gaupol:16240): Gtk-CRITICAL **: gtk_activatable_set_related_action: assertion `GTK_IS_ACTIVATABLE (activatable)' failed /usr/lib/python3.3/site-packages/gi/types.py:47: Warning: g_object_ref_sink: assertion `G_IS_OBJECT (object)' failed return info.invoke(*args, **kwargs) (gaupol:16240): Gtk-CRITICAL **: gtk_widget_set_name: assertion `GTK_IS_WIDGET (widget)' failed (gaupol:16240): Gtk-CRITICAL **: gtk_toolbar_insert: assertion `GTK_IS_TOOL_ITEM (item)' failed /usr/lib/python3.3/site-packages/gi/types.py:47: Warning: instance with invalid (NULL) class pointer return info.invoke(*args, **kwargs) /usr/lib/python3.3/site-packages/gi/types.py:47: Warning: g_signal_connect_data: assertion `G_TYPE_CHECK_INSTANCE (instance)' failed return info.invoke(*args, **kwargs) Traceback (most recent call last):
+ Trace 231074
gaupol.main.main(sys.argv[1:])
_init_application(opts, args)
application = gaupol.Application()
self._init_gui()
self._init_main_toolbar(vbox)
self._init_undo_button()
undo_button = self.get_tool_item("undo_action")
return [x for x in widgets if isinstance(x, Gtk.ToolItem)][0]
I don't find any clues in that output. My best guess is that you have some GObject introspection, PyGObject or Python packaging problem in Arch. I haven't tried Python 3.3 myself (still using 3.2), but I don't see any major changes there [1]. gaupol 0.20 to my knowledge works fine at least on debian unstable and fedora 17. [1] http://docs.python.org/py3k/whatsnew/3.3.html
Just tested on Fedora 18 Alpha (installed all 599 updates first!) and it fails to start in the exact same way. I don't think it's a packaging error on Arch's or Fedora's side. Also, if I comment out the 'self._init_main_toolbar(vbox)' line in application.py:_init_gui(), gaupol is able to start (obviously with no toolbar). Maybe gaupol is not compatible with PyGObject 3.4.x? Thanks for your help.
(In reply to comment #2) > Just tested on Fedora 18 Alpha (installed all 599 updates first!) and it fails > to start in the exact same way. I don't think it's a packaging error on Arch's > or Fedora's side. Oh, okay. > Maybe gaupol is not compatible with PyGObject 3.4.x? Either that or a newer gtk+. It's probably best that I find a way to test this myself. Based on a quick look [1], it seems that pygobject3 is included on the f18 live cd. I'll see if I can test gaupol with that next weekend. [1] http://kojipkgs.fedoraproject.org//work/tasks/5718/4635718/livecd.log
Posting from a fedora 18 live system. Your original traceback did contain the problem after all. The problem lies in setting the tool item types, i.e. dropdown arrows on open, undo and redo buttons. I filed this as bug 687522 against pygobject; the same fails on their own demo. I'll see if I can come up with some workaround, e.g. regressing those menutoolbuttons to regular toolbuttons.
Created attachment 228184 [details] [review] Patch to disable menu tool buttons Here's a workaround that uses regular Gtk.ToolButtons instead of Gtk.MenuToolButtons. If you need a fix right now, just apply this patch against gaupol 0.20 or git head. gaupol should start, you'll just be missing drop-down arrows on undo and redo buttons. I didn't test this patch on f18 or arch, but it should work, let me know if it doesn't.
Review of attachment 228184 [details] [review]: Workaround works well; gaupol starts correctly and doesn't output any errors to the terminal on start-up. Hopefully, the removed functionality can be restored once the pygobject people fix or comment on bug 687522.
Thanks for checking. Still no word from PyGobject devs. I'll release 0.20.1 (tomorrow perhaps) with this patch and a couple other bug fixes. I'll keep this bug open until this workaround can be replaced with a proper fix. I want those damn drop-down arrows back.
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report. I can't manage to test it yet, but I trust PyGObject 3.7.90 fixes this as advertised. commit eb9034590060b0b3cc67d17c4eca564402a0069e Author: Osmo Salomaa <otsaloma@iki.fi> Date: Tue Feb 19 20:24:39 2013 +0200 Restore drop-down arrows on undo and redo toolbar buttons. Restore the do_create_tool_item method, but remove that at the class level if using PyGObject earlier than 3.7.90. https://bugzilla.gnome.org/show_bug.cgi?id=686608 https://bugzilla.gnome.org/show_bug.cgi?id=687522 https://github.com/otsaloma/gaupol/commit/eb9034590060b0b3cc67d17c4eca564402a0069e