Important: Please read the Qt Code of Conduct -

QtQuick 2 unreliable, breaking and showing "anonymous" error messages ?!?

  • I am getting "anonymous" error messages from QML, bindings breaking in automated testing environment. Note that all code works perfectly well when the user interacts with it, but as soon as I run automated testing to simulate prolonged user experience, I begin getting those "errors" as well as breakage of bindings. It is curious that the breakage seems to be entirely arbitrary, I could not find any specific condition that causes it and in 99% of the time it works... except when it doesn't...


    Tools.js line 6 is:
    @return component.createObject(parent, options)@

    used for the dynamic instantiation of elements. The other error in GroupUI.qml is a byproduct of the failure to create an object. But oddly enough, it is still not including any valid error message, just file and line.

    This leads me to believe there is buggy behavior in the process of dynamic instantiation of QML objects. It seems to break when occurring at high speed, in my case, loading/restoring the state of a serialized project file, which I have to manually slow down so it doesn't fail. And due to the nature of the operation, it is not possible to detach this process from the main thread using a worker script since it needs to work in the QML engine context.

    The same process works perfectly fine using C++ and the QGS GUI stack.

    Any ideas why it might be breaking?

Log in to reply