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) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); QDockWidget* dock = new QDockWidget(tr("Explorer"), this); dock->setObjectName("dock_explorer"); dock->setAllowedAreas(Qt::LeftDockWidgetArea); addDockWidget(Qt::LeftDockWidgetArea, dock); QTreeView* treeView_explorer = new QTreeView(this); treeView_explorer->setContextMenuPolicy(Qt::CustomContextMenu); dock->setWidget(treeView_explorer); QFileSystemModel* dirModel = new QFileSystemModel(dock); dirModel->setFilter(QDir::NoDotAndDotDot | QDir::AllDirs | QDir::AllEntries); dirModel->setRootPath("c:/"); treeView_explorer->setModel(dirModel); }
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: 0.0.0.0, time stamp: 0x56ffbd4b Faulting module name: Qt5Gui.dll, version: 5.5.1.0, 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:
-
Hi,
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.
-
-
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
-
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:
API-MS-WIN-CORE-KERNAL32-PRIVATE-L1-1-1.DLL
API-MS-WIN-CORE-PRIVATEPROFILE-LT-1-1.DLL
API-MS-WIN-SERVICE-PRIVATE-L1-1-1.DLL
API-MS-WIN-CORE-SHUTDOWN-L1-1-1.DLL
EXT-MS-WIN-NTUSER-UICONTEXT-EXT-L1-1-0.DLL
IESHIMS.DLLJust 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.
-
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 ?
-
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.
-
How are you handling these machines ? All systems from a common clone ?
-
Ok, did these 4 PCs got setup the same way ? All running Windows 8.1 with the same level of updates ?
-
Still no luck on this one. I reached out to Qt support, they thought it might be the same as this bug:
https://bugreports.qt.io/browse/QTBUG-51065
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.
-
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.