Details
Description
The following snippet segfaults while executing the last line:
from PySide6.QtCore import QObject, Signal, Slot class Foo(QObject): s = Signal(int) def __init__(self): QObject.__init__(self) def send(self, i): self.s.emit(i) f = Foo() f.s.emit(42) # ok Foo().send(42) # ok Foo().s.emit(42) # segfault
Regardless of whether calling the signal of a temporary directly is "allowed" as part of the API, it shouldn't segfault.
Attachments
Issue Links
- relates to
-
PYSIDE-2137 RuntimeError: Internal C++ object (PySide6.QtWidgets.QLabel) already deleted.
- Closed
-
PYSIDE-79 Segfault when using connect
- Closed
-
PYSIDE-1057 QNetworkReply leak
- Closed
-
PYSIDE-2328 Segmentation fault/access violation when connecting signal of temporary object
- Closed
For Gerrit Dashboard: PYSIDE-2201 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
456357,7 | signals: Introduce Weak Reference to protect lost SignalInstance | dev | pyside/pyside-setup | Status: MERGED | +2 | 0 |
457731,16 | signal: Finally clean up all leaks after complete understanding | dev | pyside/pyside-setup | Status: MERGED | +2 | 0 |
457976,2 | signals: Introduce Weak Reference to protect lost SignalInstance | 6.4 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
461637,2 | signal: Finally clean up all leaks after complete understanding | 6.4 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
611544,6 | libpyside/ PySideSignal: Reduce number of weakref handlers for sender tracking | dev | pyside/pyside-setup | Status: MERGED | +2 | 0 |
612037,2 | libpyside/ PySideSignal: Reduce number of weakref handlers for sender tracking | 6.8 | pyside/pyside-setup | Status: MERGED | +2 | 0 |