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

QFileSystemModel crashes if you create a file in the rootPath.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Incomplete
    • Icon: Not Evaluated Not Evaluated
    • None
    • 4.7.1
    • None
    • (tested under Windows XP, Linux and Mac OS 10.5 and Mac OS 10.7)

      I've got a crash using the QFileSystemModel. Our Application uses two QFileSystemModel Objects with different root directories. The first rootDir is the current user's desktop ($HOME/Desktop). The second rootDir uses the $HOME/Pictures directory.

      However, if I create or delete a directory in the $HOME dir while our application is running, the application crashes. Please have a look at the attached crash report (especially Thread 0 and Thread 9). We are using Qt 4.7.1. It seems interesting that $HOME is the parent directory of the two root directories mentioned before.

      so in pseudo code, the crash works this way:

      QFileSystemModel *m1 = new QFileSystemModel();
      m1->setRootPath("/users/ralf/Desktop");
      QTreeView * v1 = new QTreeView();
      v1->setModel(m1);

      QFileSystemModel *m2 = new QFileSystemModel();
      m2->setRootPath("/users/ralf/Pictures");
      QTreeView * v2 = new QTreeView();
      v2->setModel(m2);
      ...
      QDir().makeDir("/users/ralf/crashme"); // Program crashes in this line.

      You may also crash the Program from the outside by creating the directory eg. from the command line.

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

            Unassigned Unassigned
            ralfwirth Ralf Wirth
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes