QtCreator takes a long time to load DLLs during debug session



  • 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?


  • Qt Champions 2018

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



  • I disabled it, but that did not change anything.



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


  • 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. :-\



  • 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?


Log in to reply
 

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