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. Crash when run in Release mode?
Forum Updated to NodeBB v4.3 + New Features

Crash when run in Release mode?

Scheduled Pinned Locked Moved Solved General and Desktop
36 Posts 7 Posters 9.1k 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.
  • mzimmersM Offline
    mzimmersM Offline
    mzimmers
    wrote on last edited by
    #24

    Excellent. If you like, you can create a variable in your .pro file for your directory that contains the libraries, and use that variable when specifying the target.files. Won't change the behavior; it's just a bit cleaner.

    If you think this is resolved, please mark the topic as solves using the topic tools available in your first post in this thread.

    MucipM 1 Reply Last reply
    0
    • mzimmersM mzimmers

      Excellent. If you like, you can create a variable in your .pro file for your directory that contains the libraries, and use that variable when specifying the target.files. Won't change the behavior; it's just a bit cleaner.

      If you think this is resolved, please mark the topic as solves using the topic tools available in your first post in this thread.

      MucipM Offline
      MucipM Offline
      Mucip
      wrote on last edited by
      #25

      @mzimmers
      I already marked your post as answer... :)

      By the way there is still one question more: What is the difference between 5.13.2 and 5.14.2?... :)

      Regards,
      Mucip:)

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

        @Mucip That is something that you can find out in the release notes as well as in the git history.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        mzimmersM 1 Reply Last reply
        1
        • SGaistS SGaist

          @Mucip That is something that you can find out in the release notes as well as in the git history.

          mzimmersM Offline
          mzimmersM Offline
          mzimmers
          wrote on last edited by
          #27

          @SGaist said in Crash when run in Release mode?:

          @Mucip That is something that you can find out in the release notes as well as in the git history.

          But whatever the differences are, I seriously doubt they have anything to do with the problem you encountered. More likely, when you updated, you also created a new .user file that wiped out your build settings.

          MucipM 2 Replies Last reply
          1
          • mzimmersM mzimmers

            @SGaist said in Crash when run in Release mode?:

            @Mucip That is something that you can find out in the release notes as well as in the git history.

            But whatever the differences are, I seriously doubt they have anything to do with the problem you encountered. More likely, when you updated, you also created a new .user file that wiped out your build settings.

            MucipM Offline
            MucipM Offline
            Mucip
            wrote on last edited by
            #28

            Hi @mzimmers ,
            In any case, I learned new and very usefull things. Thanks.

            Regards,
            Mucip:)

            1 Reply Last reply
            0
            • mzimmersM mzimmers

              @SGaist said in Crash when run in Release mode?:

              @Mucip That is something that you can find out in the release notes as well as in the git history.

              But whatever the differences are, I seriously doubt they have anything to do with the problem you encountered. More likely, when you updated, you also created a new .user file that wiped out your build settings.

              MucipM Offline
              MucipM Offline
              Mucip
              wrote on last edited by Mucip
              #29

              Hi @mzimmers ,
              Let's suppose there is report folder in the main project directory and some xml files in this report directory. I want to copy report folder and contents to the target directory too. Above information I can copy files to target but what about create folder and copy files to target directory on compile time?

              Regards,
              Mucip:)

              mzimmersM 1 Reply Last reply
              0
              • MucipM Mucip

                Hi @mzimmers ,
                Let's suppose there is report folder in the main project directory and some xml files in this report directory. I want to copy report folder and contents to the target directory too. Above information I can copy files to target but what about create folder and copy files to target directory on compile time?

                Regards,
                Mucip:)

                mzimmersM Offline
                mzimmersM Offline
                mzimmers
                wrote on last edited by
                #30

                @Mucip yes, you can do that. The details can be found here.

                MucipM 1 Reply Last reply
                0
                • mzimmersM mzimmers

                  @Mucip yes, you can do that. The details can be found here.

                  MucipM Offline
                  MucipM Offline
                  Mucip
                  wrote on last edited by
                  #31

                  @mzimmers ,
                  I got it thanks.
                  Maybe someone has same problem. I solved like below.
                  The code create "rapor" folder and copies contents to target build directory.

                  target.path = $$OUT_PWD/release
                  target.files = "D:/Belgeler/Qt/LimeReport/win64/release/lib/LimeReport.dll" "D:/Belgeler/Qt/LimeReport/win64/release/lib/QtZint.dll" $$PWD/rapor
                  INSTALLS += target
                  

                  Regards,
                  Mucip:)

                  1 Reply Last reply
                  1
                  • mzimmersM Offline
                    mzimmersM Offline
                    mzimmers
                    wrote on last edited by
                    #32

                    Looks good. Thanks for posting the solution.

                    1 Reply Last reply
                    0
                    • MucipM Mucip

                      Dear @mzimmers ,
                      Well, I tested in DEBUG directory. Clicked MriERP.exe file. Ofcourse it says LimeReport, QtZint and QtCore and etc files are missing. When I copy these files in the debug directory I can run the program in DEBUG folder.

                      When I try same thing in RELEASE folder, error messages are the same. Same files are missing. I copied LimeReport, QtZint and Qt's DLL files than MriERP.exe files worked normally too.

                      A quick question: If some DLL are missing It shouldn't compile the project, should it?...

                      Regards,
                      Mucip:)

                      jsulmJ Offline
                      jsulmJ Offline
                      jsulm
                      Lifetime Qt Champion
                      wrote on last edited by
                      #33

                      @Mucip said in Crash when run in Release mode?:

                      If some DLL are missing It shouldn't compile the project, should it?

                      If they are missing at compile time then yes it will not compile.
                      But in your case they are missing at runtime.
                      QtCreator prepares the environment before starting your app, so it can find all libraries.
                      If you want to start your app outside of Qt creator you need to deploy it first: https://doc.qt.io/qt-5/windows-deployment.html

                      https://forum.qt.io/topic/113070/qt-code-of-conduct

                      MucipM 1 Reply Last reply
                      0
                      • jsulmJ jsulm

                        @Mucip said in Crash when run in Release mode?:

                        If some DLL are missing It shouldn't compile the project, should it?

                        If they are missing at compile time then yes it will not compile.
                        But in your case they are missing at runtime.
                        QtCreator prepares the environment before starting your app, so it can find all libraries.
                        If you want to start your app outside of Qt creator you need to deploy it first: https://doc.qt.io/qt-5/windows-deployment.html

                        MucipM Offline
                        MucipM Offline
                        Mucip
                        wrote on last edited by
                        #34

                        @jsulm ,
                        No. I already use and know WinDeployQt. The problem was here is, I can not run the RELEASE build inner Qt Creator. And when I add above lines to the pro file than I can run the RELEASE build inner Qt Creator too.

                        Regards,
                        Mucip:)

                        1 Reply Last reply
                        0
                        • T Offline
                          T Offline
                          theldl
                          wrote on last edited by
                          #35

                          If the above tips haven't helped, here's another: I had a bug in a function that should have returned a bool (but returned nothing) that caused the project release version to crash while the debug version ran OK. After adding the missing line of code both versions ran.

                          Regards,
                          theldl

                          MucipM 1 Reply Last reply
                          0
                          • T theldl

                            If the above tips haven't helped, here's another: I had a bug in a function that should have returned a bool (but returned nothing) that caused the project release version to crash while the debug version ran OK. After adding the missing line of code both versions ran.

                            Regards,
                            theldl

                            MucipM Offline
                            MucipM Offline
                            Mucip
                            wrote on last edited by
                            #36

                            Dear @theldl ,
                            Where is the bug and did you inform LimeReport forum?...

                            Regards,
                            Mucip:)

                            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