[PyQt] PyQt 5.6: Segfault in QMetaType::construct when emitting None as string

Florian Bruhin me at the-compiler.org
Tue Apr 26 21:13:21 BST 2016


Hi,

The attached example defines a pyqtSignal(str) and then emits it with
None as argument.

While this was an accident in my code, this worked with PyQt 5.5 and
causes a segfault in 5.6:

	#0  QtPrivate::RefCount::ref (this=0x0) at ../../include/QtCore/../../src/corelib/tools/qrefcount.h:49
	#1  0x00007ffff5de51e9 in QString::QString (other=..., this=0x99b020) at ../../include/QtCore/../../src/corelib/tools/qstring.h:890
	#2  QtMetaTypePrivate::QMetaTypeFunctionHelper<QString, true>::Construct (where=0x99b020, t=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qmetatype.h:760
	#3  0x00007ffff5de08b0 in QMetaType::construct (copy=0x999a08, where=<optimized out>, this=0x7fffffffd690) at ../../include/QtCore/../../src/corelib/kernel/qmetatype.h:2153
	#4  QMetaType::create (type=<optimized out>, copy=0x999a08) at kernel/qmetatype.cpp:1702
	#5  0x00007ffff645dd73 in ?? () from /usr/lib/python3.5/site-packages/PyQt5/QtCore.so
	#6  0x00007ffff6459cae in ?? () from /usr/lib/python3.5/site-packages/PyQt5/QtCore.so
	#7  0x00007ffff64677df in ?? () from /usr/lib/python3.5/site-packages/PyQt5/QtCore.so
	#8  0x00007ffff6468267 in ?? () from /usr/lib/python3.5/site-packages/PyQt5/QtCore.so
	#9  0x00007ffff5df89f0 in QMetaObject::activate (sender=0x962d30, signalOffset=<optimized out>, local_signal_index=<optimized out>, argv=<optimized out>) at kernel/qobject.cpp:3745
	#10 0x00007ffff646c0fe in ?? () from /usr/lib/python3.5/site-packages/PyQt5/QtCore.so
	#11 0x00007ffff79ba5e9 in PyCFunction_Call () from /usr/lib/libpython3.5m.so.1.0
	[...]

(I unfortunately built PyQt 5.6 without debugging symbols - let me know if you
need a stacktrace with them)

Florian

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


More information about the PyQt mailing list