[PySide] Is there a reason PySideSignalInstance source isn't incref'd?

John Ehresman jpe at wingware.com
Wed May 30 21:22:24 CEST 2012

I'm getting a segfault when I run the following:


with updated sources from git.  I can work around it with

m = w.selectionModel()

Stepping through the code in pysidesignal.cpp, it looks like d->source 
of a PySideSignalInstance object isn't incref'd so when the temporary 
ref returned by selectionModel is decref'd, the source is pointing at a 
invalid object.  The function that initializes a PySideSignalInstance is 

Oddly this only happens in a larger program and not in a simple test 
case, but I don't see how source can be assumed to be valid without 
increfing it.



More information about the PySide mailing list