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. Could someone tell me why my application always freezes
Qt 6.11 is out! See what's new in the release blog

Could someone tell me why my application always freezes

Scheduled Pinned Locked Moved Unsolved General and Desktop
20 Posts 4 Posters 3.6k 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.
  • Q Offline
    Q Offline
    Qingshui Kong
    wrote on last edited by
    #1

    Hello everyone,

    Could someone give me some advice?
    I design a QT application on Ubuntu. And I use touch screen. But it often freezes when I touch the screen after I leave it alone for hours. And if I don't use touch screen, it works.

    I don't know the reason, and I don't know how to analyze it, either. When it freezes, I debug it. But it doesn't run into any code that I design. It loops at "pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185\n".

    So could someone tell me the reason or give me some advice?

    Thanks in advance.

    J.HilkJ Q 3 Replies Last reply
    0
    • Q Qingshui Kong

      Hello everyone,

      Could someone give me some advice?
      I design a QT application on Ubuntu. And I use touch screen. But it often freezes when I touch the screen after I leave it alone for hours. And if I don't use touch screen, it works.

      I don't know the reason, and I don't know how to analyze it, either. When it freezes, I debug it. But it doesn't run into any code that I design. It loops at "pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185\n".

      So could someone tell me the reason or give me some advice?

      Thanks in advance.

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

      hi @Qingshui-Kong ,
      question, do you happen to have the touchscreen keyboard open when this error occurs?


      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.

      Q 1 Reply Last reply
      0
      • J.HilkJ J.Hilk

        hi @Qingshui-Kong ,
        question, do you happen to have the touchscreen keyboard open when this error occurs?

        Q Offline
        Q Offline
        Qingshui Kong
        wrote on last edited by
        #3

        @J.Hilk
        You mean ubuntu touchscreen keyboard? Or Qt virtual keyboard?

        I have ubuntu touchscreen keyboard. But I close it.
        0_1556186019072_59050e25-8643-47e6-9dac-30a3f9590357-image.png

        I don't use QVirtualKeyboard. But I use some other thirdparty virtualkeyboard.

        J.HilkJ 1 Reply Last reply
        0
        • Q Qingshui Kong

          @J.Hilk
          You mean ubuntu touchscreen keyboard? Or Qt virtual keyboard?

          I have ubuntu touchscreen keyboard. But I close it.
          0_1556186019072_59050e25-8643-47e6-9dac-30a3f9590357-image.png

          I don't use QVirtualKeyboard. But I use some other thirdparty virtualkeyboard.

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

          @Qingshui-Kong
          There was a bug, not sure if it's fixed already, that happened on android qt apps.

          Would the app be suspended (for example during screen turn off) while the virtual keyboard was active. The application would become unresponsive. And would have to be restarted

          As far as I know, that was only the case for android os. SO this would be the first case I know of for linux.

          What version of Qt are you using ?


          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.

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

            @Qingshui-Kong
            There was a bug, not sure if it's fixed already, that happened on android qt apps.

            Would the app be suspended (for example during screen turn off) while the virtual keyboard was active. The application would become unresponsive. And would have to be restarted

            As far as I know, that was only the case for android os. SO this would be the first case I know of for linux.

            What version of Qt are you using ?

            Q Offline
            Q Offline
            Qingshui Kong
            wrote on last edited by
            #5

            @J.Hilk
            Thank you very much.

            I use Qt 5.9.1.

            There is a clock on my application. Before I touch screen, it still runs. But after I touch screen, it stops. I use a QTimer to update the clock.

            By the way, what do you mean by say virtual keyboard? Qt virtual keyboard or ubuntu virtual keyboard?

            J.HilkJ 1 Reply Last reply
            0
            • Q Qingshui Kong

              @J.Hilk
              Thank you very much.

              I use Qt 5.9.1.

              There is a clock on my application. Before I touch screen, it still runs. But after I touch screen, it stops. I use a QTimer to update the clock.

              By the way, what do you mean by say virtual keyboard? Qt virtual keyboard or ubuntu virtual keyboard?

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

              @Qingshui-Kong In the case I described, that would be the OS-native keyboard

              5.9.1 is rather old. the latest patch, currently, for 5.9 is 5.9.8.

              I would suggest updating and checking again?


              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.

              Q 1 Reply Last reply
              2
              • J.HilkJ J.Hilk

                @Qingshui-Kong In the case I described, that would be the OS-native keyboard

                5.9.1 is rather old. the latest patch, currently, for 5.9 is 5.9.8.

                I would suggest updating and checking again?

                Q Offline
                Q Offline
                Qingshui Kong
                wrote on last edited by
                #7

                @J.Hilk
                So you mean there may be some bugs about that in Qt 5.9.1?

                J.HilkJ 1 Reply Last reply
                0
                • Q Qingshui Kong

                  @J.Hilk
                  So you mean there may be some bugs about that in Qt 5.9.1?

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

                  @Qingshui-Kong it's worth a try. don't you think ;-)
                  5.9 is LTS after all


                  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.

                  Q 2 Replies Last reply
                  0
                  • J.HilkJ J.Hilk

                    @Qingshui-Kong it's worth a try. don't you think ;-)
                    5.9 is LTS after all

                    Q Offline
                    Q Offline
                    Qingshui Kong
                    wrote on last edited by
                    #9

                    @J.Hilk Thank you.

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

                      @Qingshui-Kong it's worth a try. don't you think ;-)
                      5.9 is LTS after all

                      Q Offline
                      Q Offline
                      Qingshui Kong
                      wrote on last edited by
                      #10

                      @J.Hilk
                      I installed Qt 5.9.8 after I uninstalled Qt5.9.1. Then I compiled my project.
                      I copied the executable file and lib files compiled by Qt 5.9.8 to the destination PC. Then I started the application. But unfortunately, it still froze when i touch the screen after I leave it alone for hours.
                      Could you give me more advice? Now I don't know what to do to solve the problem.
                      The system is Ubuntu 16.04
                      Thank you in advance.

                      J.HilkJ 1 Reply Last reply
                      0
                      • Q Qingshui Kong

                        @J.Hilk
                        I installed Qt 5.9.8 after I uninstalled Qt5.9.1. Then I compiled my project.
                        I copied the executable file and lib files compiled by Qt 5.9.8 to the destination PC. Then I started the application. But unfortunately, it still froze when i touch the screen after I leave it alone for hours.
                        Could you give me more advice? Now I don't know what to do to solve the problem.
                        The system is Ubuntu 16.04
                        Thank you in advance.

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

                        Hi @Qingshui-Kong

                        I'm afraid I don't have many more ideas.

                        Have you tried with a minimal project ? To test your device touchscreen. Maybe everything is working as expected and it's actually something in your code?


                        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.

                        Q 1 Reply Last reply
                        0
                        • J.HilkJ J.Hilk

                          Hi @Qingshui-Kong

                          I'm afraid I don't have many more ideas.

                          Have you tried with a minimal project ? To test your device touchscreen. Maybe everything is working as expected and it's actually something in your code?

                          Q Offline
                          Q Offline
                          Qingshui Kong
                          wrote on last edited by
                          #12

                          @J.Hilk
                          OK. Thanks.
                          I haven't tried with a minimal project.
                          I also think there should be something wrong in my code. But I have checked the code, and didn't find anything wrong. So I need some help.
                          What's more, the application is fullscreen. And I haven't tried normal window yet.
                          Thanks.

                          1 Reply Last reply
                          0
                          • Q Qingshui Kong

                            Hello everyone,

                            Could someone give me some advice?
                            I design a QT application on Ubuntu. And I use touch screen. But it often freezes when I touch the screen after I leave it alone for hours. And if I don't use touch screen, it works.

                            I don't know the reason, and I don't know how to analyze it, either. When it freezes, I debug it. But it doesn't run into any code that I design. It loops at "pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185\n".

                            So could someone tell me the reason or give me some advice?

                            Thanks in advance.

                            Q Offline
                            Q Offline
                            Qingshui Kong
                            wrote on last edited by Qingshui Kong
                            #13

                            Once, it reproduced, I debuged it. And here is some log.

                            dRUNNING NEEDS-STOP COMMAND -file-list-exec-source-files
                            sStopping temporarily
                            dState changed from InferiorRunOk(11) to InferiorStopRequested(13) [master]
                            dCALL: INTERRUPT INFERIOR
                            sAttempting to interrupt.
                            sStop requested...
                            dTRYING TO INTERRUPT INFERIOR
                            dInterrupted 2214

                            ~"\nThread "
                            ~"1 "VXFoodInspectio" received signal SIGINT, Interrupt.\n"
                            ~"pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185\n"
                            &"185\t../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: No such file or directory.\n"
                            *stopped,reason="signal-received",signal-name="SIGINT",signal-meaning="Interrupt",frame={addr="0x00007ffff3623360",func="pthread_cond_wait@@GLIBC_2.3.2",args=[],file="../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S",fullname="/build/glibc-bfm8X4/glibc-2.23/nptl/../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S",line="185"},thread-id="1",stopped-threads="all",core="0"
                            dNOTE: INFERIOR STOP OK
                            sStopped.
                            dState changed from InferiorStopRequested(13) to InferiorStopOk(14) [master]
                            HANDLING QUEUED COMMANDS AFTER TEMPORARY STOP
                            <22-file-list-exec-source-files
                            dNOTE: INFERIOR RUN REQUESTED
                            sRun requested...
                            dState changed from InferiorStopOk(14) to InferiorRunRequested(10) [master]
                            sRunning requested...
                            <23-exec-continue

                            Could someone give me some advice to analyze it?

                            1 Reply Last reply
                            0
                            • Christian EhrlicherC Offline
                              Christian EhrlicherC Offline
                              Christian Ehrlicher
                              Lifetime Qt Champion
                              wrote on last edited by
                              #14

                              A backtrace would be useful I guess.

                              Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                              Visit the Qt Academy at https://academy.qt.io/catalog

                              Q 1 Reply Last reply
                              0
                              • Christian EhrlicherC Christian Ehrlicher

                                A backtrace would be useful I guess.

                                Q Offline
                                Q Offline
                                Qingshui Kong
                                wrote on last edited by
                                #15

                                @Christian-Ehrlicher
                                Thank you very much.

                                But how can I use it, if the thread is locked?

                                Could you tell me in detail?

                                1 Reply Last reply
                                0
                                • Christian EhrlicherC Offline
                                  Christian EhrlicherC Offline
                                  Christian Ehrlicher
                                  Lifetime Qt Champion
                                  wrote on last edited by
                                  #16

                                  http://sourceware.org/gdb/onlinedocs/gdb/Backtrace.html

                                  Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                                  Visit the Qt Academy at https://academy.qt.io/catalog

                                  Q 1 Reply Last reply
                                  2
                                  • Christian EhrlicherC Christian Ehrlicher

                                    http://sourceware.org/gdb/onlinedocs/gdb/Backtrace.html

                                    Q Offline
                                    Q Offline
                                    Qingshui Kong
                                    wrote on last edited by Qingshui Kong
                                    #17

                                    @Christian-Ehrlicher
                                    Thanks.

                                    I think it's a gdb command.

                                    But the application doesn't crash. Actually, it freezes. How can it produces dump file?

                                    I am not very familar with this. Could you tell me?

                                    1 Reply Last reply
                                    0
                                    • Q Qingshui Kong

                                      Hello everyone,

                                      Could someone give me some advice?
                                      I design a QT application on Ubuntu. And I use touch screen. But it often freezes when I touch the screen after I leave it alone for hours. And if I don't use touch screen, it works.

                                      I don't know the reason, and I don't know how to analyze it, either. When it freezes, I debug it. But it doesn't run into any code that I design. It loops at "pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185\n".

                                      So could someone tell me the reason or give me some advice?

                                      Thanks in advance.

                                      Q Offline
                                      Q Offline
                                      Qingshui Kong
                                      wrote on last edited by Qingshui Kong
                                      #18

                                      I find a new sympton.

                                      I opened a modal dialog. Then I left it alone. Several hours later, I touch outside the dialog. My application froze.
                                      As I know, if i touch outside of a modal dialog., it will do nothing. At least, it doesn't run into any code that I designed.

                                      So, how could that happen?

                                      If someone see this, please give me some advice. Thanks!

                                      1 Reply Last reply
                                      0
                                      • Christian EhrlicherC Offline
                                        Christian EhrlicherC Offline
                                        Christian Ehrlicher
                                        Lifetime Qt Champion
                                        wrote on last edited by
                                        #19

                                        @Qingshui-Kong said in Could someone tell me why my application always freezes:

                                        But the application doesn't crash.

                                        You can jump into the Debugger by pressing CTRL+C on the debugger command line (when you started from console)

                                        Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                                        Visit the Qt Academy at https://academy.qt.io/catalog

                                        1 Reply Last reply
                                        3
                                        • J Offline
                                          J Offline
                                          Jitendra Sharma
                                          wrote on last edited by
                                          #20

                                          Have you found any solution to this problem? or what was causing the issue?

                                          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