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
QtWS25 Last Chance

App deployment error

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
qt 5.4deploymenterrorc++dll
19 Posts 4 Posters 6.8k 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.
  • Djolas2001D Djolas2001

    @kshegunov Yes, I have copied all necessary dlls from MinGW folder. I have followed instructions on this link.

    kshegunovK Offline
    kshegunovK Offline
    kshegunov
    Moderators
    wrote on last edited by
    #4

    @Djolas2001
    Could you provide a list of files you've deployed and information on which version of Qt and MinGW were used? Could you also check with dependency walker on what MinGW libs (and versions) the said QtCore5.dll depends?

    Read and abide by the Qt Code of Conduct

    Djolas2001D 1 Reply Last reply
    0
    • kshegunovK kshegunov

      @Djolas2001
      Could you provide a list of files you've deployed and information on which version of Qt and MinGW were used? Could you also check with dependency walker on what MinGW libs (and versions) the said QtCore5.dll depends?

      Djolas2001D Offline
      Djolas2001D Offline
      Djolas2001
      wrote on last edited by
      #5

      @kshegunov Here are screenshots. Is that enough?

      kshegunovK 1 Reply Last reply
      0
      • Djolas2001D Djolas2001

        @kshegunov Here are screenshots. Is that enough?

        kshegunovK Offline
        kshegunovK Offline
        kshegunov
        Moderators
        wrote on last edited by kshegunov
        #6

        @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.

        Read and abide by the Qt Code of Conduct

        Djolas2001D 1 Reply Last reply
        0
        • kshegunovK kshegunov

          @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.

          Djolas2001D Offline
          Djolas2001D Offline
          Djolas2001
          wrote on last edited by
          #7

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

          kshegunovK 1 Reply Last reply
          0
          • Djolas2001D Djolas2001

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

            kshegunovK Offline
            kshegunovK Offline
            kshegunov
            Moderators
            wrote on 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

            Djolas2001D 1 Reply Last reply
            0
            • kshegunovK kshegunov

              @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.

              Djolas2001D Offline
              Djolas2001D Offline
              Djolas2001
              wrote on 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?

              kshegunovK 1 Reply Last reply
              0
              • Djolas2001D Djolas2001

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

                kshegunovK Offline
                kshegunovK Offline
                kshegunov
                Moderators
                wrote on 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

                Djolas2001D 1 Reply Last reply
                1
                • kshegunovK kshegunov

                  @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.

                  Djolas2001D Offline
                  Djolas2001D Offline
                  Djolas2001
                  wrote on 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.

                  kshegunovK 1 Reply Last reply
                  0
                  • SGaistS Offline
                    SGaistS Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on 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
                    • hskoglundH Offline
                      hskoglundH Offline
                      hskoglund
                      wrote on 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
                      • Djolas2001D Djolas2001

                        @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.

                        kshegunovK Offline
                        kshegunovK Offline
                        kshegunov
                        Moderators
                        wrote on 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
                        • Djolas2001D Offline
                          Djolas2001D Offline
                          Djolas2001
                          wrote on 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
                          • hskoglundH Offline
                            hskoglundH Offline
                            hskoglund
                            wrote on 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
                            • Djolas2001D Offline
                              Djolas2001D Offline
                              Djolas2001
                              wrote on 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
                              • hskoglundH Offline
                                hskoglundH Offline
                                hskoglund
                                wrote on 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.

                                Djolas2001D 1 Reply Last reply
                                1
                                • hskoglundH hskoglund

                                  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.

                                  Djolas2001D Offline
                                  Djolas2001D Offline
                                  Djolas2001
                                  wrote on last edited by
                                  #19

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

                                  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