Python GC destroys PyGObject with external references
Bug #1728461 reported by
Cédric Bellegarde
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pygobject |
Fix Released
|
Medium
|
|||
pygobject (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
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:/
Should apply to 3.24 or be easily backported: one line patch adding a if statement.
Changed in pygobject: | |
importance: | Unknown → Medium |
status: | Unknown → Fix Released |
To post a comment you must log in.