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

Phil Thompson phil at riverbankcomputing.com
Fri Apr 29 10:16:09 BST 2016


On 26 Apr 2016, at 9:13 pm, Florian Bruhin <me at the-compiler.org> wrote:
> 
> 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)

Fixed in tonight's snapshot.

Thanks,
Phil


More information about the PyQt mailing list