Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. msvc2015 build - app crash (The CDB process terminated)
QtWS25 Last Chance

msvc2015 build - app crash (The CDB process terminated)

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
10 Posts 3 Posters 5.3k 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.
  • G Offline
    G Offline
    g4Rneck
    wrote on last edited by
    #1

    Hi,
    I 'm unable to run the app created with the msvc2015 kit (on Win 7). After running it, I'm getting:

    Starting J:\Projects\build-test2-Desktop_Qt_5_9_3_MSVC2015_64bit-Debug\debug\test2.exe...
    The program has unexpectedly finished.
    The process was ended forcefully.
    J:/Projects/build-test2-Desktop_Qt_5_9_3_MSVC2015_64bit-Debug/debug/test2.exe crashed.
    

    I have no problems with standard console application. Also I'm able to start the Qt samples with MinGW settings. The kit settings:alt text

    Re-installing the Qt didn't help. The app will crash for msvc2015 32/64-bit in debug/release mode. After trying to debug, I'm getting the pop-up:

    The CDB process terminated.
    

    (entering the main function).

    After running the .exe file from the debug folder:

    The program can't start because Qt5Guid.dll is missing from your computer. Try reinstalling the program to fix this problem. 
    

    I have copied the missing dlls - Qt5Cored.dll, Qt5Guid.dll, Qt5Networkd.dll, Qt5Qmld.dll. Now I don't have the error pop-ups but the app window also doesn't appear.

    After running it again from Qt Creator (with the libs copied), I'm getting:

    Starting J:\Projects\build-test2-Desktop_Qt_5_9_3_MSVC2015_64bit-Debug\debug\test2.exe...
    QML debugging is enabled. Only use this in a safe environment.
    test
    QQmlApplicationEngine failed to load component
    qrc:/main.qml:1 plugin cannot be loaded for module "QtQuick": Unable to load the library C:\Qt\5.9.3\msvc2015_64\qml\QtQuick.2\qtquick2plugind.dll: The specified module could not be found.
    
    J:/Projects/build-test2-Desktop_Qt_5_9_3_MSVC2015_64bit-Debug/debug/test2.exe exited with code -1
    

    In this case I can debug a little bit more:

        engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
        if (engine.rootObjects().isEmpty())
            return -1;//<- we're going here
    

    I also checked it on different PC but with msvc2017 kit, Win 10 SDK and Win 10 OS - I have similar crashes and errors.

    1 Reply Last reply
    0
    • J.HilkJ Offline
      J.HilkJ Offline
      J.Hilk
      Moderators
      wrote on last edited by
      #2

      to make sure, that you're running the correct cdb.exe:
      You are on Windows 8.1?


      Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


      Q: What's that?
      A: It's blue light.
      Q: What does it do?
      A: It turns blue.

      1 Reply Last reply
      1
      • G Offline
        G Offline
        g4Rneck
        wrote on last edited by
        #3

        No - it's a Windows 7.

        J.HilkJ 1 Reply Last reply
        0
        • G g4Rneck

          No - it's a Windows 7.

          J.HilkJ Offline
          J.HilkJ Offline
          J.Hilk
          Moderators
          wrote on last edited by
          #4

          @g4Rneck Well than you should change that setting (Drop down by "Debugger"), if the only options are 8.1 and 10, that you may have installed the wrong windows developer packet


          Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


          Q: What's that?
          A: It's blue light.
          Q: What does it do?
          A: It turns blue.

          1 Reply Last reply
          0
          • G Offline
            G Offline
            g4Rneck
            wrote on last edited by g4Rneck
            #5

            I installed the Microsoft Windows SDK for Windows 7 - I got the new debugger option:
            alt text
            but using it didn't help.

            1 Reply Last reply
            0
            • G Offline
              G Offline
              g4Rneck
              wrote on last edited by
              #6

              I have tried different thing - copying the .exe file to the C:\Qt\5.9.3\msvc2015_64\bin\ - the app is starting correctly (this way is working for debug/release msvc2015 and msvc2017).
              But if I copy the content of the bin folder (everything) to the app build directory (where the .exe will be generated) and run the .exe, the app is crashing:

              Microsoft Visual C++ Runtime Library
              ---------------------------
              Debug Error!
              
              Program: ...st02-Desktop_Qt_5_9_3_MSVC2017_64bit-Debug\debug\Qt5Cored.dll
              Module: 5.9.3
              File: kernel\qguiapplication.cpp
              Line: 1148
              
              This application failed to start because it could not find or load the Qt platform plugin "windows"
              in "".
              
              Reinstalling the application may fix this problem.
              

              If I run it from the Qt Creator:

              Starting H:\projects\build-qtTest02-Desktop_Qt_5_9_3_MSVC2017_64bit-Debug\debug\qtTest02.exe...
              QML debugging is enabled. Only use this in a safe environment.
              This application failed to start because it could not find or load the Qt platform plugin "windows"
              in "".
              
              Reinstalling the application may fix this problem.
              H:/projects/build-qtTest02-Desktop_Qt_5_9_3_MSVC2017_64bit-Debug/debug/qtTest02.exe exited with code 3
              

              Looks like I have the correct dlls etc. but I'm unable to use it - I have no idea.

              aha_1980A 1 Reply Last reply
              0
              • G g4Rneck

                I have tried different thing - copying the .exe file to the C:\Qt\5.9.3\msvc2015_64\bin\ - the app is starting correctly (this way is working for debug/release msvc2015 and msvc2017).
                But if I copy the content of the bin folder (everything) to the app build directory (where the .exe will be generated) and run the .exe, the app is crashing:

                Microsoft Visual C++ Runtime Library
                ---------------------------
                Debug Error!
                
                Program: ...st02-Desktop_Qt_5_9_3_MSVC2017_64bit-Debug\debug\Qt5Cored.dll
                Module: 5.9.3
                File: kernel\qguiapplication.cpp
                Line: 1148
                
                This application failed to start because it could not find or load the Qt platform plugin "windows"
                in "".
                
                Reinstalling the application may fix this problem.
                

                If I run it from the Qt Creator:

                Starting H:\projects\build-qtTest02-Desktop_Qt_5_9_3_MSVC2017_64bit-Debug\debug\qtTest02.exe...
                QML debugging is enabled. Only use this in a safe environment.
                This application failed to start because it could not find or load the Qt platform plugin "windows"
                in "".
                
                Reinstalling the application may fix this problem.
                H:/projects/build-qtTest02-Desktop_Qt_5_9_3_MSVC2017_64bit-Debug/debug/qtTest02.exe exited with code 3
                

                Looks like I have the correct dlls etc. but I'm unable to use it - I have no idea.

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

                Hi @g4Rneck,

                You have to read the error messages carefully:

                This application failed to start because it could not find or load the Qt platform plugin "windows"
                in "".

                Please add the qwindowsd.dll plugin to your app. You find it in your Qt folder under plugins/platforms and you have to add it to your program with the same folder structure.

                Note: the suffix 'd' tells you that these are debug DLLs. For the release version of your app you need the DLLs without 'd' at the end, like Qt5Core.dll

                Regards

                Qt has to stay free or it will die.

                1 Reply Last reply
                1
                • G Offline
                  G Offline
                  g4Rneck
                  wrote on last edited by
                  #8

                  You are right - creating similar folder structure with missing dlls will work - after adding next missing dlls from qml folder because of:

                  qrc:/main.qml:2 module "QtQuick.Controls" is not installed
                  qrc:/main.qml:1 module "QtQuick" is not installed
                  qrc:/main.qml:2 module "QtQuick.Controls" is not installed
                  qrc:/main.qml:1 module "QtQuick" is not installed
                  

                  The good thing is that after correct cleanup we have all dlls in one project but the directory structure with the qwindows*.dll should be added to the "upper" location. Ok - I'm able to create the app but it looks a little bit untidy for me.

                  Also I can understand that I will need to copy the dlls manually if I want to start the app directly from .exe file - but I'm not sure that it should be necessary if we run it from the Qt Creator.

                  Maybe it's normal but it was not needed for the MinGW kit. The next weird thing - my collegue is able to start the app from Qt Creator (msvc2015) in release mode without problems (and copying the dlls or adding extra project settings). The debug mode was not working (probably because he's using the wrong debugger).
                  Maybe he has some extra system env variables - I will check it tomorrow.

                  aha_1980A 1 Reply Last reply
                  0
                  • G g4Rneck

                    You are right - creating similar folder structure with missing dlls will work - after adding next missing dlls from qml folder because of:

                    qrc:/main.qml:2 module "QtQuick.Controls" is not installed
                    qrc:/main.qml:1 module "QtQuick" is not installed
                    qrc:/main.qml:2 module "QtQuick.Controls" is not installed
                    qrc:/main.qml:1 module "QtQuick" is not installed
                    

                    The good thing is that after correct cleanup we have all dlls in one project but the directory structure with the qwindows*.dll should be added to the "upper" location. Ok - I'm able to create the app but it looks a little bit untidy for me.

                    Also I can understand that I will need to copy the dlls manually if I want to start the app directly from .exe file - but I'm not sure that it should be necessary if we run it from the Qt Creator.

                    Maybe it's normal but it was not needed for the MinGW kit. The next weird thing - my collegue is able to start the app from Qt Creator (msvc2015) in release mode without problems (and copying the dlls or adding extra project settings). The debug mode was not working (probably because he's using the wrong debugger).
                    Maybe he has some extra system env variables - I will check it tomorrow.

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

                    @g4Rneck said in msvc2015 build - app crash (The CDB process terminated):

                    Also I can understand that I will need to copy the dlls manually if I want to start the app directly from .exe file - but I'm not sure that it should be necessary if we run it from the Qt Creator.

                    Normally this is not necessary - Creator adds the PATH environment variable to the Qt libraries in the run environment of your app. You can check this by clicking on Projects on the left bar -> Build & Run, then your Kit and Run: you will see the Run Environment.

                    The debug mode was not working (probably because he's using the wrong debugger).

                    Yeah, most likely. This should also work out of the box if everything is set up correctly.

                    Qt has to stay free or it will die.

                    1 Reply Last reply
                    0
                    • G Offline
                      G Offline
                      g4Rneck
                      wrote on last edited by
                      #10

                      I checked the env variables - it looks a little bit strange.

                      On the working configuration, the PATH env variable contains Qt\Tools\mingw530_32\bin and no msvc2015 related path.
                      In Qt Creator, the Build & Run config are using the System Environment (without manually performed modifications) but the Path contains Qt\5.9.3\msvc2015_64\bin (the MinGW bin location too of course).

                      My PC doesn't have the PATH with an item related to Qt build kit.
                      In Qt Creator, in Build & Run I have the Qt\5.9.3\msvc2015_64\lib but I didn't found the Qt\5.9.3\msvc2015_64\bin.

                      Of course after adding the C:\Qt\5.9.3\msvc2015_64\bin to the PATH, I'm able to run the app from Qt Creator and from the debug/release folder so looks like the problem is solved - but I still don't know how the working configuration generated an extra bin location in Build & Run.

                      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