Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct


    Qt World Summit: Early-Bird Tickets

    Unsolved crash on maximize with TreeView/FileSystemWatcher

    General and Desktop
    2
    16
    2984
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P
      pmh4514 last edited by pmh4514

      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: 
      
      1 Reply Last reply Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        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.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply Reply Quote 0
        • P
          pmh4514 last edited by pmh4514

          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

          1 Reply Last reply Reply Quote 0
          • SGaist
            SGaist Lifetime Qt Champion last edited by

            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 ?

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply Reply Quote 0
            • P
              pmh4514 last edited by

              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

              1 Reply Last reply Reply Quote 0
              • SGaist
                SGaist Lifetime Qt Champion last edited by

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

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                1 Reply Last reply Reply Quote 0
                • P
                  pmh4514 last edited by

                  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.DLL

                  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.

                  1 Reply Last reply Reply Quote 0
                  • SGaist
                    SGaist Lifetime Qt Champion last edited by

                    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 ?

                    Interested in AI ? www.idiap.ch
                    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                    P 1 Reply Last reply Reply Quote 0
                    • P
                      pmh4514 @SGaist last edited by pmh4514

                      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..

                      1 Reply Last reply Reply Quote 0
                      • P
                        pmh4514 last edited by

                        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.

                        1 Reply Last reply Reply Quote 0
                        • SGaist
                          SGaist Lifetime Qt Champion last edited by

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

                          Interested in AI ? www.idiap.ch
                          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                          1 Reply Last reply Reply Quote 0
                          • P
                            pmh4514 last edited by

                            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.

                            1 Reply Last reply Reply Quote 0
                            • SGaist
                              SGaist Lifetime Qt Champion last edited by

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

                              Interested in AI ? www.idiap.ch
                              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                              1 Reply Last reply Reply Quote 0
                              • P
                                pmh4514 last edited by

                                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.

                                1 Reply Last reply Reply Quote 0
                                • P
                                  pmh4514 last edited by

                                  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.

                                  1 Reply Last reply Reply Quote 0
                                  • SGaist
                                    SGaist Lifetime Qt Champion last edited by

                                    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.

                                    Interested in AI ? www.idiap.ch
                                    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                    1 Reply Last reply Reply Quote 0
                                    • First post
                                      Last post