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. The application is running in the background but the screen does not appear
Forum Updated to NodeBB v4.3 + New Features

The application is running in the background but the screen does not appear

Scheduled Pinned Locked Moved Solved General and Desktop
27 Posts 6 Posters 5.7k 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.
  • serkan_trS Offline
    serkan_trS Offline
    serkan_tr
    wrote on last edited by
    #1

    In windows 10 operating system, I was making an application on the old computer and running the build file of the application on another device and there was no problem. But I installed windows 11 on my new computer and I built the same application with the same version (qt 5.11) and when I try to run it on another device, it does not give an error, but the screen does not appear. It just works in the background.
    I tried to downgrade (windows 10) because the reason for this situation might be windows 11 and the same thing happened again. Since I don't get an error, I can't find where the problem originates. All the files in the old build file and the new build file are the same. I didn't see anything different, but it doesn't work. How to determine where the error is originating from.
    I can't share bits of code because the app is too big general pattern of the app [https://github.com/mavlink/qgroundcontrol](
    I can't share bits of code because the app is too big general pattern of the app https://github.com/mavlink/qgroundcontrol)

    jsulmJ J.HilkJ 2 Replies Last reply
    0
    • serkan_trS serkan_tr

      In windows 10 operating system, I was making an application on the old computer and running the build file of the application on another device and there was no problem. But I installed windows 11 on my new computer and I built the same application with the same version (qt 5.11) and when I try to run it on another device, it does not give an error, but the screen does not appear. It just works in the background.
      I tried to downgrade (windows 10) because the reason for this situation might be windows 11 and the same thing happened again. Since I don't get an error, I can't find where the problem originates. All the files in the old build file and the new build file are the same. I didn't see anything different, but it doesn't work. How to determine where the error is originating from.
      I can't share bits of code because the app is too big general pattern of the app [https://github.com/mavlink/qgroundcontrol](
      I can't share bits of code because the app is too big general pattern of the app https://github.com/mavlink/qgroundcontrol)

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

      @serkan_tr said in The application is running in the background but the screen does not appear:

      it does not give an error

      Even if you start it from a terminal?
      Did you deploy your app properly? See https://doc.qt.io/qt-6/windows-deployment.html

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

      serkan_trS 1 Reply Last reply
      1
      • jsulmJ jsulm

        @serkan_tr said in The application is running in the background but the screen does not appear:

        it does not give an error

        Even if you start it from a terminal?
        Did you deploy your app properly? See https://doc.qt.io/qt-6/windows-deployment.html

        serkan_trS Offline
        serkan_trS Offline
        serkan_tr
        wrote on last edited by
        #3

        @jsulm I tried these methods meanwhile on the host (QGroundControl.exe:14056): GStreamer-CRITICAL **: 09:23:21.841: gst_object_unref: assertion '((GObject *) object)->ref_count > 0' failed

        (QGroundControl.exe:14056): GStreamer-CRITICAL **: 09:23:21.841: gst_object_unref: assertion '((GObject *) object)->ref_count > 0' failed

        (QGroundControl.exe:14056): GLib-GObject-WARNING **: 09:23:21.842: value "-1" of type 'gint' is invalid or out of range for property 'port' of type 'gint'

        (QGroundControl.exe:14056): GStreamer-CRITICAL **: 09:23:21.842: gst_object_unref: assertion '((GObject *) object)->ref_count > 0' failed

        (QGroundControl.exe:14056): GStreamer-CRITICAL **: 09:23:21.842: gst_object_unref: assertion '((GObject *) object)->ref_count > 0' failed

        (QGroundControl.exe:14056): GLib-GObject-WARNING **: 09:23:21.842: value "-1" of type 'gint' is invalid or out of range for property 'port' of type 'gint'

        (QGroundControl.exe:14056): GStreamer-CRITICAL **: 09:23:21.842: gst_object_unref: assertion '((GObject *) object)->ref_count > 0' failed

        (QGroundControl.exe:14056): GStreamer-CRITICAL **: 09:23:21.842: gst_object_unref: assertion '((GObject *) object)->ref_count > 0' failed error

        serkan_trS 1 Reply Last reply
        0
        • serkan_trS serkan_tr

          In windows 10 operating system, I was making an application on the old computer and running the build file of the application on another device and there was no problem. But I installed windows 11 on my new computer and I built the same application with the same version (qt 5.11) and when I try to run it on another device, it does not give an error, but the screen does not appear. It just works in the background.
          I tried to downgrade (windows 10) because the reason for this situation might be windows 11 and the same thing happened again. Since I don't get an error, I can't find where the problem originates. All the files in the old build file and the new build file are the same. I didn't see anything different, but it doesn't work. How to determine where the error is originating from.
          I can't share bits of code because the app is too big general pattern of the app [https://github.com/mavlink/qgroundcontrol](
          I can't share bits of code because the app is too big general pattern of the app https://github.com/mavlink/qgroundcontrol)

          J.HilkJ Offline
          J.HilkJ Offline
          J.Hilk
          Moderators
          wrote on last edited by
          #4

          @serkan_tr have you tried moving it to 0,0 ? sometimes when you for example store application coordinates, or do some positions yourself, one can end up with the app being completely offscreen

          You're using QML, it's possible something is not loading properly, sometimes those problems come without warnings/errors, for example when you use loaders

          reduce/comment out more and more from your main qml file until you see a window and work backwards from there


          Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


          Q: What's that?
          A: It's blue light.
          Q: What does it do?
          A: It turns blue.

          G 1 Reply Last reply
          4
          • J.HilkJ J.Hilk

            @serkan_tr have you tried moving it to 0,0 ? sometimes when you for example store application coordinates, or do some positions yourself, one can end up with the app being completely offscreen

            You're using QML, it's possible something is not loading properly, sometimes those problems come without warnings/errors, for example when you use loaders

            reduce/comment out more and more from your main qml file until you see a window and work backwards from there

            G Offline
            G Offline
            giusdbg
            wrote on last edited by
            #5

            @J-Hilk @serkan_tr Not long ago I wasted quite a bit of time on something very similar.
            The size of the base mask was set based on the background image loaded from a file.
            Only the file wasn't found, so the image and mask were set to zero size.

            serkan_trS 1 Reply Last reply
            1
            • serkan_trS serkan_tr

              @jsulm I tried these methods meanwhile on the host (QGroundControl.exe:14056): GStreamer-CRITICAL **: 09:23:21.841: gst_object_unref: assertion '((GObject *) object)->ref_count > 0' failed

              (QGroundControl.exe:14056): GStreamer-CRITICAL **: 09:23:21.841: gst_object_unref: assertion '((GObject *) object)->ref_count > 0' failed

              (QGroundControl.exe:14056): GLib-GObject-WARNING **: 09:23:21.842: value "-1" of type 'gint' is invalid or out of range for property 'port' of type 'gint'

              (QGroundControl.exe:14056): GStreamer-CRITICAL **: 09:23:21.842: gst_object_unref: assertion '((GObject *) object)->ref_count > 0' failed

              (QGroundControl.exe:14056): GStreamer-CRITICAL **: 09:23:21.842: gst_object_unref: assertion '((GObject *) object)->ref_count > 0' failed

              (QGroundControl.exe:14056): GLib-GObject-WARNING **: 09:23:21.842: value "-1" of type 'gint' is invalid or out of range for property 'port' of type 'gint'

              (QGroundControl.exe:14056): GStreamer-CRITICAL **: 09:23:21.842: gst_object_unref: assertion '((GObject *) object)->ref_count > 0' failed

              (QGroundControl.exe:14056): GStreamer-CRITICAL **: 09:23:21.842: gst_object_unref: assertion '((GObject *) object)->ref_count > 0' failed error

              serkan_trS Offline
              serkan_trS Offline
              serkan_tr
              wrote on last edited by
              #6

              @serkan_tr Difference between working and new build file. New build (not working) has redundant .qtc_clangd and .qtc files.

              serkan_trS 1 Reply Last reply
              0
              • G giusdbg

                @J-Hilk @serkan_tr Not long ago I wasted quite a bit of time on something very similar.
                The size of the base mask was set based on the background image loaded from a file.
                Only the file wasn't found, so the image and mask were set to zero size.

                serkan_trS Offline
                serkan_trS Offline
                serkan_tr
                wrote on last edited by
                #7

                @giusdbg Is there a problem with screen resizing?

                G 1 Reply Last reply
                0
                • serkan_trS serkan_tr

                  @serkan_tr Difference between working and new build file. New build (not working) has redundant .qtc_clangd and .qtc files.

                  serkan_trS Offline
                  serkan_trS Offline
                  serkan_tr
                  wrote on last edited by
                  #8

                  @serkan_tr Is there any possibility that the error is these two files because the only difference is these two files. And the point I don't understand is why these files are not created on my old computer but on my new computer.

                  1 Reply Last reply
                  0
                  • serkan_trS serkan_tr

                    @giusdbg Is there a problem with screen resizing?

                    G Offline
                    G Offline
                    giusdbg
                    wrote on last edited by
                    #9

                    @serkan_tr It is a hypothesis and possibility.

                    I solved it by using the debugger to see the object values or by using qDebug to print the various settings.

                    serkan_trS 2 Replies Last reply
                    0
                    • G giusdbg

                      @serkan_tr It is a hypothesis and possibility.

                      I solved it by using the debugger to see the object values or by using qDebug to print the various settings.

                      serkan_trS Offline
                      serkan_trS Offline
                      serkan_tr
                      wrote on last edited by
                      #10

                      @giusdbg my problem is i have a project and i am compiling this project on computer A and run the build file on both computer A and computer B it works fine. But when I send what was compiled on computer C to computer B, it does not work on computer B, it works in C, this is the general problem.
                      The qt version of computer A and C vs everything is the same

                      1 Reply Last reply
                      0
                      • G giusdbg

                        @serkan_tr It is a hypothesis and possibility.

                        I solved it by using the debugger to see the object values or by using qDebug to print the various settings.

                        serkan_trS Offline
                        serkan_trS Offline
                        serkan_tr
                        wrote on last edited by
                        #11

                        @giusdbg It works on the computer I built too. When I run a computer that does not have qt installed, the screen does not appear, it seems to be running in the background.
                        Note: There are two computers. And I build the same files with the same versions on these computers. The result of the compilation on the 1st computer works the same on all computers, but the compilation from the 2nd computer only works on the computer I compiled

                        jsulmJ 1 Reply Last reply
                        0
                        • serkan_trS serkan_tr

                          @giusdbg It works on the computer I built too. When I run a computer that does not have qt installed, the screen does not appear, it seems to be running in the background.
                          Note: There are two computers. And I build the same files with the same versions on these computers. The result of the compilation on the 1st computer works the same on all computers, but the compilation from the 2nd computer only works on the computer I compiled

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

                          @serkan_tr said in The application is running in the background but the screen does not appear:

                          When I run a computer that does not have qt installed, the screen does not appear

                          That's why I asked whether you properly deployed your app and gave you a link to documentation.

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

                          serkan_trS 1 Reply Last reply
                          1
                          • jsulmJ jsulm

                            @serkan_tr said in The application is running in the background but the screen does not appear:

                            When I run a computer that does not have qt installed, the screen does not appear

                            That's why I asked whether you properly deployed your app and gave you a link to documentation.

                            serkan_trS Offline
                            serkan_trS Offline
                            serkan_tr
                            wrote on last edited by
                            #13

                            @jsulm I did the same page as you specified, but the result is the same, I don't get an error. When I run the application, it seems to be running in the background, but the screen does not appear. It doesn't give an error when run from terminal.

                            In addition, I start the compilation process on two computers at the same time and I am trying to open the resulting build files on a different computer. The build file on the first computer does not appear on the screen, the second build file appears

                            qt creator 9.0.1 is installed on the old computer and 10.0.1 is installed on the new computer. I version 10.0.1 seems to break something 9.0.1 works directly on other devices without doing anything build file

                            serkan_trS jsulmJ 2 Replies Last reply
                            0
                            • serkan_trS serkan_tr

                              @jsulm I did the same page as you specified, but the result is the same, I don't get an error. When I run the application, it seems to be running in the background, but the screen does not appear. It doesn't give an error when run from terminal.

                              In addition, I start the compilation process on two computers at the same time and I am trying to open the resulting build files on a different computer. The build file on the first computer does not appear on the screen, the second build file appears

                              qt creator 9.0.1 is installed on the old computer and 10.0.1 is installed on the new computer. I version 10.0.1 seems to break something 9.0.1 works directly on other devices without doing anything build file

                              serkan_trS Offline
                              serkan_trS Offline
                              serkan_tr
                              wrote on last edited by
                              #14

                              @serkan_tr
                              QT creator 9.0.1 is an old version how can I revert to this version

                              1 Reply Last reply
                              0
                              • serkan_trS serkan_tr

                                @jsulm I did the same page as you specified, but the result is the same, I don't get an error. When I run the application, it seems to be running in the background, but the screen does not appear. It doesn't give an error when run from terminal.

                                In addition, I start the compilation process on two computers at the same time and I am trying to open the resulting build files on a different computer. The build file on the first computer does not appear on the screen, the second build file appears

                                qt creator 9.0.1 is installed on the old computer and 10.0.1 is installed on the new computer. I version 10.0.1 seems to break something 9.0.1 works directly on other devices without doing anything build file

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

                                @serkan_tr said in The application is running in the background but the screen does not appear:

                                I version 10.0.1 seems to break something 9.0.1

                                QtCreator version should not make any difference. It's just an IDE. Important is Qt version.

                                "The build file on the first computer does not appear on the screen, the second build file appears" - I don't know what this means. Where on the screen do you expect it to appear? In what application? And what exactly do you mean by "build file"? The executable or the CMakeLists.txt/*.pro file?

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

                                serkan_trS 1 Reply Last reply
                                1
                                • jsulmJ jsulm

                                  @serkan_tr said in The application is running in the background but the screen does not appear:

                                  I version 10.0.1 seems to break something 9.0.1

                                  QtCreator version should not make any difference. It's just an IDE. Important is Qt version.

                                  "The build file on the first computer does not appear on the screen, the second build file appears" - I don't know what this means. Where on the screen do you expect it to appear? In what application? And what exactly do you mean by "build file"? The executable or the CMakeLists.txt/*.pro file?

                                  serkan_trS Offline
                                  serkan_trS Offline
                                  serkan_tr
                                  wrote on last edited by
                                  #16

                                  @jsulm You're right, I should have explained in more detail. I downloaded the QGroundControl app and made changes to it. (state of the application)
                                  I made a lot of changes on the application and the versions I used I used 5.15 for QT.
                                  I was able to compile the project I made with windows 10 and Qt 5.15(QT creator 9.0.1 version) installed on my old computer and run the executable file on every computer. After a long time I compiled the same codes on a new computer (windows 10 and QT 5.15 (qt creator 10.0.1) it works fine when I run the executable. but when I throw this executable file to another computer, the application runs in the background but the interface part does not open.
                                  The settings and versions I made on the old computer are all the same, the only difference is that I was using qt creator 9.0.1 on the old computer and I was using qt creator 10.0.1 on the new computer.

                                  jsulmJ J.HilkJ S 3 Replies Last reply
                                  0
                                  • serkan_trS serkan_tr

                                    @jsulm You're right, I should have explained in more detail. I downloaded the QGroundControl app and made changes to it. (state of the application)
                                    I made a lot of changes on the application and the versions I used I used 5.15 for QT.
                                    I was able to compile the project I made with windows 10 and Qt 5.15(QT creator 9.0.1 version) installed on my old computer and run the executable file on every computer. After a long time I compiled the same codes on a new computer (windows 10 and QT 5.15 (qt creator 10.0.1) it works fine when I run the executable. but when I throw this executable file to another computer, the application runs in the background but the interface part does not open.
                                    The settings and versions I made on the old computer are all the same, the only difference is that I was using qt creator 9.0.1 on the old computer and I was using qt creator 10.0.1 on the new computer.

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

                                    @serkan_tr You still do not say whether you deployed your app or not. Simply copying the executable to a computer without Qt will not work...

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

                                    serkan_trS 1 Reply Last reply
                                    1
                                    • serkan_trS serkan_tr

                                      @jsulm You're right, I should have explained in more detail. I downloaded the QGroundControl app and made changes to it. (state of the application)
                                      I made a lot of changes on the application and the versions I used I used 5.15 for QT.
                                      I was able to compile the project I made with windows 10 and Qt 5.15(QT creator 9.0.1 version) installed on my old computer and run the executable file on every computer. After a long time I compiled the same codes on a new computer (windows 10 and QT 5.15 (qt creator 10.0.1) it works fine when I run the executable. but when I throw this executable file to another computer, the application runs in the background but the interface part does not open.
                                      The settings and versions I made on the old computer are all the same, the only difference is that I was using qt creator 9.0.1 on the old computer and I was using qt creator 10.0.1 on the new computer.

                                      J.HilkJ Offline
                                      J.HilkJ Offline
                                      J.Hilk
                                      Moderators
                                      wrote on last edited by
                                      #18

                                      @serkan_tr @jsulm is probably on the correct path.

                                      can you post the command you used for the windeployqt program ?

                                      and/or can you post a screenshot of the folder containing your "deployed" executable ?


                                      Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


                                      Q: What's that?
                                      A: It's blue light.
                                      Q: What does it do?
                                      A: It turns blue.

                                      serkan_trS 1 Reply Last reply
                                      1
                                      • J.HilkJ J.Hilk

                                        @serkan_tr @jsulm is probably on the correct path.

                                        can you post the command you used for the windeployqt program ?

                                        and/or can you post a screenshot of the folder containing your "deployed" executable ?

                                        serkan_trS Offline
                                        serkan_trS Offline
                                        serkan_tr
                                        wrote on last edited by serkan_tr
                                        #19

                                        @J-Hilk
                                        windeployqt --qmldir qml C:\ems\build-Rovercopter-UKB-Desktop_Qt_5_15_2_MSVC2019_64bit-Release

                                        Screenshot 2023-05-25 160929.png Screenshot 2023-05-25 160910.png Screenshot 2023-05-25 160851.png Screenshot 2023-05-25 160815.png

                                        image of the compiled file

                                        1 Reply Last reply
                                        1
                                        • jsulmJ jsulm

                                          @serkan_tr You still do not say whether you deployed your app or not. Simply copying the executable to a computer without Qt will not work...

                                          serkan_trS Offline
                                          serkan_trS Offline
                                          serkan_tr
                                          wrote on last edited by
                                          #20

                                          @jsulm
                                          I created it with the windeployqt command

                                          serkan_trS J.HilkJ 2 Replies 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