GNOME Bugzilla – Bug 523001
Keyboard activation of a cell renderer emits CRITICAL warning
Last modified: 2009-05-08 20:56:12 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.
Created attachment 107459 [details] [review] Proposed patch
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?
I made pygtk_boxed_unref_shared() handle Py_None instead.