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

Default QApplication project crashes inside QXcbConnection::internAtom()

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 5.12.8
    • 5.12.0
    • QPA: X11/XCB
    • None
    • Linux/X11

    Description

      When a QApplication project is compiled and linked on a compatible OS (e.g. RHEL 7.4) it uses version of libxcb library provided by that system. Unfortunately, when starting such an application, the DISPLAY environment variable can still point to a different system, with various X display technologies, e.g. Xvnc, NoMachine, Exceed onDemand, not necessarily compatible with the X version and libraries used on the original system.
      This results in a segfault, without any chance to guess whether it is a client application bug or X compatibility issue, e.g.:

      $ $TOT/bin/testApp
      qt.qpa.xcb: XKeyboard extension not present on the X server
      /<path_filtered>/bin/testApp.exe[100]: .: line 134: 31147: Memory fault(coredump)
      Segmentation fault (core dumped)

      There was already a patch discussed preventing such nullptr dereference, but it was abandoned (see QTBUG-64928 for details):

      https://codereview.qt-project.org/c/qt/qtbase/+/213833

      Here is the same try on such incompatible DISPLAY, but with the patch applied:

      $ $BAT/bin/testApp
      qt.qpa.xcb: XKeyboard extension not present on the X server
      failed to get the current screen resources
      The X11 connection broke: Unsupported extension used (code 2)
      XIO: fatal IO error 2 (No such file or directory) on X server "gold:1"
       after 5 requests (5 known processed) with 0 events remaining.

      Please reconsider patching the 5.12 LTS release with it.

      In our case, we have to ship a commercial app without debugging symbols as a binary package to our customers. Therefore, we often have no way to reproduce or debug such problems on-site. Any extra messaging might help identifying the issue, contrary to the generic "Memory fault(coredump)" current behavior.

      Attachments

        Issue Links

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

          Activity

            People

              paeglis Gatis Paeglis
              ediap Adam Piatyszek
              Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes