Public bug reported: PyGObject traverses its closures in tp_traverse, but the lifetime of the closures is tied to the lifetime of the GObject and not the wrapper. This confuses the Python GC when it sees a ref cycle and tries to break it up with tp_clear. Since tp_clear will not invalidate the closure and only invalidate the Python wrapper the closure callback gets called with the now cleared/invalid object.
This bug make python gtk programs to segfault randomly. Patch available here: https://bugzilla.gnome.org/show_bug.cgi?id=731501 Should apply to 3.24 or be easily backported: one line patch adding a if statement. ** Affects: pygobject (Ubuntu) Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1728461 Title: Python GC destroys PyGObject with external references To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/pygobject/+bug/1728461/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs