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. Qt Application Release Version runs only on development computer. Debug version runs everywhere.
QtWS25 Last Chance

Qt Application Release Version runs only on development computer. Debug version runs everywhere.

Scheduled Pinned Locked Moved General and Desktop
4 Posts 3 Posters 984 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.
  • G Offline
    G Offline
    Georgios Ch.
    wrote on last edited by
    #1

    Hello everybody,

    I have been trying to resolve this issue for the past few days with no luck. I am developing a music streaming application in Qt C++ in Windows 8.1 with Qt Creator and I have problems in running it (dynamically) on another machine after creating a release version. I will try to be as clear as possible:

    1. I have put all the necessary dlls in the proper folders in the installation path
    2. The application works on development machine (windows 8.1) in debug AND release mode EVEN IF I rename the C:\Qt folder
    3. The application WORKS in the testing machines (windows vista, XP) in debug mode
    4. The application DOES NOT work correctly in release mode in testing machines

    More specifically: It loads the graphic environment but does not try to fetch the proper song database, it just stays as it is. The GUI is functional. Additionally, when I quit the application, it crashes.

    I wasn't able to get any debug messages in either mode, running it from command window. All the dlls are in place, checked with the dependency walker. What confuses me mostly is that the release version runs perfectly on the development machine even if I rename the Qt folder, so it can't be any uninitialized variables or other bug in the code. Please help!

    Thank you in advance!

    1 Reply Last reply
    0
    • Chris KawaC Offline
      Chris KawaC Offline
      Chris Kawa
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi, welcome to devnet.

      It loads the graphic environment but does not try to fetch the proper song database, it just stays as it is. The GUI is functional. Additionally, when I quit the application, it crashes.

      What confuses me mostly is that the release version runs perfectly on the development machine even if I rename the Qt folder, so it can't be any uninitialized variables or other bug in the code.

      Actually, it sounds a lot like a bug in your code. Might as well be uninitialized variables or other undefined behavior that happens to work on dev machine. The only thing that gives some hint that it might be a case of bad deployment are your words "does not try to fetch the proper song database". I can't really guess what your code does but it sounds like you're using some database. In that case did you deploy the right sql plugin too?
      Can you give in ditails a list of what and where is placed in the installation directory?
      When using dependency walker did you use the runtime profiling feature or just opened your app executable? Some Qt components (like database and platfrom plugins) are loaded at runtime and can only be detected by profiling.

      1 Reply Last reply
      0
      • P Offline
        P Offline
        pjfry
        wrote on last edited by
        #3

        So the problem, as you see it, is that it does not fetch the song database. So you need to get into more detail why not. Have you tired to put logging or any messageBox'es about what is the return values of the various functions that re supposed to populate the song database? One of those functions is not working properly, one would suppose.

        1 Reply Last reply
        0
        • G Offline
          G Offline
          Georgios Ch.
          wrote on last edited by
          #4

          I solved it using message boxes. No, everything was correctly placed, except a new bool variable I had and wasn't initialized. Everything seems to be working now, at last. Thank you for your help! Just for the record, for anybody that might hit this topic, my file structure for a release version that works correctly on every computer is:

          • MyApp/imageformats/
            (any dlls for images such as qico.dll)
          • MyApp/mediaservice/
            (dsengine.dll or other usefull for media playback)
          • MyApp/platforms/
            qwindows.dll
          • MyApp/sqldrivers/
            qsqlmysql.dll (driver for a database)
          • MyApp/
            libmysql.dll (necessary with mysql driver)
            MyApp.exe
            All the other necessary .dlls (follow this guide to collect them): [https://wiki.qt.io/Deploy_an_Application_on_Windows]

          Thank you for your help,
          Have a nice day!

          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