Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.11.0, 5.11.1, 5.11.2
-
-
52299827c64cccc1456f9050fdf3dd8596df3e6f (pyside/pyside-setup/5.14)
Description
PySide2/Qt5 crashes hard (Segmentation fault) when emitting a queued connection signal with an argument into a secondary QThread.
Note that this is a separate bug from PYSIDE-810, garbage collection is explicitly disabled in the test case below.
PySide 1.x doesn't seem to be affected (unless the patches below have been back-ported).
Test case: crash1ex.py
Stack trace: stack1ex.txt
It looks like this bug might have been introduced here:
PYSIDE-164
PYSIDE-281
https://codereview.qt-project.org/#/c/84454/
It seems to be happening during the de-allocation of the Python object that is passed as an argument to the emit method (SbkDeallocWrapper):
#6 0x00007ffff56f16b2 in Shiboken::Object::deallocData (self=0xa6d368, cleanup=true) at shiboken/libshiboken/basewrapper.cpp:1346 #7 0x00007ffff56ee070 in SbkDeallocWrapperCommon (pyObj=<PySide.QtCore.QObject at remote 0xa6d368>, canDelete=true) at shiboken/libshiboken/basewrapper.cpp:246 #8 0x00007ffff56ee108 in SbkDeallocWrapper (pyObj=<PySide.QtCore.QObject at remote 0xa6d368>) at shiboken/libshiboken/basewrapper.cpp:255 #9 0x00007ffff7a84da3 in tupledealloc (op=0xa6b250) at Objects/tupleobject.c:222 #10 0x00007ffff59475f9 in PySide::SignalManager::callPythonMetaMethod (method=..., args=0xad7650, pyMethod=<instancemethod at remote 0x7ffff7f0b4b0>, isShortCuit=false) at pyside/libpyside/signalmanager.cpp:484 #11 0x00007ffff5947c10 in (anonymous namespace)::callMethod (object=0xaca7c0, id=4, args=0xad7650) at pyside/libpyside/signalmanager.cpp:587 #12 0x00007ffff594731c in PySide::SignalManager::qt_metacall (object=0xaca7c0, call=QMetaObject::InvokeMetaMethod, id=4, args=0xad7650) at pyside/libpyside/signalmanager.cpp:434 #13 0x00007ffff5cb763b in QObjectWrapper::qt_metacall (this=0xaca7c0, call=QMetaObject::InvokeMetaMethod, id=4, args=0xad7650) at PySide/QtCore/PySide/QtCore/qobject_wrapper.cpp:506
Attachments
Issue Links
- relates to
-
PYSIDE-1919 Segfault when garbage collector grabs object with connected signal
- Closed
-
PYSIDE-2098 Memory leak in Pyside signal when connected to QML slot
- Closed
- mentioned in
-
Page Loading...