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. Fresh install of Qt Creator can not run demo application in release mode
Forum Updated to NodeBB v4.3 + New Features

Fresh install of Qt Creator can not run demo application in release mode

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
5 Posts 3 Posters 796 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.
  • mgilormaM Offline
    mgilormaM Offline
    mgilorma
    wrote on last edited by
    #1

    I have been fighting this problem for a while now but again last night tried uninstalling all previous installations of Qt and downloaded and installed the latest and greatest. I tried building the broadcastsender example and it runs fine in debug mode. When I switch to release mode and try to run I get the following error message:

    This application failed to start because it could not find or load the Qt platform plugin "windows". Reinstalling the application may fix this problem.

    After I close that error I get the following error message:

    Microsoft Visual C++ Runtime Library: Runtime Error! This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information.

    If I copy the plugins folder into the release build directory it will run without an issue. That is fine for deployment, however it should not be required when running the application in release mode through Qt Creator. I tried updating my PATH to include the plugins directory, but that didn't help. I also tried many of the somewhat related posts in the forums with no luck...

    I am running Qt Creator 4.7.0 based on Qt 5.11.1 (MSVC 2015, 32 bit)

    I am compiling the test program with the Qt 5.1.1 MinGW 32 bit libraries

    Thanks

    JKSHJ 1 Reply Last reply
    0
    • mgilormaM mgilorma

      I have been fighting this problem for a while now but again last night tried uninstalling all previous installations of Qt and downloaded and installed the latest and greatest. I tried building the broadcastsender example and it runs fine in debug mode. When I switch to release mode and try to run I get the following error message:

      This application failed to start because it could not find or load the Qt platform plugin "windows". Reinstalling the application may fix this problem.

      After I close that error I get the following error message:

      Microsoft Visual C++ Runtime Library: Runtime Error! This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information.

      If I copy the plugins folder into the release build directory it will run without an issue. That is fine for deployment, however it should not be required when running the application in release mode through Qt Creator. I tried updating my PATH to include the plugins directory, but that didn't help. I also tried many of the somewhat related posts in the forums with no luck...

      I am running Qt Creator 4.7.0 based on Qt 5.11.1 (MSVC 2015, 32 bit)

      I am compiling the test program with the Qt 5.1.1 MinGW 32 bit libraries

      Thanks

      JKSHJ Offline
      JKSHJ Offline
      JKSH
      Moderators
      wrote on last edited by
      #2

      Hi @mgilorma, first let's check what DLLs your Release build is trying to load.

      1. Try to launch your app
      2. When the popup dialog appears ("...could not find or load the Qt platform plugin..."), leave it open. Don't close it.
      3. Use ListDLLs to show all the DLLs that have been loaded into memory.

      Which folder(s) is your application loading Qt DLLs from?

      @mgilorma said in Fresh install of Qt Creator can not run demo application in release mode:

      I tried updating my PATH to include the plugins directory

      Please avoid adding folders to your PATH if you can avoid it. This is the root cause of numerous similar problems.

      Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

      1 Reply Last reply
      2
      • mgilormaM Offline
        mgilormaM Offline
        mgilorma
        wrote on last edited by mgilorma
        #3

        The ListDLLs application shows that a debug build seems to load the required plugins while the release build does not. (I tried to upload the txt files of the output but am not sure how to do that right now)

        This is a problem with this particular laptop as I loaded the same version of Qt onto another laptop and do not have the same issue... The frustrating part is that uninstalling and reinstalling does not seem to help...

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

          Hi, perhaps some debris remaining from previous Qt versions are causing problems for your release mode plugins to load.
          You could check by turning on a trace for the plugins loading, in Qt Creator, go to the Projects pane, add QT_DEBUG_PLUGINS as a new variable to the Build Environment, and set its value to 1, like this:
          0_1537213405206_Screenshot from 2018-09-17 21-36-43.png

          Then, in Qt Creator, launch your release mode app again, now you should see lots of "QFactoryLoader::QFactoryLoader() looking at ..." and similar output. Scroll down to where the output ends...

          1 Reply Last reply
          1
          • mgilormaM mgilorma

            The ListDLLs application shows that a debug build seems to load the required plugins while the release build does not. (I tried to upload the txt files of the output but am not sure how to do that right now)

            This is a problem with this particular laptop as I loaded the same version of Qt onto another laptop and do not have the same issue... The frustrating part is that uninstalling and reinstalling does not seem to help...

            JKSHJ Offline
            JKSHJ Offline
            JKSH
            Moderators
            wrote on last edited by
            #5

            @mgilorma said in Fresh install of Qt Creator can not run demo application in release mode:

            The ListDLLs application shows that a debug build seems to load the required plugins while the release build does not.

            I'm more interested in the "main" DLLs like Qt5Core.dll, not the plugins.

            And most importantly: Which folder(s) (give absolute paths!) are those main DLLs taken from?

            (I tried to upload the txt files of the output but am not sure how to do that right now)

            The easiest way is to copy+paste the text straight into this forum. Put triple backticks (`) before and after the text to put them in a scroll area.

            This is a problem with this particular laptop as I loaded the same version of Qt onto another laptop and do not have the same issue... The frustrating part is that uninstalling and reinstalling does not seem to help...

            I'm guessing it's something in the environment of this laptop. ListDLLs and @hskoglund's plugin debugging technique should reveal something.

            Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

            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