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. deployed via windeployqt wont run but stays in background (task manager)
Forum Updated to NodeBB v4.3 + New Features

deployed via windeployqt wont run but stays in background (task manager)

Scheduled Pinned Locked Moved Solved Installation and Deployment
10 Posts 3 Posters 1.5k Views 2 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.
  • S Offline
    S Offline
    shokarta
    wrote on last edited by
    #1

    Dear all,

    I have set the build the project as release under MSVC2017 32bit,
    the folder with release was created, exe file inside also created.
    While the released project was running via QT Creator, I have run following code:

    windeployqt c:\QML\Projects\build-TeamBonus-Desktop_Qt_5_12_0_MSVC2017_32bit-Release\release\TeamBonus.exe
    

    from this path:

    c:\Qt\5.13.0\msvc2017\bin
    

    there was no error there at all, all dependencies were copied into the folder, so I have tested it by closing QT and runing the exe file, but nothing happend (no error, but the app stayed in task manager in background).

    somewhere on different guide:
    https://github.com/daviddrell/visualsc/wiki/How-to-Deploy-a-Qt-5-Application-for-Windows#4-missing-qt-dll-dependency
    I did read that for some reason Qt5OpenGL.dll is not copied, so i tried to copy it myself and the issue was not solved... Later I copied ALL files from Qt\5.13.0\msvc2017\bin to release folder (just to be sure there is realy no dll missing in release directory), but still no luck...

    There is one thing, however I think is not related.
    When I start QT Creator and open the project (even before I hit RUN Icon), i have this error:

    2019-04-30T17:52:48 Clang Code Model: Error: The clangbackend executable "C:\Qt\Tools\QtCreator\bin\clangbackend.exe" could not be started (timeout after 10000ms).
    Cannot open C:/QML/Projects/build-TeamBonus-Desktop_Qt_5_12_0_MSVC2017_32bit-Release/qml_qmlcache.qrc for writing.
    Cannot open C:/QML/Projects/build-TeamBonus-Desktop_Qt_5_12_0_MSVC2017_32bit-Release/qml_qmlcache.qrc for writing.
    

    What else I can try?

    log here

    screen

    raven-worxR 1 Reply Last reply
    0
    • S shokarta

      Dear all,

      I have set the build the project as release under MSVC2017 32bit,
      the folder with release was created, exe file inside also created.
      While the released project was running via QT Creator, I have run following code:

      windeployqt c:\QML\Projects\build-TeamBonus-Desktop_Qt_5_12_0_MSVC2017_32bit-Release\release\TeamBonus.exe
      

      from this path:

      c:\Qt\5.13.0\msvc2017\bin
      

      there was no error there at all, all dependencies were copied into the folder, so I have tested it by closing QT and runing the exe file, but nothing happend (no error, but the app stayed in task manager in background).

      somewhere on different guide:
      https://github.com/daviddrell/visualsc/wiki/How-to-Deploy-a-Qt-5-Application-for-Windows#4-missing-qt-dll-dependency
      I did read that for some reason Qt5OpenGL.dll is not copied, so i tried to copy it myself and the issue was not solved... Later I copied ALL files from Qt\5.13.0\msvc2017\bin to release folder (just to be sure there is realy no dll missing in release directory), but still no luck...

      There is one thing, however I think is not related.
      When I start QT Creator and open the project (even before I hit RUN Icon), i have this error:

      2019-04-30T17:52:48 Clang Code Model: Error: The clangbackend executable "C:\Qt\Tools\QtCreator\bin\clangbackend.exe" could not be started (timeout after 10000ms).
      Cannot open C:/QML/Projects/build-TeamBonus-Desktop_Qt_5_12_0_MSVC2017_32bit-Release/qml_qmlcache.qrc for writing.
      Cannot open C:/QML/Projects/build-TeamBonus-Desktop_Qt_5_12_0_MSVC2017_32bit-Release/qml_qmlcache.qrc for writing.
      

      What else I can try?

      log here

      screen

      raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by raven-worx
      #2

      @shokarta

      1. regarding the error try deleting the whole build folder, rerun qmake and build again
      2. check the deployed exe with DependencyWalker to make sure if all dependencies are met
      3. it seems you are also using QML in your application. This means you also need to deploy the qml files along with windeployqt. For that pass the "--qmldir <QTDIR>\qml" parameter to the windeployqt call

      QML errors (which prevent the GUI to show) will be printed to the console, which is not present of course. The process is still running, because those are "just" runtime errors in the QML engine.

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      1 Reply Last reply
      2
      • S Offline
        S Offline
        shokarta
        wrote on last edited by
        #3
        1. regarding the error try deleting the whole build folder, rerun qmake and build again
        • did not help, I have tried this several times
        1. check the deployed exe with DependencyWalker to make sure if all dependencies are met
        • i will do this as a next step
        1. it seems you are also using QML in your application. This means you also need to deploy the qml files along with windeployqt. For that pass the "--qmldir <QTDIR>\qml" parameter to the windeployqt call
        • I have tried this in 2 ways, one to go use <QTDIR> to my project so it will load only required dlls, and the second way as found online good to try is to use <QTDIR> to my c:\Qt\5.13.0\msvc2017\qml so I can be sure ALL dlls will be load... however no luck :/

        QML errors (which prevent the GUI to show) will be printed to the console, which is not present of course. The process is still running, because those are "just" runtime errors in the QML engine.

        • any way to print it out somehow?
        raven-worxR 1 Reply Last reply
        0
        • S shokarta
          1. regarding the error try deleting the whole build folder, rerun qmake and build again
          • did not help, I have tried this several times
          1. check the deployed exe with DependencyWalker to make sure if all dependencies are met
          • i will do this as a next step
          1. it seems you are also using QML in your application. This means you also need to deploy the qml files along with windeployqt. For that pass the "--qmldir <QTDIR>\qml" parameter to the windeployqt call
          • I have tried this in 2 ways, one to go use <QTDIR> to my project so it will load only required dlls, and the second way as found online good to try is to use <QTDIR> to my c:\Qt\5.13.0\msvc2017\qml so I can be sure ALL dlls will be load... however no luck :/

          QML errors (which prevent the GUI to show) will be printed to the console, which is not present of course. The process is still running, because those are "just" runtime errors in the QML engine.

          • any way to print it out somehow?
          raven-worxR Offline
          raven-worxR Offline
          raven-worx
          Moderators
          wrote on last edited by raven-worx
          #4

          @shokarta said in deployed via windeployqt wont run but stays in background (task manager):

          I have tried this in 2 ways, one to go use <QTDIR> to my project so it will load only required dlls, and the second way as found online good to try is to use <QTDIR> to my c:\Qt\5.13.0\msvc2017\qml so I can be sure ALL dlls will be load... however no luck :/

          did you try the way i said? With the --qmldir parameter?!

          any way to print it out somehow?

          You could implement a custom messagehanlder and write (append) to a file.

          --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
          If you have a question please use the forum so others can benefit from the solution in the future

          1 Reply Last reply
          0
          • S Offline
            S Offline
            shokarta
            wrote on last edited by
            #5

            yes, I have tried these two ways (non of them worked):

            • windeployqt --release --qmldir c:\QML\Projects\TeamBonus c:\QML\Projects\build-TeamBonus-Desktop_Qt_5_12_0_MSVC2017_32bit-Release\release\TeamBonus.exe
            • windeployqt --release --qmldir c:\Qt\5.13.0\msvc2017\qml c:\QML\Projects\build-TeamBonus-Desktop_Qt_5_12_0_MSVC2017_32bit-Release\release\TeamBonus.exe

            Well, anyway I have tried to switch the compiler to MinGW 32b and now it seems to work quite nice...
            Still wondering why MSVC doesnt

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              Hi,

              --qmldir expects the path to your project's qml files.

              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
              1
              • S Offline
                S Offline
                shokarta
                wrote on last edited by
                #7

                yes, which is the first option:

                • windeployqt --release --qmldir c:\QML\Projects\TeamBonus c:\QML\Projects\build-TeamBonus-Desktop_Qt_5_12_0_MSVC2017_32bit-Release\release\TeamBonus.exe
                1 Reply Last reply
                0
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  Sorry, I misread your lines.

                  Are your qml files directly in TeamBonus ?

                  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
                  0
                  • S Offline
                    S Offline
                    shokarta
                    wrote on last edited by
                    #9

                    yes,

                    as said above, it works on MinGW compiler, however MSVC does not :(

                    1 Reply Last reply
                    0
                    • SGaistS Offline
                      SGaistS Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on last edited by
                      #10

                      I would check with 5.12.3 since it just got released to see if it was fixed there.

                      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
                      0

                      • Login

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