Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QtCreator takes a long time to load DLLs during debug session
Forum Updated to NodeBB v4.3 + New Features

QtCreator takes a long time to load DLLs during debug session

Scheduled Pinned Locked Moved Unsolved General and Desktop
8 Posts 6 Posters 1.9k Views 1 Watching
  • 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.
  • K Offline
    K Offline
    kitfox
    wrote on last edited by kitfox
    #1

    I've recently added a few files to my project (nothing much - just a few QWidget forms and a couple of small svg files to the qrc), but now it takes several minutes to launch my program via the debugger. Looking at the status bar in the debug window, QtCreator is loading one dll after another, some of which belong to programs that could not possible be relevant. This takes about 3 minutes all together.

    Something similar happens if I try to show a QFileDialog. There's three or more minutes of waiting while the debugger loads dlls. Some of the dlls are from under Qt's install directory, many are from c:\windows\sysWOW64, and some are from other installed programs that should have nothing to do with my code or Qt.

    I'm wondering what's going on. Can I reduce this load?

    jsulmJ 1 Reply Last reply
    2
    • K kitfox

      I've recently added a few files to my project (nothing much - just a few QWidget forms and a couple of small svg files to the qrc), but now it takes several minutes to launch my program via the debugger. Looking at the status bar in the debug window, QtCreator is loading one dll after another, some of which belong to programs that could not possible be relevant. This takes about 3 minutes all together.

      Something similar happens if I try to show a QFileDialog. There's three or more minutes of waiting while the debugger loads dlls. Some of the dlls are from under Qt's install directory, many are from c:\windows\sysWOW64, and some are from other installed programs that should have nothing to do with my code or Qt.

      I'm wondering what's going on. Can I reduce this load?

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @kitfox Did you try to disable your anti-virus software to see whether it makes a difference?

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • K Offline
        K Offline
        kitfox
        wrote on last edited by
        #3

        I disabled it, but that did not change anything.

        1 Reply Last reply
        1
        • K Offline
          K Offline
          kitfox
          wrote on last edited by kitfox
          #4

          My debugger log is over 1000 lines long. Looking through it, you can see the same dlls being loaded and unloaded many times over. Here's a snippet from the tail end of my log:

          >=thread-created,id="15",group-id="i1"
          sThread 15 created.
          >~"[New Thread 29348.0x9258]\n"
          s[New Thread 29348.0x9258]
          >*running,thread-id="all"
          >=library-loaded,id="C:\\WINDOWS\\SysWOW64\\ntmarta.dll",target-name="C:\\WINDOWS\\SysWOW64\\ntmarta.dll",host-name="C:\\WINDOWS\\SysWOW64\\ntmarta.dll",symbols-loaded="0",thread-group="i1"
          sLibrary C:\WINDOWS\SysWOW64\ntmarta.dll loaded.
          
          >=library-loaded,id="C:\\WINDOWS\\SysWOW64\\WinTypes.dll",target-name="C:\\WINDOWS\\SysWOW64\\WinTypes.dll",host-name="C:\\WINDOWS\\SysWOW64\\WinTypes.dll",symbols-loaded="0",thread-group="i1"
          sLibrary C:\WINDOWS\SysWOW64\WinTypes.dll loaded.
          
          >=library-loaded,id="C:\\WINDOWS\\SysWOW64\\WinTypes.dll",target-name="C:\\WINDOWS\\SysWOW64\\WinTypes.dll",host-name="C:\\WINDOWS\\SysWOW64\\WinTypes.dll",symbols-loaded="0",thread-group="i1"
          sLibrary C:\WINDOWS\SysWOW64\WinTypes.dll loaded.
          
          >=library-unloaded,id="C:\\WINDOWS\\SysWOW64\\ntmarta.dll",target-name="C:\\WINDOWS\\SysWOW64\\ntmarta.dll",host-name="C:\\WINDOWS\\SysWOW64\\ntmarta.dll",thread-group="i1"
          sLibrary C:\WINDOWS\SysWOW64\ntmarta.dll unloaded.
          >=library-unloaded,id="C:\\WINDOWS\\SysWOW64\\WinTypes.dll",target-name="C:\\WINDOWS\\SysWOW64\\WinTypes.dll",host-name="C:\\WINDOWS\\SysWOW64\\WinTypes.dll",thread-group="i1"
          sLibrary C:\WINDOWS\SysWOW64\WinTypes.dll unloaded.
          >=library-unloaded,id="C:\\WINDOWS\\SysWOW64\\WinTypes.dll",target-name="C:\\WINDOWS\\SysWOW64\\WinTypes.dll",host-name="C:\\WINDOWS\\SysWOW64\\WinTypes.dll",thread-group="i1"
          sLibrary C:\WINDOWS\SysWOW64\WinTypes.dll unloaded.
          >=library-loaded,id="C:\\WINDOWS\\SysWOW64\\WinTypes.dll",target-name="C:\\WINDOWS\\SysWOW64\\WinTypes.dll",host-name="C:\\WINDOWS\\SysWOW64\\WinTypes.dll",symbols-loaded="0",thread-group="i1"
          sLibrary C:\WINDOWS\SysWOW64\WinTypes.dll loaded.
          
          >=library-loaded,id="C:\\WINDOWS\\SysWOW64\\ntmarta.dll",target-name="C:\\WINDOWS\\SysWOW64\\ntmarta.dll",host-name="C:\\WINDOWS\\SysWOW64\\ntmarta.dll",symbols-loaded="0",thread-group="i1"
          sLibrary C:\WINDOWS\SysWOW64\ntmarta.dll loaded.
          
          1 Reply Last reply
          1
          • A Offline
            A Offline
            antred
            wrote on last edited by antred
            #5

            I'm having the exact same problem. I'm trying to debug my Qt GUI application (using the mingw compiler) on Windows 10, and it takes several MINUTES to load all those DLLs from the SysWOW64 folder (and from some Qt folders as well). Though I (not so fondly) remember having this same issue on Windows 7 a couple years ago, so it's not Windows 10 specific ... or 64-bit specific, for the matter, as back then my program was still a 32-bit application.

            If I debug an application in Visual Studio, it starts up pretty much instantly, so I don't really get why Qt Creator takes like half a century to get going. :-\

            1 Reply Last reply
            0
            • hskoglundH Offline
              hskoglundH Offline
              hskoglund
              wrote on last edited by
              #6

              Hi, just a guess, but maybe you could preempt that loading/unloading of the same DLLs many times, by manually force-loading them (using LoadLibrary() for example) at the start of your program?

              1 Reply Last reply
              1
              • N Offline
                N Offline
                Neptilo
                wrote on last edited by
                #7

                I know this thread is very old, but I've just spent 3 hours troubleshooting this problem and I tought it'd be useful if I shared my findings for future visitors.

                In my case, the thing that made a huge difference in DLL loading times was the presence of breakpoints in the program.
                So that's it: try to disable the breakpoints and see if it helps.

                1 Reply Last reply
                2
                • M Offline
                  M Offline
                  Marian Saenger
                  wrote on last edited by Marian Saenger
                  #8

                  Under Preferences -> Debugger -> GDB Tab, type
                  set auto-solib-add off
                  in the window for additional startup commands .. Best Regards Marian

                  1 Reply Last reply
                  0

                  • Login

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Users
                  • Groups
                  • Search
                  • Get Qt Extensions
                  • Unsolved