[PyQt] Custom QQuickWindow crashes when created from QML with PyQt 5.8/Qt 5.8

Cody Scott cody at perspexis.com
Tue Feb 21 13:36:45 GMT 2017


This "stops working" on Windows 10 with PyQt5==5.8

Also thanks for the minimal C++ code!


On Mon, Feb 20, 2017 at 11:33 AM, Arjen Hiemstra <a.hiemstra at ultimaker.com>
wrote:

> Hi,
>
> I have attached a minimal test case that crashes when run. The code
> exposes a
> custom QQuickWindow subclass to QML, then uses QML to instantiate it. I
> have
> also attached a C++ file which does the same thing as the Python code, but
> does
> not crash. The same code also works fine when run with PyQt 5.7.1/Qt 5.7.
>
> Additionally, changing all the property assignments to a
> Component.onCompleted
> signal handler will not crash. But that means manually setting up
> connections
> for signals, which gets ugly really fast.
>
> This is the backtrace:
>
> #0  0x00007ffff5b26594 in QWindow::screen() const () from /usr/lib/
> libQt5Gui.so.5
> #1  0x00007ffff5b28e8d in QWindowPrivate::applyCursor() () from /usr/lib/
> libQt5Gui.so.5
> #2  0x00007ffff5b2a7bb in QWindow::setVisible(bool) () from /usr/lib/
> libQt5Gui.so.5
> #3  0x00007ffff5b2c7a8 in ?? () from /usr/lib/libQt5Gui.so.5
> #4  0x00007fffedb58aa8 in ?? () from /usr/lib/libQt5Qml.so.5
> #5  0x00007fffedbd9d3a in ?? () from /usr/lib/libQt5Qml.so.5
> #6  0x00007fffedbdd56c in ?? () from /usr/lib/libQt5Qml.so.5
> #7  0x00007fffedbded6c in ?? () from /usr/lib/libQt5Qml.so.5
> #8  0x00007fffedbdb392 in ?? () from /usr/lib/libQt5Qml.so.5
> #9  0x00007fffedbdc104 in ?? () from /usr/lib/libQt5Qml.so.5
> #10 0x00007fffedbdd18e in ?? () from /usr/lib/libQt5Qml.so.5
> #11 0x00007fffedb5ca67 in QQmlComponentPrivate::
> beginCreate(QQmlContextData*)
> () from /usr/lib/libQt5Qml.so.5
> #12 0x00007fffedb59f69 in QQmlComponent::create(QQmlContext*) () from
> /usr/
> lib/libQt5Qml.so.5
> #13 0x00007fffedbd0c83 in QQmlApplicationEnginePrivate::
> _q_finishLoad(QObject*)
> () from /usr/lib/libQt5Qml.so.5
> #14 0x00007fffedbd0e92 in QQmlApplicationEnginePrivate::startLoad(QUrl
> const&,
> QByteArray const&, bool) () from /usr/lib/libQt5Qml.so.5
> #15 0x00007fffedbd0ff0 in QQmlApplicationEngine::load(QString const&) ()
> from
> /usr/lib/libQt5Qml.so.5
> #16 0x00007fffedf64390 in meth_QQmlApplicationEngine_load
> (sipSelf=0x7fffee2683a8, sipArgs=0x7fffee222828) at
> sipQtQmlQQmlApplicationEngine.cpp:375
> #17 0x00007ffff741891f in _PyCFunction_FastCallDict () from /usr/lib/
> libpython3.6m.so.1.0
> #18 0x00007ffff7427a0f in ?? () from /usr/lib/libpython3.6m.so.1.0
> #19 0x00007ffff73e3d77 in _PyEval_EvalFrameDefault () from /usr/lib/
> libpython3.6m.so.1.0
> #20 0x00007ffff7427f47 in PyEval_EvalCodeEx () from /usr/lib/
> libpython3.6m.so.
> 1.0
> #21 0x00007ffff73e3a5b in PyEval_EvalCode () from /usr/lib/
> libpython3.6m.so.
> 1.0
> #22 0x00007ffff74acdc2 in ?? () from /usr/lib/libpython3.6m.so.1.0
> #23 0x00007ffff74af62d in PyRun_FileExFlags () from /usr/lib/
> libpython3.6m.so.
> 1.0
> #24 0x00007ffff74af817 in PyRun_SimpleFileExFlags () from /usr/lib/
> libpython3.6m.so.1.0
> #25 0x00007ffff74a46f1 in Py_Main () from /usr/lib/libpython3.6m.so.1.0
> #26 0x0000000000400a5d in main ()
>
> _______________________________________________
> PyQt mailing list    PyQt at riverbankcomputing.com
> https://www.riverbankcomputing.com/mailman/listinfo/pyqt
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20170221/3878a2f1/attachment.html>


More information about the PyQt mailing list