After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 555384 - MRO error crash when accessing the 'focus_widget' property of a file selection dialog
MRO error crash when accessing the 'focus_widget' property of a file selectio...
Status: RESOLVED OBSOLETE
Product: pygtk
Classification: Bindings
Component: gtk
2.13.x
Other All
: Normal critical
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2008-10-07 12:26 UTC by Severin Heiniger
Modified: 2010-10-20 23:45 UTC
See Also:
GNOME target: ---
GNOME version: 2.23/2.24


Attachments
Python file to reproduce the crash (167 bytes, text/x-python)
2008-10-07 12:27 UTC, Severin Heiniger
Details
Glade file to reproduce the crash (2.20 KB, application/x-glade)
2008-10-07 12:29 UTC, Severin Heiniger
Details

Description Severin Heiniger 2008-10-07 12:26:22 UTC
Steps to reproduce:
1. Run the test_pygtk_crash.py test file with filechooser.glade in the same directory.

Stack trace:
TypeError: Cannot create a consistent method resolution
order (MRO) for bases ImplementorIface, CellEditable, Editable, Buildable
**
ERROR:/build/buildd/pygobject-2.15.3/gobject/pygobject.c:920:pygobject_new_full: assertion failed: (tp != NULL)
Aborted (core dumped)

Other information:
As a developer of LottaNZB (a PyGTK app), I recently gave our application a try on Ubuntu Intrepid, with the latest updates applied (python-gtk2 2.13, python-gobject 2.15.3). The application unexpectedly crashed when opening the file selection dialog with the following error message:

TypeError: Cannot create a consistent method resolution
order (MRO) for bases ImplementorIface, CellEditable, Editable, Buildable
**
ERROR:/build/buildd/pygobject-2.15.3/gobject/pygobject.c:920:pygobject_new_full: assertion failed: (tp != NULL)
Aborted (core dumped)

Trying to locate the problem, I dove into the code of Kiwi, the PyGTK framework we use in our application. I finally found the line of code which caused this issue. To my surprise it wasn't a Kiwi-specific problem, as I was able to reproduce it with pure PyGTK code. This crash happens whenever the developer tries to access the property 'focus_widget' of a gtk.FileChooserDialog or a dialog that contains a gtk.FileChooserWidget after the dialog's show() method was invoked.

This issue can only be reproduced using Intrepid, but not using Hardy, that's why I assume that the bug is caused by certain changes recently made in python-gtk or python-gobject

The only way to prevent the application from crashing is to ensure that this property isn't accessed (when using Kiwi by overwriting the check_focus method).

Test case is attached.
Comment 1 Severin Heiniger 2008-10-07 12:27:14 UTC
Created attachment 120111 [details]
Python file to reproduce the crash
Comment 2 Severin Heiniger 2008-10-07 12:29:17 UTC
Created attachment 120112 [details]
Glade file to reproduce the crash
Comment 3 Gustavo Carneiro 2008-10-07 13:17:26 UTC
Potentially duplicate of bug 538401.
Comment 4 Severin Heiniger 2008-10-07 14:01:05 UTC
This bug might might be related to bug 538401, but I'm not sure if it's really a duplicate. The test script works flawlessly on Ubuntu Hardy (python-gtk2 2.12.1 and python-gobject 2.14.2) while it crashes with the above error message on Ubuntu Intrepid (python-gtk2 2.13  and python-gobject 2.15.3). That's why the bug must have been introduced recently, since bug 538401 was filed against python-gobject 2.14 (Ubuntu Hardy).
Comment 5 Gustavo Carneiro 2008-10-07 14:14:30 UTC
No, but bug 538401 is triggered by accessing certain objects which contain certain interfaces.  A libgtk+ change (a widget gaining a new GInterface, under the hood) could also trigger the same bug.  It is not unconceivable that pygobject 2.14.x with a new libgtk2 could exhibit the same bug being reported here.

But, hey, maybe it really isn't duplicate, I'm just adding clues if anyone wants to investigate.
Comment 6 Severin Heiniger 2008-10-07 16:38:09 UTC
My comment might have been a little harsh. Sorry for that. I don't know much about the internals of pygobject and pygtk, that's why it will be difficult for me to help solving this issue.
Comment 7 Gustavo Carneiro 2008-10-07 16:56:29 UTC
Hey, I am usually the one who is harsh; I am not very sensitive to that sort of thing :-)

I think the results of your experiments are very useful facts; it's just that the conclusion from those facts may not be as straightforward, and we should not rule out a bug already present in pygobject 2.14.
Comment 8 Paul Pogonyshev 2008-10-12 11:16:38 UTC
BTW, I cannot reproduce this problem.  What GTK+, PyGObject and PyGTK versions do you have?
Comment 9 Gian Mario Tagliaretti 2009-01-30 22:27:03 UTC
Severin ping to Paul question?
Comment 10 Jonathan Matthew 2009-06-23 13:23:41 UTC
I can reproduce this with the current debian sid gtk 2.16.2, pygobject 2.16.1, and pygtk 2.14.1 packages.
Comment 11 John Stowers 2010-10-20 23:45:31 UTC
Works for me...