Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

I have a crash with ListView



  • Hi everyone!

    I'm developing a simple app with a one ListView. This ListView must shown a long content from server. The datas was got and shown correct. But when user scrolling down to the end of data the application is crashes with message in console:
    @
    Assertion failed: (_consumed <= scratch_size), function _hb_coretext_shape, file src/hb-coretext.cc, line 764.
    The program has unexpectedly finished.
    @

    The source code of mu ListsView look like:
    @
    ListView {
    id: eventsList
    anchors {top: configurationRow.bottom; topMargin: 10}
    width: parent.width
    height: parent.height - configurationRow.height - 20
    clip: true
    currentIndex: -1
    spacing: 5
    highlight: Component {
    id: highlightBar

                Rectangle {
                    width: eventsList.width
                    height: (eventsList.currentItem !== null) ? eventsList.currentItem.height : 30;
                    color: "transparent"
                    border {color: "lightblue"; width: 1}
                    z: 9999
                    y: (eventsList.currentItem !== null) ? eventsList.currentItem.y : -30;
    
                    Behavior on y { SpringAnimation { spring: 2; damping: 0.1} }
                }
            }
            highlightFollowsCurrentItem: false
            delegate: Rectangle {
                id: listItemView
                width: eventsList.width
                height: contentColumn.height
                clip: true
                color: "white"
    
                property var item: appRoot.events[index];
    
                Column {
                    id: contentColumn
                    x: 5
                    y: 5
                    width: parent.width - 10
                    height: contentLabel.height + contentLabel.y + 10
                    spacing: 5
    
                    RowLayout {
                        id: headerRowLayout
                        width: parent.width
                        height: Math.max(authorLabel.height, createdDateLabel.height)
    
                        Label {
                            id: authorLabel
                            anchors.left: parent.left
                            width: authorLabel.contentWidth
                            height: authorLabel.contentHeight
                            font {family: "Helvetica Neue"; pointSize: 12}
                            elide: Text.ElideRight
                            color: "#999"
                            text: listItemView.item.data.user.name
                        }
    
                        Label {
                            id: createdDateLabel
                            anchors.right: parent.right
                            width: createdDateLabel.contentWidth
                            height: createdDateLabel.contentHeight
                            font {family: "Helvetica Neue"; pointSize: 12}
                            elide: Text.ElideRight
                            color: "#999"
                            text: listItemView.item.created_at
                        }
                    }
    
                    Label {
                        id: contentLabel
                        width: parent.width
                        height: contentLabel.contentHeight
                        font {family: "Helvetica Neue"; pointSize: 14}
                        horizontalAlignment: Qt.AlignLeft
                        verticalAlignment: Qt.AlignVCenter
                        wrapMode: Text.WordWrap
    

    // elide: Text.ElideRight
    text: {
    if(listItemView.item.target_type === "Comment")
    {
    return listItemView.item.data.text;
    }
    else if(listItemView.item.target_type === "Document")
    {
    return listItemView.item.data.name;
    }
    else if(listItemView.item.target_type === "Task")
    {
    return listItemView.item.data.text;
    }
    }
    }
    }

                MouseArea {
                    anchors.fill: parent
                    onClicked: {
                        eventsList.currentIndex = index;
    
                        ///TODO: Need to implement selection event.
                    }
                }
            }
    
            onCountChanged: {
                //Some code here
            }
        }
    

    @

    Could you help me with this bug? I can't find solution in google. Thanks for the any help.



  • Hi everyone!

    Today I've tried to load new QtCreator from "master":http://download.qt-project.org/snapshots/qtcreator/master/2014-06-10_239/qt-creator-opensource-mac-x86_64-master.dmg and get the same crash after load QtCreator.
    The full crash log you can find "here":http://dshav.com/logs/qtcreator_crash.log.

    I've tried load QtCreator using Macbook Pro with Retina display and MacOS 10.10 Beta 2.


Log in to reply