Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
5.12.0
-
None
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
- relates to
-
QTBUG-64928 Default QApplication project crashes inside QXcbConnection::internAtom()
- Closed