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. A problem similar to making the interface suspended

A problem similar to making the interface suspended

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 2 Posters 560 Views 1 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.
  • FlameF Offline
    FlameF Offline
    Flame
    wrote on last edited by
    #1

    A problem similar to making the interface suspended

    recently,I write a c++ program for data acquisition,but when it is running,I will find there is a problem similar to making the interface suspended,there is no warning that the program did not respond, at the same time I cann't do anything on the Windows10 system platform,it's more like blocking the response event of the system, so I want to know how to handle this problem. Expect for your answer.

    e-mail:547453159@qq.com

    K 1 Reply Last reply
    0
    • FlameF Flame

      A problem similar to making the interface suspended

      recently,I write a c++ program for data acquisition,but when it is running,I will find there is a problem similar to making the interface suspended,there is no warning that the program did not respond, at the same time I cann't do anything on the Windows10 system platform,it's more like blocking the response event of the system, so I want to know how to handle this problem. Expect for your answer.

      K Offline
      K Offline
      koahnig
      wrote on last edited by
      #2

      @Flame

      From the symtoms you describe it is probably a race condition you have implemented. Without more information others require a crystal ball to give you any advice.

      Probably best is to use the debugger and try to find the place where your app is getting lost. Sometimes you can use pause in the debugger and it will show you where it is currently based on the call stack.

      Another method is using qDebug() at some strategic positions and try to limit the search to some fewer places

      Vote the answer(s) that helped you to solve your issue(s)

      FlameF 1 Reply Last reply
      3
      • FlameF Offline
        FlameF Offline
        Flame
        wrote on last edited by Flame
        #3

        @koahnig the main thread is fine, in other words,the daemon is still running,one of the child threads is collecting data,only the human-computer interaction interface of the entire Windows system cannot respond to any event.

        e-mail:547453159@qq.com

        1 Reply Last reply
        0
        • K koahnig

          @Flame

          From the symtoms you describe it is probably a race condition you have implemented. Without more information others require a crystal ball to give you any advice.

          Probably best is to use the debugger and try to find the place where your app is getting lost. Sometimes you can use pause in the debugger and it will show you where it is currently based on the call stack.

          Another method is using qDebug() at some strategic positions and try to limit the search to some fewer places

          FlameF Offline
          FlameF Offline
          Flame
          wrote on last edited by Flame
          #4

          @koahnig how to using code to get the windows’ status, in other words,How can I find the interface unresponsive through the main thread

          e-mail:547453159@qq.com

          K 1 Reply Last reply
          0
          • FlameF Flame

            @koahnig how to using code to get the windows’ status, in other words,How can I find the interface unresponsive through the main thread

            K Offline
            K Offline
            koahnig
            wrote on last edited by
            #5

            @Flame

            Repeated data aquisition typically has an action started whenever new data is available. This action is most likely the source of the problem respectively it is the first point to start the search. Sometimes it helps to check simply system time stamps e.g. reading the current time stamp (storing or outting on screen) and build the difference. Possibly also https://doc.qt.io/qt-5/qelapsedtimer.html is an option. Never used that because I have already my own toolset. However, this looks suitable.

            Vote the answer(s) that helped you to solve your issue(s)

            1 Reply Last reply
            1

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved