Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-17775

Crash when using FolderListModel with a Repeater

    XMLWordPrintable

Details

    • 6d7c12ae3f3d0eae6946524ce023ac452cf188c4

    Description

      A Qt Quick application created with Qt SDK 1.1 Tech Preview with main.qml having the following contents crashes:

      import QtQuick 1.0
      import Qt.labs.folderlistmodel 1.0
      
      Rectangle {
          width: 360
          height: 360
      
          FolderListModel {
              id: folderModel
              folder: "file:///c:/"
          }
      
          Grid {
              anchors.fill: parent
              columns: 3
      
              Repeater {
                  model: folderModel
                  delegate: Rectangle {
                      width:100
                      height:100
                      color:"blue"
                      Text {
                          anchors.centerIn: parent
                          text: fileName
                      }
                  }
              }
          }
          MouseArea {
              anchors.fill: parent
              onClicked: {
                  Qt.quit();
              }
          }
      }
      

      Application output:

      ASSERT failure in QList<T>::take: "index out of range", file ..\..\include/QtCore/../../../../../../ndk_buildrepos/qt-desktop/src/corelib/tools/qlist.h, line 472
      Invalid parameter passed to C runtime function.
      Invalid parameter passed to C runtime function.
      

      If I replace the FolderListModel with a basic ListModel the application works as expected.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            martjone Martin Jones (closed Nokia identity) (Inactive)
            latej Lauri Jääskelä
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes