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. App deployment error

App deployment error

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
qt 5.4deploymenterrorc++dll
19 Posts 4 Posters 6.9k 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.
  • K kshegunov
    15 Apr 2016, 10:22

    @Djolas2001
    Yes. It looks mostly okay to me, but the thing that's bothering me is the errors/warnings you're getting in the dependency walker. Especially the redness of the stdc++ under Qt5Core.dll. The only thing that comes to mind is some sort of compiler version mismatch, but it's a long-shot ...

    PS:
    Wait a second, why is your application x86 but is linking against the x64 windows binaries ... this doesn't look right.

    D Offline
    D Offline
    Djolas2001
    wrote on 15 Apr 2016, 10:24 last edited by
    #7

    @kshegunov Is there any solution? I yesterday tried to update both MinGW and Qt, but both have latest versions.

    K 1 Reply Last reply 15 Apr 2016, 10:26
    0
    • D Djolas2001
      15 Apr 2016, 10:24

      @kshegunov Is there any solution? I yesterday tried to update both MinGW and Qt, but both have latest versions.

      K Offline
      K Offline
      kshegunov
      Moderators
      wrote on 15 Apr 2016, 10:26 last edited by
      #8

      @Djolas2001
      See my edited answer. I believe you have mismatch in architectures for one, and that you should try tracking the missing dependent symbol in Qt5Core.dll.

      Read and abide by the Qt Code of Conduct

      D 1 Reply Last reply 15 Apr 2016, 10:30
      0
      • K kshegunov
        15 Apr 2016, 10:26

        @Djolas2001
        See my edited answer. I believe you have mismatch in architectures for one, and that you should try tracking the missing dependent symbol in Qt5Core.dll.

        D Offline
        D Offline
        Djolas2001
        wrote on 15 Apr 2016, 10:30 last edited by
        #9

        @kshegunov Excuse me, I am new in programming, so can you explain me how to try tracking the missing dependent symbol?

        K 1 Reply Last reply 15 Apr 2016, 13:37
        0
        • D Djolas2001
          15 Apr 2016, 10:30

          @kshegunov Excuse me, I am new in programming, so can you explain me how to try tracking the missing dependent symbol?

          K Offline
          K Offline
          kshegunov
          Moderators
          wrote on 15 Apr 2016, 13:37 last edited by kshegunov
          #10

          @Djolas2001

          how to try tracking the missing dependent symbol?

          I meant finding which dll exports it and what might be the problem with said dll.
          I had checked and the dll that exports that particular symbol is libstdc++-6.dll So you should search for the problem there.

          I am new in programming

          Okay, then. Take a quick glance here so you have at least a basic understanding of the matter. Now to the core:
          The .exe has a list of dll files to load, and each of them have a list of their own. So when you start your program there's a special application (in the OS) called the loader that starts transferring the needed dlls to memory, and finally when that's done it does the same for your executable. Only when it's finished your program can actually run.

          Your (original) problem is that Qt5Core.dll (used in your application) uses an external function (from another .dll) but that function (or symbol) can't be found by the loader. Those dlls are called dependencies, because Qt5Core.dll can't be loaded before any other .dll it references. What you see with the dependency walker is the dependency tree - the modules (in windows terms) that have to be loaded before your application; and when you expand each of them you see the exported symbols.

          At the end of the day, leaving technicalities aside, every single dll must be loaded, and every single symbol found in those loaded dlls for your application to run. Since, the loader can't locate the __cxa_throw_bad_array_new_length symbol your application fails to run. A hint, is that it runs fine inside your IDE, so that means that in all probability you had deployed a wrong dll, or rather wrong combination of dlls. What I suspect happened is that you'd built your application and had shipped dlls from MinGW that are different from those used when Qt was built. Or you have copied 32bit dlls, when 64bit ones are expected.

          Probably the cleanest attempt would be to create a new empty folder and carefully copy each of the dlls. Also, make sure that compiler versions match between all the dlls and the application. And don't copy the system dlls - kernel32, msvcrt, shell32 etc. at least until you're convinced your application is working fine without them (you can copy those at the end of the deployment if it's really required, although I don't believe it is).

          I know it's not exactly what you were expecting, but it's the best I can do without actually doing it myself.

          Read and abide by the Qt Code of Conduct

          D 1 Reply Last reply 15 Apr 2016, 18:09
          1
          • K kshegunov
            15 Apr 2016, 13:37

            @Djolas2001

            how to try tracking the missing dependent symbol?

            I meant finding which dll exports it and what might be the problem with said dll.
            I had checked and the dll that exports that particular symbol is libstdc++-6.dll So you should search for the problem there.

            I am new in programming

            Okay, then. Take a quick glance here so you have at least a basic understanding of the matter. Now to the core:
            The .exe has a list of dll files to load, and each of them have a list of their own. So when you start your program there's a special application (in the OS) called the loader that starts transferring the needed dlls to memory, and finally when that's done it does the same for your executable. Only when it's finished your program can actually run.

            Your (original) problem is that Qt5Core.dll (used in your application) uses an external function (from another .dll) but that function (or symbol) can't be found by the loader. Those dlls are called dependencies, because Qt5Core.dll can't be loaded before any other .dll it references. What you see with the dependency walker is the dependency tree - the modules (in windows terms) that have to be loaded before your application; and when you expand each of them you see the exported symbols.

            At the end of the day, leaving technicalities aside, every single dll must be loaded, and every single symbol found in those loaded dlls for your application to run. Since, the loader can't locate the __cxa_throw_bad_array_new_length symbol your application fails to run. A hint, is that it runs fine inside your IDE, so that means that in all probability you had deployed a wrong dll, or rather wrong combination of dlls. What I suspect happened is that you'd built your application and had shipped dlls from MinGW that are different from those used when Qt was built. Or you have copied 32bit dlls, when 64bit ones are expected.

            Probably the cleanest attempt would be to create a new empty folder and carefully copy each of the dlls. Also, make sure that compiler versions match between all the dlls and the application. And don't copy the system dlls - kernel32, msvcrt, shell32 etc. at least until you're convinced your application is working fine without them (you can copy those at the end of the deployment if it's really required, although I don't believe it is).

            I know it's not exactly what you were expecting, but it's the best I can do without actually doing it myself.

            D Offline
            D Offline
            Djolas2001
            wrote on 15 Apr 2016, 18:09 last edited by
            #11

            @kshegunov I have tried everything, but error repeats. I have re-installed MinGW and Qt both completely with right versions, put all correct dll. And nothing helps.

            K 1 Reply Last reply 16 Apr 2016, 07:21
            0
            • S Offline
              S Offline
              SGaist
              Lifetime Qt Champion
              wrote on 15 Apr 2016, 20:59 last edited by
              #12

              Hi,

              Did you use windeployqt to deploy your application ?

              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
              • H Offline
                H Offline
                hskoglund
                wrote on 15 Apr 2016, 21:00 last edited by
                #13

                Hi, do you still get the same error "... ____cxa_throw_bad_array_new_length ..."?

                I think perhaps you are copying the wrong Qt5Core.dll to your directory (where your image viewer.exe program is), you're sure you are copying Qt5Core.dll from C:\Qt\5.6\mingw492_32\bin and not from C:\Qt\Tools\QtCreator\bin?

                1 Reply Last reply
                0
                • D Djolas2001
                  15 Apr 2016, 18:09

                  @kshegunov I have tried everything, but error repeats. I have re-installed MinGW and Qt both completely with right versions, put all correct dll. And nothing helps.

                  K Offline
                  K Offline
                  kshegunov
                  Moderators
                  wrote on 16 Apr 2016, 07:21 last edited by
                  #14

                  @Djolas2001
                  I don't know what to suggest ... See @hskoglund's note and if nothing else works, walk us through the whole process - what dll you copied from what folder to which directory.

                  Read and abide by the Qt Code of Conduct

                  1 Reply Last reply
                  0
                  • D Offline
                    D Offline
                    Djolas2001
                    wrote on 16 Apr 2016, 17:22 last edited by Djolas2001
                    #15

                    I get same error. Folder link with dlls and error link. Also I have completely re-installed Qt, and now I have only MinGW as compiler so I can't miss.

                    1 Reply Last reply
                    0
                    • H Offline
                      H Offline
                      hskoglund
                      wrote on 16 Apr 2016, 18:59 last edited by
                      #16

                      Hi, how big (in bytes) is your Qt5Core.dll in your folder in D:
                      Also what date and time does it have?

                      1 Reply Last reply
                      0
                      • D Offline
                        D Offline
                        Djolas2001
                        wrote on 17 Apr 2016, 16:18 last edited by Djolas2001
                        #17

                        Here are all information about Qt5Core.dll. Also I have created short video, about how I move files.

                        1 Reply Last reply
                        0
                        • H Offline
                          H Offline
                          hskoglund
                          wrote on 17 Apr 2016, 18:43 last edited by
                          #18

                          Hi, very good idea with making a movie, now I think what your problem is, I mean how to solve it:

                          first, your Qt5Core.dll is indeed correct, the problem was Windows 10 saying (incorrectly) that the "..the procedure entry point __cxa_throw_bad...... could not be located in Qt5Core.dll"

                          Actually Qt5Core.dll imports this function from another dll called libstdc++-6.dll
                          This file is a part of the MinGW toolchain, but on your Windows PC you got multiple versions of this file, and the one in your path is older than the one in Qt 5.6.

                          So try also copying the libstdc++-6.dll from C:\Qt\5.6\mingw49_32\bin directory to your folder D: and then try to start your app again.

                          D 1 Reply Last reply 17 Apr 2016, 19:27
                          1
                          • H hskoglund
                            17 Apr 2016, 18:43

                            Hi, very good idea with making a movie, now I think what your problem is, I mean how to solve it:

                            first, your Qt5Core.dll is indeed correct, the problem was Windows 10 saying (incorrectly) that the "..the procedure entry point __cxa_throw_bad...... could not be located in Qt5Core.dll"

                            Actually Qt5Core.dll imports this function from another dll called libstdc++-6.dll
                            This file is a part of the MinGW toolchain, but on your Windows PC you got multiple versions of this file, and the one in your path is older than the one in Qt 5.6.

                            So try also copying the libstdc++-6.dll from C:\Qt\5.6\mingw49_32\bin directory to your folder D: and then try to start your app again.

                            D Offline
                            D Offline
                            Djolas2001
                            wrote on 17 Apr 2016, 19:27 last edited by
                            #19

                            @hskoglund Thank you very much, now it works. :)

                            1 Reply Last reply
                            0

                            16/19

                            16 Apr 2016, 18:59

                            • Login

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