Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [SOLVED] Failed to run application build with Qt 5.3 MinGW 4.8.2

[SOLVED] Failed to run application build with Qt 5.3 MinGW 4.8.2

Scheduled Pinned Locked Moved General and Desktop
17 Posts 4 Posters 13.2k Views 1 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.
  • E Offline
    E Offline
    e79ene
    wrote on last edited by
    #1

    Hi!
    I've just installed MinGW 4.8.2 32bit & Qt 5.3.0 MinGW 32bit packages.

    From Qt Creator I've made a default Qt Widget Application.
    It builds & runs successfully with Qt 5.2.0 MinGW 32bit.
    Builds but fails to run with Qt 5.3.0 MinGW 32bit.

    When lanched from Qt Creator it prints to Applicatoin Output panel: @
    Starting C:\Test\build-GuiApp-Desktop_Qt_5_3_0_MinGW_32bit-Debug\debug\GuiApp.exe...
    SHIMVIEW: ShimInfo(Complete)
    The program has unexpectedly finished.
    C:\Test\build-GuiApp-Desktop_Qt_5_3_0_MinGW_32bit-Debug\debug\GuiApp.exe crashed
    @

    When launched from Qt console the dialog box with the following message is displayed: @
    The procedure entry point interlockedCompareExchange@12 could not be located in the dynamic link library.
    C:\Test\build-GuiApp-Desktop_Qt_5_3_0_MinGW_32bit-Debug\debug\GuiApp.exe
    @

    My OS is Windows 8.1 (x64)

    How can I fix the problem?

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

      Hi, could it be "this bug":http://kaskavalci.com/?p=183

      1 Reply Last reply
      0
      • E Offline
        E Offline
        e79ene
        wrote on last edited by
        #3

        It doesn't look like it.

        I run the application from Qt Creator and from Qt Console (qtenv2.bat). Thus the environment must be ok.

        I don't understand the recommendation in that post:
        "In order to solve this, please add your path to beginning of your Path variable."
        What is "your path"? The directory where executable resides? If so, it doesn't help.

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

          your path: the path to Qt's DLLs, e.g. C:\Qt\Tools\mingw482_32\bin

          Anyway, because qtenv2.bat inserts the Qt path first, perhaps it's still something with the order of the directories in the path, you can try by opening a CMD window and not invoke qtenv2.bat, instead manually add Qt's path at the end, like this example:
          @
          path=%PATH%;C:\Qt\Tools\mingw482_32\bin
          @

          Note: this is just a guess :-)

          EDIT: he also makes another good recommendation, download "Dependency Walker":http://www.dependencywalker.com/depends22_x86.zip and open your .exe file with it

          1 Reply Last reply
          0
          • E Offline
            E Offline
            e79ene
            wrote on last edited by
            #5

            bq. instead manually add Qt’s path at the end

            This dosn't help.

            Dependency Walker reported "The system can not find the file specified" error for the following modules:
            @
            API-MS-WIN-CORE-KERNEL32-PRIVATE-L1-1-1.DLL
            API-MS-WIN-CORE-PRIVATEPROFILE-L1-1-1.DLL
            API-MS-WIN-SERVICE-PRIVATE-L1-1-1.DLL
            API-MS-WIN-CORE-SHUTDOWN-L1-1-1.DLL
            EXT-MS-WIN-NTUSER-UICONTEXT-EXT-L1-1-0.DLL
            IESHIMS.DLL
            @

            1 Reply Last reply
            0
            • hskoglundH Online
              hskoglundH Online
              hskoglund
              wrote on last edited by
              #6

              Hi, I get the same errors from Dependency Walker, they're false positives :-(

              Anyway, googled a bit, turns out this error with the entry point interlockedCompareExchange@12 not found occurs because of "mixup of MingGW":http://lists.qt-project.org/pipermail/releasing/2013-September/001439.html libstdc++-6.dll
              Try uninstall your MinGW 4.8 (that came with Qt 5.2), or make sure that your MinGW 4.82 (that comes with Qt 5.3) is first in the path.

              EDIT: the errror is quite easy to reproduce: for example, I installed Qt 5.2 and Qt 5.3 on my Windows 8.1 machine, made a simple Qt 5.2 Widgets app, works fine with MinGW 4.8 but exhibits the same error "...interlockedCompareExchange@12..." when I instead use MinGW 4.82.

              1 Reply Last reply
              0
              • E Offline
                E Offline
                e79ene
                wrote on last edited by
                #7

                I've found the reason.
                Qt Creator generated a kit "Desktop Qt 5.3.0 MinGW 32bit" which is connected to "MinGW 4.8" compiler instead of "MinGW 4.8.2".
                Thus it build the application with a wrong compiler.

                Unfortunatelly Qt Creator doesn't allow to modify settings for auto-generated kits.
                Is it possible to force Qt Creator to connect Qt 5.3 to right compiler?

                As a workaround I made a manual kit with right connection.
                And it works!

                Thanks for support!

                1 Reply Last reply
                0
                • V Offline
                  V Offline
                  venphil
                  wrote on last edited by
                  #8

                  The same thing happens in Windows 7 Professional SP1 - 64 bit (most recent updates applied). Using Qt 5.3.0 and mingw482_32.

                  1 Reply Last reply
                  0
                  • V Offline
                    V Offline
                    venphil
                    wrote on last edited by
                    #9

                    Scratch last post. There were pieces of previous mingw dlls floating around in Windows/System32 and Windows/System64 folders. Removed them, and everything OK.

                    1 Reply Last reply
                    0
                    • M Offline
                      M Offline
                      mbnoimi
                      wrote on last edited by
                      #10

                      Hi guys,

                      I face this issue too but I couldn't fix it although I follow your suggestions! Any way below the the procedures I've and I wish to get some help from you:

                      Error message on RUN (CTRL+R):
                      [code]Starting C:\Users\mbnoimi\Desktop\build-TestQt530-5_3_0-Debug\debug\TestQt530.exe...
                      SHIMVIEW: ShimInfo(Complete)
                      The program has unexpectedly finished.
                      C:\Users\mbnoimi\Desktop\build-TestQt530-5_3_0-Debug\debug\TestQt530.exe crashed[/code]

                      System path:
                      [code]%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0;C:\Program Files\Common Files\Autodesk Shared;C:\Program Files (x86)\Autodesk\Backburner;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn;C:\Program Files\Microsoft SQL Server\100\Tools\Binn;C:\Program Files\Microsoft SQL Server\100\DTS\Binn;C:\Program Files (x86)\Bazaar;C:\Program Files (x86)\WinMerge[/code]

                      Run from Qt console:
                      !http://i.share.pho.to/de6fe1d8_o.png(http://i.share.pho.to/de6fe1d8_o.png)!

                      Qt console log:
                      [code]Setting up environment for Qt usage...

                      C:\Qt\Qt5.3.0\5.3\mingw482_32>cd /d C:\Users\mbnoimi\Desktop\build-TestQt530-5_3
                      _0-Debug\debug

                      C:\Users\mbnoimi\Desktop\build-TestQt530-5_3_0-Debug\debug>TestQt530.exe

                      C:\Users\mbnoimi\Desktop\build-TestQt530-5_3_0-Debug\debug>path
                      PATH=C:\Qt\Qt5.3.0\5.3\mingw482_32\bin;C:\Qt\Qt5.3.0\Tools\mingw482_32\bin;C:\Wi
                      ndows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPo
                      werShell\v1.0;C:\Program Files\Common Files\Autodesk Shared;C:\Program Files (
                      x86)\Autodesk\Backburner;C:\Program Files (x86)\Microsoft SQL Server\100\Tools
                      Binn;C:\Program Files\Microsoft SQL Server\100\Tools\Binn;C:\Program Files\Mic
                      rosoft SQL Server\100\DTS\Binn;C:\Program Files (x86)\Bazaar;C:\Program Files (
                      x86)\WinMerge

                      C:\Users\mbnoimi\Desktop\build-TestQt530-5_3_0-Debug\debug>[/code]

                      Dependency walker log after copying all Qt run-time into binary's path (C:\Users\mbnoimi\Desktop\build-TestQt530-5_3_0-Debug\debug)
                      http://pastebin.com/ji2AuaRz

                      How can I fix this issue?

                      1 Reply Last reply
                      0
                      • M Offline
                        M Offline
                        mbnoimi
                        wrote on last edited by
                        #11

                        I forgot to mention that I'm using Qt 5.3.0 + Qt Creator 3.1.1 under Windows 8.1 x64

                        I tested the suggestion of e79ene as following but I got the same old results.
                        !http://i.share.pho.to/5113e510_o.png(http://i.share.pho.to/5113e510_o.png)!

                        1 Reply Last reply
                        0
                        • hskoglundH Online
                          hskoglundH Online
                          hskoglund
                          wrote on last edited by
                          #12

                          Hi, the ".. Bad Image" error I think is not a MinGW multiple versions problem, more likely is hard disk problem or virus :-(

                          Anyway, try switching your build to Release mode and see what happens.

                          1 Reply Last reply
                          0
                          • M Offline
                            M Offline
                            mbnoimi
                            wrote on last edited by
                            #13

                            [quote]Hi, the “.. Bad Image” error I think is not a MinGW multiple versions problem, more likely is hard disk problem or virus :-([/quote]

                            No this is incorrect because I get the same result for fresh installation on another PC using different OS (Win7 x86)

                            [quote]Anyway, try switching your build to Release mode and see what happens. [/quote]
                            I got same old result!

                            1 Reply Last reply
                            0
                            • M Offline
                              M Offline
                              mbnoimi
                              wrote on last edited by
                              #14

                              I filed a bug report in this link:
                              https://bugreports.qt-project.org/browse/QTBUG-39649

                              P.S. e79ene may you please modify the title of this thread by removing [SOLVED] tag

                              1 Reply Last reply
                              0
                              • hskoglundH Online
                                hskoglundH Online
                                hskoglund
                                wrote on last edited by
                                #15

                                Hi, please don't file bugs on empty projects, your problem has nothing to do with Qt.

                                Post a screenshot when your app crashes, and download "Microsofts file checksum verififer":http://www.microsoft.com/en-us/download/details.aspx?id=11533 install it on the PC that Qt crashes on. Run the fciv.exe file on Qt5Widgets.dll and Qt5Widgetsd.dll files and post the results (32 hex digits for each file) here.

                                1 Reply Last reply
                                0
                                • M Offline
                                  M Offline
                                  mbnoimi
                                  wrote on last edited by
                                  #16

                                  [quote]Hi, please don’t file bugs on empty projects, your problem has nothing to do with Qt.[/quote]

                                  No. this is Qt issue because Qt 5.2.1 was working fine on same machines.

                                  I formatted all my machines for new fresh windows and then installed Qt 5.3.0. The bug appeared on all that machines (all of them have different hardware and different Windows version) so this is absolutely Qt issue.

                                  1 Reply Last reply
                                  0
                                  • M Offline
                                    M Offline
                                    mbnoimi
                                    wrote on last edited by
                                    #17

                                    OMG, I discovered that the downloaded installer is corrupted (I didn't get any error message) so after downloading a new offline down loader everything went fine.

                                    I'm very sorry for the big disturbance I made... thank you guys.

                                    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