Results 1 to 3 of 3

Thread: Strange responsiveness/repaint behavior.

  1. #1
    Join Date
    Jun 2011
    Posts
    4
    Qt products
    Qt4
    Platforms
    Windows

    Question Strange responsiveness/repaint behavior.

    Hi folks -

    My application plots real-time sensor data and also allows the user to send very short commands to HW over a serial port. The strange behavior is that through some combination of interaction (I haven't been able to consistently reproduce it), the application window stops repainting itself. When it gets into this "mode", if I move the whole application window it refreshes (redraws? repaints?) everything and then stops again when the window stops moving. For example:

    - If I click on a LineEdit nothing happens - but if I then move the window slightly then the cursor appears at the end of the text. It doesn't blink like it should unless I keep moving the window to keep it refreshing.

    - The plot displaying the incoming data stops updating - but when I move the window it refreshes and shows enough acquired data to indicate that everything continues to run correctly in the background.

    Does anyone have any suggestions as to what might have happened or what I can look for to explain this behavior?

    Thanks much,

    Joe.

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Strange responsiveness/repaint behavior.

    Using multithreading? If so, has the GUI thread gotten into a state where it is blocked waiting for input from the sensor or the serial port? From your comment about "in the background" it implies that you are multithreading and have probably gotten the app into some kind of deadlock situation.

    If your app is being kept so busy that the event loop is unable to execute, this could also cause unresponsiveness, although moving the window shouldn't necessarily cause things to magically repair themselves unless moving the window sends a repaint which bypasses the event loop.

  3. #3
    Join Date
    Jun 2011
    Posts
    4
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Strange responsiveness/repaint behavior.

    Thanks for the reply.

    It looks like the culprit here was an issue or two in the QExtSerialPort module that I am using. Shortly after posting here I found a couple bugs in the QExtSerialPort bug list that deal with this issue. Something about the way the serial port handles events - or, more precisely, the way it doesn't stop trying to handle events after you close the port - is interfering with the rest of the events in the system.

    Odd, because it wasn't the usual incorrect thread usage or "too busy to handle events" behavior.

    Anyway, hope this helps someone else avoid the same problem!

    Joe.

Similar Threads

  1. setCellWidget - strange behavior
    By Archa4 in forum Newbie
    Replies: 5
    Last Post: 28th April 2011, 08:26
  2. QSqlDatabase strange behavior
    By macav in forum Qt Programming
    Replies: 1
    Last Post: 9th February 2011, 15:21
  3. Qt Creator Strange behavior of GDB in Creator 1.3
    By rayjc in forum Qt Tools
    Replies: 1
    Last Post: 11th March 2010, 21:42
  4. Strange resize behavior
    By Lykurg in forum Newbie
    Replies: 3
    Last Post: 9th January 2007, 13:56
  5. scrollbars strange behavior
    By siniy in forum Qt Programming
    Replies: 6
    Last Post: 29th December 2006, 10:27

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.