crash on maximize with TreeView/FileSystemWatcher

  • Hello,

    My Qt5.5 Widgets based application crashes when I maximize the window. I traced through my whole real project and isolated where it is happening, and was able to reproduce the problem in a very small sample application, the entirety of which is pasted below:

    MainWindow::MainWindow(QWidget *parent) :
        ui(new Ui::MainWindow)
        QDockWidget* dock = new QDockWidget(tr("Explorer"), this);
        addDockWidget(Qt::LeftDockWidgetArea, dock);
        QTreeView* treeView_explorer = new QTreeView(this);
        QFileSystemModel* dirModel = new QFileSystemModel(dock);
        dirModel->setFilter(QDir::NoDotAndDotDot | QDir::AllDirs | QDir::AllEntries);

    When I run this on my development PC, I can maximize, minimize, resize the window without any problems.
    When I run it on my production PC, as soon as I hit the maximize button in the titlebar, the window expands to full-size, the tree-view is empty and I get a runtime exception.

    Windows event viewer shows the following as a result. Both PCs are running Win8.1.

    IF I comment out the line to setRootPath, the problem goes away, but of course then I lose the "file system watcher" functionality. Also, if I undock the widget, then maximize/minimize works fine..

    Any ideas? Thanks!

    Faulting application name: TestExplorer.exe, version:, time stamp: 0x56ffbd4b
    Faulting module name: Qt5Gui.dll, version:, time stamp: 0x561c0741
    Exception code: 0xc0000005
    Fault offset: 0x0000000000234180
    Faulting process id: 0x78c
    Faulting application start time: 0x01d18cdd20f7f20b
    Faulting application path: C:\TEST\TestExplorer.exe
    Faulting module path: C:\TEST\Qt5Gui.dll
    Report Id: 6001ef57-f8d0-11e5-8265-901b0e8c3bae
    Faulting package full name: 
    Faulting package-relative application ID: 

  • Lifetime Qt Champion


    What version of Qt did you install ?

    And a silly question: does your production PC have a C drive ? Some aren't using C as default. It should not lead to a crash though.

  • Hi - it's Qt5.1 64bit MSVC2012
    Yes there is a c: drive on the production machine. the drive structure and network attached drives are the same as on my dev box.. Each production machine I've tried shows the same issue.

    EDIT: Qt5.5.1 not 5.1

  • Lifetime Qt Champion

    Something's not clear, on your original post, you are writing about Qt 5.5.1 and not 5.1, which are you using ?
    One thing that I find surprising is that the faulty module is Qt5Gui since QFileSystemModel is part of the widgets module.

    How did you prepare your application for deployment ? Did you use windeployqt ?

  • Sorry, version 5.5, I mistyped.. Note the faulty module is 5.5.1

    All I did was compile the "release" build and then run it from a folder that contained all of the required DLLs.. Everything else about the application works just fine... Or maybe that's the problem, perhaps a required DLL is missing.. I'll go run depends.exe to see

    I'm not familiar with windeployqt, I'll have to learn about that as well

  • Lifetime Qt Champion

    windeployqt is a helper tool to ease Windows deployment. It should help you get started quickly.

  • So I ran the dependency walker, it only showed the following missing but I'm not sure where to acquire these:


    Just to see, I copied over every single DLL from the Qt installation to my "production" machine runtime folder, and the problem persists.

    Maybe I'll try a re-install/repair of the visual studio redists next.

  • Lifetime Qt Champion

    None of these are needed.

    Did you also take the plugins into account ?

    And to be sure, you are not copying them from Qt Creator's folder ?

  • I copied the DLLs from C:\Qt\Qt5.5.1\5.5\msvc2013_64\bin

    (I think I also mispoke earlier when I said 2012. been a long weekend...)

    Still no luck after doing "repair" on the VC redist packages..

    I do have a /plugins folder present, and a qt.conf file which specifies the path to it

    edit: how can I tell if a plugin is missing?

    edit2: I put all plugins folders in my plugins folder, and still no luck..

  • ok so I tried this on a 4th PC (3 identical machines are showing the issue.) The 4th PC, no problem. This must have something to do with the filesystem or windows settings then, I really am at a loss! I have commercial license support from Qt, I've reached out to them as well.

  • Lifetime Qt Champion

    How are you handling these machines ? All systems from a common clone ?

  • generally we do a common clone, but in this case no. I say "production" but by that I just mean "not my development PC" (no Qt or visual studio installed)- the whole project is still not formally released.

  • Lifetime Qt Champion

    Ok, did these 4 PCs got setup the same way ? All running Windows 8.1 with the same level of updates ?

  • I think so but am not sure, a colleague of mine set them up. As far as I know they were all fresh Win8.1 setups, all latest windows updates applied.. I'll have to investigate that further.

  • Still no luck on this one. I reached out to Qt support, they thought it might be the same as this bug:

    But I verified there were no 3rd party software installed.. Baffling..
    One one of the PCs that was failing consistently, I updated it to Win10 and the problem went away.

    This might be workable for me as all "production machines" are still under my control, but it's rather disappointing.

  • Lifetime Qt Champion

    Any other application that might be using Qt on these systems ?

    I have used QFileSystemModel with Windows 8.1 without any problem. However I've been in a similar case as described in the bug report so I'd say it's worth to check what may have been installed on these machines.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.