Results 1 to 12 of 12

Thread: Qt application hangs in xcb_wait_for_reply

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Dec 2016
    Posts
    16
    Thanks
    2
    Thanked 1 Time in 1 Post
    Qt products
    Qt4

    Default Qt application hangs in xcb_wait_for_reply

    Hi All,
    I am working on a Qt 4.6 based application on RedHat Linux 6 that shows different stuff in a main window -a tree, a table, text edit etc. and in the status bar I have recently added a "composite widget" to control and view application details. This composite widget in the status bar - is composed of a widget that shows a progress bar and a bunch of QLabels showing some numbers.

    I constantly the sub-widgets inside the composite widget as the application receives some notifications over socket from another process - updates are delayed with a single shot timer of 0.5s.
    When the application runs for long times >4 hours minimum, the new widget that I added is causing a slowdown.
    It crawls on doing any movement - in all cases it is stuck in xcb_wait_for_reply, as seen in the attached stack trace (was too big to paste here - so made an attachment).

    I did an experiment - QLabel->setText in a loop (1 million times) and I would run into the same issue in about 500K times.
    If I replace the QLabel with QPainter::drawText then I would run into the same issue after about 2 millions times.

    To confirm this info - I removed the QLabel->setText from my composite wigdet - but it didnt resolve the problem. If I remove the progress bar (paint event - more on this progress bar later) - doesnt resolve the issue.
    Only if I remove BOTH the QLabel->setText and comment the paint event of my composite widgets progress bar (which is a widget derived from QFrame in which I have a custom paint event to draw 4 rectangles with different colors) - do the things resolve i.e. no hang in the test case.

    What could be going wrong here - is this something to do with the X11 session getting bogged down by too many "draw" calls - from the QLabel and QPaint::drawText at the same time? Why the combination of these two together causes an issue? Is this something do with the Qtimer - single shot timer? Even when all notifications are done, application is sitting idle doing nothing - and I minimize and maximize it - it hangs with the same stack trace below!

    Any clues would be very helpful!

    best,
    Ednakram
    Attached Files Attached Files

Similar Threads

  1. Replies: 11
    Last Post: 13th December 2015, 17:51
  2. QProcess start hangs application
    By hakermania in forum Newbie
    Replies: 3
    Last Post: 10th September 2011, 08:43
  3. Replies: 3
    Last Post: 17th April 2011, 12:05
  4. Application Hangs in QTcpConnection
    By navi1084 in forum Qt Programming
    Replies: 1
    Last Post: 24th June 2009, 05:21
  5. Qtopia example execution error(application hangs)
    By devendra in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 17th October 2006, 09:11

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.