[PyQt] Segfault with 5.9 snapshot when connecting to destroyed signal

Florian Bruhin me at the-compiler.org
Mon Jun 5 22:42:42 BST 2017


Hi,

the attached script works fine with PyQt 5.8, but segfaults with the
current 5.9 snapshot. This is a simplified version of pytest-qt's
SignalBlocker: http://pytest-qt.readthedocs.io/en/latest/signals.html

The "self.args = args" saves a reference to the to-be-destroyed object,
which probably triggers this in some way - saving the arguments is done
as a general thing here though. It's probably a bit unorthodox, but
still shouldn't segfault I guess?

Stack:

#0  0x00007ffff5fa40a7 in QObject::disconnect(QObject const*, char const*, QObject const*, char const*) ()
   from /home/florian/code/qt/bin/5.9/gcc_64/lib/libQt5Core.so.5
#1  0x00007ffff277ae4d in ?? () from /home/florian/code/qt/bin/5.9/venv/lib/python3.6/site-packages/sip.so
#2  0x00007ffff277af0c in ?? () from /home/florian/code/qt/bin/5.9/venv/lib/python3.6/site-packages/sip.so
#3  0x00007ffff746b10b in ?? () from /usr/lib/libpython3.6m.so.1.0
#4  0x00007ffff746a3ea in ?? () from /usr/lib/libpython3.6m.so.1.0
#5  0x00007ffff74610fc in ?? () from /usr/lib/libpython3.6m.so.1.0
#6  0x00007ffff746b045 in ?? () from /usr/lib/libpython3.6m.so.1.0
#7  0x00007ffff740b6bc in ?? () from /usr/lib/libpython3.6m.so.1.0
#8  0x00007ffff740bac3 in ?? () from /usr/lib/libpython3.6m.so.1.0
#9  0x00007ffff73c03c7 in _PyEval_EvalFrameDefault () from /usr/lib/libpython3.6m.so.1.0
#10 0x00007ffff740bf17 in PyEval_EvalCodeEx () from /usr/lib/libpython3.6m.so.1.0
#11 0x00007ffff73c00ab in PyEval_EvalCode () from /usr/lib/libpython3.6m.so.1.0
#12 0x00007ffff74a50d2 in ?? () from /usr/lib/libpython3.6m.so.1.0
#13 0x00007ffff74a76fd in PyRun_FileExFlags () from /usr/lib/libpython3.6m.so.1.0
#14 0x00007ffff74a78e7 in PyRun_SimpleFileExFlags () from /usr/lib/libpython3.6m.so.1.0
#15 0x00007ffff749b063 in Py_Main () from /usr/lib/libpython3.6m.so.1.0
#16 0x0000000000400a5d in main ()

Florian

-- 
https://www.qutebrowser.org  | me at the-compiler.org (Mail/XMPP)
   GPG: 916E B0C8 FD55 A072  | https://the-compiler.org/pubkey.asc
         I love long mails!  | https://email.is-not-s.ms/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signalblocker.py
Type: text/x-python
Size: 415 bytes
Desc: not available
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20170605/23d34017/attachment.py>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20170605/23d34017/attachment.sig>


More information about the PyQt mailing list