property alias causes crash in 5.9.1

  • When calling createObject() on the component with property alias, crash happens.

    The code snipet is as follows.
    import QtQuick 2.7
    import QtQuick.Controls 2.0
    import QtQuick.Layouts 1.3

    ApplicationWindow {
    visible: true
    width: 640
    height: 480
    title: qsTr("Hello World")

    Item {
        id: root
        anchors.fill: parent
        Foo {
            id: foo
        Timer {
            id: timer
            running: true
            repeat: true
            interval: 1000
            onTriggered: {
                foo.createObject(root, {"foo": 0.5, "foo2": 2, "foo3": true})


    Component {
    Item {
    property alias foo: bar.opacity
    property alias foo2: bar.scale
    property alias foo3: bar.visible

        id: foo
        x: 100
        y: 100
        width: 100
        height: 100
        Rectangle {
            id: bar
            anchors.fill: parent
            color: "green"


  • Failed to attach screenshot.

    The assert dialog shows
    "properties.count == propertyIndexCache.count()" in file qml\qqmlpropertycache.cpp, line 1188.

  • @Surka Hi. Property alias and the Item id has the same name foo - it can't be the same. I also don't think that Rectangle has property scale.

  • @m-kuncevicius Yes, that's my typo. But it is irrelavant to the crash. The issue here is Qt reporting its internal assertion. btw, scale is property of Item.

Log in to reply