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
- Open
For Gerrit Dashboard: PYSIDE-79 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
610386,31 | WIP: Fix a memory leak connecting to signals | dev | pyside/pyside-setup | Status: NEW | -2 | 0 |
611544,2 | WIP: Reduce number of weakref for signal source tracking | dev | pyside/pyside-setup | Status: NEW | -2 | 0 |
611573,1 | WIP: Fix a memory leak connecting to signals, take 2 | dev | pyside/pyside-setup | Status: NEW | -2 | 0 |