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

Program crashes with unset or incorrect DISPLAY variable

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • P3: Somewhat important
    • None
    • 5.15.5, 6.3.1, 6.x
    • Core: Other, QPA: X11/XCB
    • None
    • Linux 5.15.x x86_64
    • Linux/X11

    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

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

          Activity

            People

              liaqi Liang Qi
              drws drws rwx
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes