Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. QtCreator delays/issues on Windows
Forum Updated to NodeBB v4.3 + New Features

QtCreator delays/issues on Windows

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
10 Posts 4 Posters 3.1k Views
  • 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.
  • S Offline
    S Offline
    SteveK
    wrote on last edited by
    #1

    I'm trying to get Qt working on a Windows 7 system and experiencing problems that I've not seen before. On starting QTCreator I get long delays followed by 2 repeated messages in the Issues window:

    :-1: error: Failed to retrieve MSVC Environment from "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Auxiliary\Build\vcvarsall.bat amd64":
    The command "C:\Windows\system32\cmd.exe" could not be started.

    These long delays and messages re-occur whatever I try to do it seems.

    My environment:

    QtCreator 4.5.1 (Based on Qt 5.10.1 (MSVC 2015, 32 bit))
    Qt 5.10.1 MSVC2017 64bit- via unified installer x86-3.0.2
    Microsoft Windows SDK for Windows 7 (7.1) 7.1.7600.0.30514

    Having persisted through all the long delays it does actually seem to have built my simplest projects but the delays etc are going to make it VERY difficult to use.

    Any help appreciated in getting to the root of and removing these.

    Thanks

    Steve

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

      Hi, did you also install the MSVC2017 compiler?

      S 1 Reply Last reply
      1
      • S SteveK

        I'm trying to get Qt working on a Windows 7 system and experiencing problems that I've not seen before. On starting QTCreator I get long delays followed by 2 repeated messages in the Issues window:

        :-1: error: Failed to retrieve MSVC Environment from "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Auxiliary\Build\vcvarsall.bat amd64":
        The command "C:\Windows\system32\cmd.exe" could not be started.

        These long delays and messages re-occur whatever I try to do it seems.

        My environment:

        QtCreator 4.5.1 (Based on Qt 5.10.1 (MSVC 2015, 32 bit))
        Qt 5.10.1 MSVC2017 64bit- via unified installer x86-3.0.2
        Microsoft Windows SDK for Windows 7 (7.1) 7.1.7600.0.30514

        Having persisted through all the long delays it does actually seem to have built my simplest projects but the delays etc are going to make it VERY difficult to use.

        Any help appreciated in getting to the root of and removing these.

        Thanks

        Steve

        aha_1980A Offline
        aha_1980A Offline
        aha_1980
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi @SteveK

        your problem sounds a bit like QTCREATORBUG-18976, which also mentions vcvars.bat.

        Regards

        Qt has to stay free or it will die.

        S 1 Reply Last reply
        0
        • hskoglundH hskoglund

          Hi, did you also install the MSVC2017 compiler?

          S Offline
          S Offline
          SteveK
          wrote on last edited by
          #4

          @hskoglund Sorry, yes I also installed professional edition of Visual Studio 2017.

          1 Reply Last reply
          0
          • aha_1980A aha_1980

            Hi @SteveK

            your problem sounds a bit like QTCREATORBUG-18976, which also mentions vcvars.bat.

            Regards

            S Offline
            S Offline
            SteveK
            wrote on last edited by
            #5

            @aha_1980 Yes it does if not identical. There are number of similar issues I've found. After much frustration and following an snippet in https://bugreports.qt.io/browse/QTCREATORBUG-19099 I tried turning of the organisation's installed Sophos services (anti virus etc) and this seems to stop the qtcreator problem occuring. However others in the organisation run with this without qtcreator problem. It isn't a long term solution to turn this off unfortunately so trying to track down a proper understanding of what causes the problem.

            Folowing QTCREATORBUG-18976 as mentioned by @aha_1980 I have downloaded DebugView and run qtcreator -profile. The following seems to essentially confirm the problem as indicated by the qtcreator Issues messages but may provide further insight. In my naive Windows view it looks like something is trying to run cmd.exe which is taking forever to return or not running. The time data doesn't seem to have copied properly but each of the 2 cmd.exe invocations seem to be given about 30 seconds.

            Is it correct to think that qtcreator is trying to run cmd.exe? For what reason, to get environment date perhaps?

            [7360] <delayedInitialize CppTools 1701ms ( 0ms)
            [7360] >delayedInitialize ProjectExplorer 1701ms ( 0ms)
            [7360] The command "C:\Windows\system32\cmd.exe" could not be started.
            [7360] QProcess: Destroyed while process ("C:\Windows\system32\cmd.exe") is still running.
            [7360] The command "C:\Windows\system32\cmd.exe" could not be started.
            [7360] QProcess: Destroyed while process ("C:\Windows\system32\cmd.exe") is still running.
            [7360] No tool chain set up in kit "Desktop" for "C".
            [7360] No tool chain set up in kit "Desktop" for "C++".
            [7360] No tool chain set up in kit "Desktop" for "C".
            [7360] No tool chain set up in kit "Desktop" for "C++".
            [7360] <delayedInitialize ProjectExplorer 62781ms ( 61080ms)
            [7360] >delayedInitialize TextEditor 62804ms ( 23ms)

            jsulmJ aha_1980A 2 Replies Last reply
            0
            • S SteveK

              @aha_1980 Yes it does if not identical. There are number of similar issues I've found. After much frustration and following an snippet in https://bugreports.qt.io/browse/QTCREATORBUG-19099 I tried turning of the organisation's installed Sophos services (anti virus etc) and this seems to stop the qtcreator problem occuring. However others in the organisation run with this without qtcreator problem. It isn't a long term solution to turn this off unfortunately so trying to track down a proper understanding of what causes the problem.

              Folowing QTCREATORBUG-18976 as mentioned by @aha_1980 I have downloaded DebugView and run qtcreator -profile. The following seems to essentially confirm the problem as indicated by the qtcreator Issues messages but may provide further insight. In my naive Windows view it looks like something is trying to run cmd.exe which is taking forever to return or not running. The time data doesn't seem to have copied properly but each of the 2 cmd.exe invocations seem to be given about 30 seconds.

              Is it correct to think that qtcreator is trying to run cmd.exe? For what reason, to get environment date perhaps?

              [7360] <delayedInitialize CppTools 1701ms ( 0ms)
              [7360] >delayedInitialize ProjectExplorer 1701ms ( 0ms)
              [7360] The command "C:\Windows\system32\cmd.exe" could not be started.
              [7360] QProcess: Destroyed while process ("C:\Windows\system32\cmd.exe") is still running.
              [7360] The command "C:\Windows\system32\cmd.exe" could not be started.
              [7360] QProcess: Destroyed while process ("C:\Windows\system32\cmd.exe") is still running.
              [7360] No tool chain set up in kit "Desktop" for "C".
              [7360] No tool chain set up in kit "Desktop" for "C++".
              [7360] No tool chain set up in kit "Desktop" for "C".
              [7360] No tool chain set up in kit "Desktop" for "C++".
              [7360] <delayedInitialize ProjectExplorer 62781ms ( 61080ms)
              [7360] >delayedInitialize TextEditor 62804ms ( 23ms)

              jsulmJ Online
              jsulmJ Online
              jsulm
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @SteveK If turning off Sophos solves the issue then Sophos is the problem. You need to tell Sophos to not to block QtCreator or other tools like compiler (I don't know how as I never used Sophos).

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

              S 1 Reply Last reply
              0
              • S SteveK

                @aha_1980 Yes it does if not identical. There are number of similar issues I've found. After much frustration and following an snippet in https://bugreports.qt.io/browse/QTCREATORBUG-19099 I tried turning of the organisation's installed Sophos services (anti virus etc) and this seems to stop the qtcreator problem occuring. However others in the organisation run with this without qtcreator problem. It isn't a long term solution to turn this off unfortunately so trying to track down a proper understanding of what causes the problem.

                Folowing QTCREATORBUG-18976 as mentioned by @aha_1980 I have downloaded DebugView and run qtcreator -profile. The following seems to essentially confirm the problem as indicated by the qtcreator Issues messages but may provide further insight. In my naive Windows view it looks like something is trying to run cmd.exe which is taking forever to return or not running. The time data doesn't seem to have copied properly but each of the 2 cmd.exe invocations seem to be given about 30 seconds.

                Is it correct to think that qtcreator is trying to run cmd.exe? For what reason, to get environment date perhaps?

                [7360] <delayedInitialize CppTools 1701ms ( 0ms)
                [7360] >delayedInitialize ProjectExplorer 1701ms ( 0ms)
                [7360] The command "C:\Windows\system32\cmd.exe" could not be started.
                [7360] QProcess: Destroyed while process ("C:\Windows\system32\cmd.exe") is still running.
                [7360] The command "C:\Windows\system32\cmd.exe" could not be started.
                [7360] QProcess: Destroyed while process ("C:\Windows\system32\cmd.exe") is still running.
                [7360] No tool chain set up in kit "Desktop" for "C".
                [7360] No tool chain set up in kit "Desktop" for "C++".
                [7360] No tool chain set up in kit "Desktop" for "C".
                [7360] No tool chain set up in kit "Desktop" for "C++".
                [7360] <delayedInitialize ProjectExplorer 62781ms ( 61080ms)
                [7360] >delayedInitialize TextEditor 62804ms ( 23ms)

                aha_1980A Offline
                aha_1980A Offline
                aha_1980
                Lifetime Qt Champion
                wrote on last edited by
                #7

                Hi @SteveK,

                Is it correct to think that qtcreator is trying to run cmd.exe? For what reason, to get environment date perhaps?

                Creator runs vcvars32.bat which detects the Visual Studio compilers to know which Visual Studio compilers are available.

                I've seen some problems with this mechanism recently, most often because the bat script takes very long time to finish. Some Users talk about minutes. Normally it should take less than 5 seconds. You can try yourself by calling the "Visual Studio Command Prompt" by Windows Start Menu.

                You can also comment to the bugreport to tell you are effected too, and you can search here in the forum, I remember we had similar issues here and some users managed to solve the problems.

                Qt has to stay free or it will die.

                S 1 Reply Last reply
                0
                • jsulmJ jsulm

                  @SteveK If turning off Sophos solves the issue then Sophos is the problem. You need to tell Sophos to not to block QtCreator or other tools like compiler (I don't know how as I never used Sophos).

                  S Offline
                  S Offline
                  SteveK
                  wrote on last edited by
                  #8

                  @jsulm That's an opinion that I have a fair amount of sympathy with right now, trust me. Various things to Sophos's list of exclusions on my behalf but none seem to be solving the problem as yet.

                  1 Reply Last reply
                  0
                  • aha_1980A aha_1980

                    Hi @SteveK,

                    Is it correct to think that qtcreator is trying to run cmd.exe? For what reason, to get environment date perhaps?

                    Creator runs vcvars32.bat which detects the Visual Studio compilers to know which Visual Studio compilers are available.

                    I've seen some problems with this mechanism recently, most often because the bat script takes very long time to finish. Some Users talk about minutes. Normally it should take less than 5 seconds. You can try yourself by calling the "Visual Studio Command Prompt" by Windows Start Menu.

                    You can also comment to the bugreport to tell you are effected too, and you can search here in the forum, I remember we had similar issues here and some users managed to solve the problems.

                    S Offline
                    S Offline
                    SteveK
                    wrote on last edited by
                    #9

                    @aha_1980 Thanks again. Yes I'd seen various things of this nature. Do you mean vcvars32.bat rather than vcvarsall.bat? The latter is referred to in the qtcreator Issue. Not tried the former as a sophos exclusion yet. I've tried vcvars32.bat and "vcvarsall.bat amd64" from the qtcreator command prompt but both return in just a few seconds. I will try more searching in this forum.

                    aha_1980A 1 Reply Last reply
                    0
                    • S SteveK

                      @aha_1980 Thanks again. Yes I'd seen various things of this nature. Do you mean vcvars32.bat rather than vcvarsall.bat? The latter is referred to in the qtcreator Issue. Not tried the former as a sophos exclusion yet. I've tried vcvars32.bat and "vcvarsall.bat amd64" from the qtcreator command prompt but both return in just a few seconds. I will try more searching in this forum.

                      aha_1980A Offline
                      aha_1980A Offline
                      aha_1980
                      Lifetime Qt Champion
                      wrote on last edited by
                      #10

                      @SteveK said in QtCreator delays/issues on Windows:

                      Do you mean vcvars32.bat rather than vcvarsall.bat?

                      Maybe I confused these bat files; I just know that one is run by another. Please use what is referenced in the reports.

                      I've tried vcvars32.bat and "vcvarsall.bat amd64" from the qtcreator command prompt but both return in just a few seconds. I will try more searching in this forum.

                      Can you try to run the batch file from outside Creator? Ideally after booting the system. I have the strange feeling that there is some "caching" involved.

                      Otherwise I cannot help you much further, I don't have this problem and don't really know how to proceed.

                      Qt has to stay free or it will die.

                      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