GNOME Bugzilla – Bug 639873
GBinding: Crash when binding two properties on the same instance
Last modified: 2012-03-05 15:11:11 UTC
Binding two properties on the same instance and then finalizing the instance causes GLib to crash in gbinding.c:weak_unbind(). I've attached a test program to demonstrate. Silly as this case may seem, it can be useful when the binding has a transform function.
Created attachment 178642 [details] Test program
Created attachment 178643 [details] [review] Proposed patch Slightly modified version of Emmanuele's initial patch, which avoids a runtime warning (no need to call g_signal_handler_disconnect() in the first hunk because both binding->source and binding->target are already finalized).
Actually, you don't really need the first hunk at all. The existing logic in weak_unbind() will do the right thing.
*ping*
looks good to me; sorry, it completely fell off my radar.
Review of attachment 178643 [details] [review]: go for it
The following fix has been pushed: 1426a8c Fix binding properties of the same object
Created attachment 208974 [details] [review] Fix binding properties of the same object This problem was pointed out in bug 639873. The patch here is based on Matt Barnes patch, I've added a testcase as well.
Thanks for the quick response to my mailing list nag. :)