Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-58709

Qt does not handle X11 ICE IO errors

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.5.1, 5.7.1
    • QPA: X11/XCB
    • None
    • X11

    Description

      Qt does not intercept the libice IO error handler. The default libice handler prints an error message to stderr and calls exit(1). This is not user friendly in a GUI environment.

      A particular example of this is in Qt handling of the X session management protocol. When QCoreApplication is instantiated an XSM connection over ICE is made. The session manager will then send Save Yourself request to the application if this request is not responded to within 90 seconds then the session manager will close the underlying ICE connection. This will occur if the application takes too long to start processing the message queue. When the message loop is started Qt will find a XSM save yourself event waiting in the queue and will try to send a response over the closed connection at which point the libice default IO error handler will terminate via exit(1) without the GUI being displayed and often with the message to stderr discarded.

      Qt does not install it own ICE IO error handler and handle this situation gracefully, nor does it give the application a (simple) way to install its own handler. IMHO a bug not a feature.

      Attachments

        1. ICETest.pro
          0.3 kB
        2. main.cpp
          0.2 kB
        3. stderr
          0.1 kB
        4. xfce4-sm.log
          0.4 kB

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              Unassigned Unassigned
              rogerjames9 rogerjames9
              Veli-Pekka Heinonen Veli-Pekka Heinonen
              Votes:
              3 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes