some_signal.disconnect(None) segfaults

Kyle Altendorf sda at
Fri Aug 7 04:52:00 BST 2020

When you call `some_signal.disconnect(None)` PyQt5 5.15.0 segfaults for 
me in Linux.  This isn't a problem for me but seemed like unwanted 
behavior.  I only noticed it while exploring a bit and trying the code 
below where disconnecting a lambda that was never connected 'works' 
(though a `TypeError` seems not quite right) but disconnecting `None` 
fails catastrophically.

  ✘  ~/r/preqtrio   more_mypy ●  venvpq/bin/python
Python 3.8.3 (default, Jun  4 2020, 17:51:25)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from PyQt5 import QtCore
>>> app = QtCore.QCoreApplication([])
>>> t = QtCore.QTimer()
>>> t.timeout.disconnect(lambda: None)
Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
TypeError: 'function' object is not connected
>>> t.timeout.disconnect(None)
fish: “venvpq/bin/python” terminated by signal SIGSEGV (Address boundary 


More information about the PyQt mailing list