Details
-
Bug
-
Resolution: Won't Do
-
P3: Somewhat important
-
None
-
5.15.5, 6.3.1, 6.x
-
None
-
Linux 5.15.x x86_64
Description
Running a Qt 5.x/6.x program with unset or incorrect DISPLAY variable crashes the program and results in an abrupt exit. For example:
$ unset DISPLAY $ simplescreenrecorder qt.qpa.xcb: could not connect to display qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found. This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem. Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb. Aborted (core dumped)
The value of (primary) DISPLAY could instead be obtained in cases where it is not available in the environment. Even when the machine has no display, there shouldn't be a crash but instead a warning should be printed and Qt should make a controlled exit from the situation.
Attachments
Issue Links
- duplicates
-
QTBUG-63763 more user-friendly qFatal
- Closed