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

Qt applications break when HDMI monitor is unplugged and replugged

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.15.7
    • QPA, QPA: Wayland
    • None
    • Linux/Wayland, macOS

    Description

      Context:

      I'm not sure about the project and component fields. Please reclassify the issue if needed.

      We have detected an issue in KeepassXC (I'm not the developer, just a user) that makes rendering of (at least) labels incorrect. After some diagnosis we think the problem is with Qt 5, because the same problem can be reproduced with the VLC video player.

      The issue seems to happen in Mac and Linux with Sway and Wayland (this is my system, I cannot talk for the Mac guys, but the error seems the same).

      For reference, this is the issue in KeepassXC repo: https://github.com/keepassxreboot/keepassxc/issues/8758


      Description of the issue in Linux+Sway+Wayland:

      I have a KVM switch that lets me work with two desktop PCs that are connected to the same monitor and input peripherals through the KVM switch. That means that, every time I switch from one to other, the HDMI and most of the USBs are disconnected from one PC and connected to the other.

      I don't know yet if that is related to the bug, though it seems likely. I will try to leave KeepassXC open for a long time without switching and see what happens. Also, The issue takes a short time to be reproduced (less than 10 minutes usually).

      I'm also getting the following errors in the console:

      ivan@baco:~ $ keepassxc
      libpng warning: iCCP: known incorrect sRGB profile
      libpng warning: iCCP: known incorrect sRGB profile
      QPainter::begin: Paint device returned engine == 0, type: 3
      QPainter::begin: Paint device returned engine == 0, type: 3
      QPainter::setCompositionMode: Painter not active
      QPainter::begin: Paint device returned engine == 0, type: 3
      QPainter::begin: Paint device returned engine == 0, type: 3
      .
      .
      .

      The display looks like this (no menu bar and items are blank too):

      After some more tests it looks like it's a problem with unplugging a repluggin the monitor again.

      For some reason, replugging the monitor makes the QT errors appear and as soon you try to interact with the UI, it begins to freeze and fails to repaint things.

      I can confirm that this is happening in VLC, too. It is using Qt 5, as KeepassXC:

       

      Attachments

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

        Activity

          People

            vestbo Tor Arne Vestbø
            izaera Iván Zaera Avellón
            Votes:
            3 Vote for this issue
            Watchers:
            9 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes