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 523001 - Keyboard activation of a cell renderer emits CRITICAL warning
Keyboard activation of a cell renderer emits CRITICAL warning
Status: RESOLVED FIXED
Product: pygtk
Classification: Bindings
Component: gtk
2.10.x
Other Linux
: Normal normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2008-03-17 16:40 UTC by Matthew Barnes
Modified: 2009-05-08 20:56 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed patch (488 bytes, patch)
2008-03-17 16:46 UTC, Matthew Barnes
rejected Details | Review

Description Matthew Barnes 2008-03-17 16:40:15 UTC
Forwarding from a Fedora bug:
http://bugzilla.redhat.com/show_bug.cgi?id=379051

Activating a cell renderer with the keyboard emits a CRITICAL warning:

  CRITICAL **: pygtk_boxed_unref_shared: assertion `boxed != NULL && 
  PyObject_TypeCheck(boxed, &PyGBoxed_Type)' failed

This is because the GdkEvent passed to pygtk_generic_cell_renderer_activate() is NULL for a keyboard activation.  Then this line:

  py_event = pyg_boxed_new(GDK_TYPE_EVENT, event, FALSE, FALSE);

results in py_event pointing to Py_None, which is illegal to pass to pygtk_boxed_unref_shared().

The Fedora bug report has a nice test program for verifying this.
Comment 1 Matthew Barnes 2008-03-17 16:46:40 UTC
Created attachment 107459 [details] [review]
Proposed patch
Comment 2 Paul Pogonyshev 2008-03-17 21:23:52 UTC
As I see this patch leaks a reference to Py_None.  Not quite important, but still...  Johan: is it suitable to make pygtk_boxed_unref_shared() handle Py_None case properly?
Comment 3 Paul Pogonyshev 2009-05-08 20:56:12 UTC
I made pygtk_boxed_unref_shared() handle Py_None instead.