[PyQt] PyQt5 Segmentation Fault for QtQuick List Properties
Louis Simons
lousimons at gmail.com
Thu Nov 3 00:07:56 GMT 2016
I've been teaching myself QML/QtQuick using the examples at
https://github.com/baoboa/pyqt5/tree/master/examples/quick/tutorials/extending
which are based on the C++ tutorials. Everything works up until chapter 5
<https://github.com/baoboa/pyqt5/tree/master/examples/quick/tutorials/extending/chapter5-listproperties>,
where I get a segmentation fault. I'm running Python3 on Linux Mint 18
with PyQt5 5.7 (built from source to get the latest). Does this example
work on anyone else's system with version 5.7? The backtrace follows:
(gdb) run chapter5-listproperties.py
Starting program: /usr/bin/python3 chapter5-listproperties.py
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffe7d71700 (LWP 10178)]
[New Thread 0x7fffe6ac9700 (LWP 10179)]
Thread 1 "python3" received signal SIGSEGV, Segmentation fault.
QVariant::clear (this=this at entry=0xa7eabb6e3d078e00) at
kernel/qvariant.cpp:1931
1931 kernel/qvariant.cpp: No such file or directory.
(gdb) backtrace
#0 QVariant::clear (this=this at entry=0xa7eabb6e3d078e00) at
kernel/qvariant.cpp:1931
#1 0x00007ffff1390c48 in QVariant::operator= (this=0xa7eabb6e3d078e00,
variant=...) at kernel/qvariant.cpp:1866
#2 0x00007ffff17884d5 in Chimera::fromPyObject(_object*, QVariant*, bool)
const () from /usr/lib/python3/dist-packages/PyQt5/QtCore.so
#3 0x00007ffff1785509 in qt_metacall_worker(_sipSimpleWrapper*,
_typeobject*, _sipTypeDef*, QMetaObject::Call, int, void**) () from
/usr/lib/python3/dist-packages/PyQt5/QtCore.so
#4 0x00007ffff17856e2 in qpycore_qobject_qt_metacall(_sipSimpleWrapper*,
_sipTypeDef*, QMetaObject::Call, int, void**) () from
/usr/lib/python3/dist-packages/PyQt5/QtCore.so
#5 0x00007fffec3e54a1 in QQmlObjectCreator::setupBindings
(this=this at entry=0xf3dac0,
bindingsToSkip=...) at qml/qqmlobjectcreator.cpp:702
#6 0x00007fffec3e1a5a in QQmlObjectCreator::populateInstance
(this=this at entry=0xf3dac0, index=0, instance=0xf99860, instance at entry=0xf97050,
bindingTarget=0xf99860,
bindingTarget at entry=0xf97050,
valueTypeProperty=valueTypeProperty at entry=0x0,
bindingsToSkip=...) at qml/qqmlobjectcreator.cpp:1321
#7 0x00007fffec3e23ba in QQmlObjectCreator::createInstance
(this=this at entry=0xf3dac0,
index=1, parent=<optimized out>, isContextObject=isContextObject at entry
=false)
at qml/qqmlobjectcreator.cpp:1169
#8 0x00007fffec3e5223 in QQmlObjectCreator::setPropertyBinding
(this=this at entry=0xf3dac0, property=0x7fffd8038c98,
binding=binding at entry=0x7fffd80442f0)
at qml/qqmlobjectcreator.cpp:751
#9 0x00007fffec3e54b8 in QQmlObjectCreator::setupBindings
(this=this at entry=0xf3dac0,
bindingsToSkip=...) at qml/qqmlobjectcreator.cpp:710
#10 0x00007fffec3e1a5a in QQmlObjectCreator::populateInstance
(this=this at entry=0xf3dac0, index=-1, instance=0x0, instance at entry=0xf99860,
bindingTarget=0xe55b90,
bindingTarget at entry=0xf99860,
valueTypeProperty=valueTypeProperty at entry=0x0,
bindingsToSkip=...) at qml/qqmlobjectcreator.cpp:1321
#11 0x00007fffec3e23ba in QQmlObjectCreator::createInstance
(this=this at entry=0xf3dac0,
index=index at entry=0, parent=parent at entry=0x0,
isContextObject=isContextObject at entry=true)
at qml/qqmlobjectcreator.cpp:1169
#12 0x00007fffec3e38cf in QQmlObjectCreator::create (this=this at entry=0xf3dac0,
subComponentIndex=-1, parent=parent at entry=0x0, interrupt=interrupt at entry=0x0)
at qml/qqmlobjectcreator.cpp:209
#13 0x00007fffec36bb05 in QQmlComponentPrivate::beginCreate (this=0xf9c1f0,
context=0xf9b1a0) at qml/qqmlcomponent.cpp:880
#14 0x00007fffec36978f in QQmlComponent::create (this=0xf9a050,
context=0xf9a670) at qml/qqmlcomponent.cpp:789
#15 0x00007fffeb42816d in QQuickView::continueExecute
(this=this at entry=0xd558b0)
at items/qquickview.cpp:476
#16 0x00007fffeb4288ad in QQuickViewPrivate::execute (this=0xe59860) at
items/qquickview.cpp:124
#17 0x00007fffeb64a205 in meth_QQuickView_setSource () from
/usr/lib/python3/dist-packages/PyQt5/QtQuick.so
#18 0x00000000004e172f in PyCFunction_Call ()
#19 0x000000000051aed4 in PyEval_EvalFrameEx ()
#20 0x0000000000523de7 in ?? ()
#21 0x0000000000524b0f in PyEval_EvalCode ()
#22 0x00000000005fd5f2 in ?? ()
#23 0x00000000005ffb2a in PyRun_FileExFlags ()
#24 0x00000000005ffd1c in PyRun_SimpleFileExFlags ()
#25 0x000000000063f886 in Py_Main ()
#26 0x00000000004d00e1 in main ()
Thanks,
Louis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20161103/a5ea9708/attachment.html>
More information about the PyQt
mailing list