Details
Description
Python segfaults when connecting to a signal attribute of a temporary object; e.g.
tv = QTreeView()
...
tv.selectionModel().destroyed.connect(callback)
What happens is a PyObject* is created for the selection model, but is destroyed after its 'destroyed' attribute is gotten and before the .connect(callback) call.
It may not segfault in a non-debug python build because the recently freed memory may still contain its old values
Attachments
Issue Links
- is duplicated by
-
PYSIDE-161 Crash on connect to currentRowChanged slot
- Closed
- relates to
-
PYSIDE-2201 Segfault when calling signal of temporary
- Closed
- resulted in
-
PYSIDE-1057 QNetworkReply leak
- Closed