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

Repaint errors when run with X11 clipboard code branch "useEventLoopForWaiting=true".


    • Type: Bug
    • Status: Closed
    • Priority: Not Evaluated
    • Resolution: Fixed
    • Affects Version/s: 4.8.4
    • Fix Version/s: 5.4.1
    • Component/s: GUI: Drag and Drop
    • Labels:
    • Environment:
      Kubuntu Saucy 13.10 (qt4: 4:4.8.4+dfsg-0ubuntu18)
      LibreOffice master build (4.2 alpha)
    • Commits:


      I'm trying to debug a libreoffice / KDE4 / qt4 backtrace / crash.

      The first backtrace (bt-repaint-error.txt) is caught from the repaint error just before the crash. The second BT (bt-segv.txt) is the real SIGSEGV.

      The bug is also open at libreoffice (https://bugs.freedesktop.org/show_bug.cgi?id=69002), but there are several similar ones in all distributions.

      From my understanding of the backtrace, LO calls the Qt event dispatcher, which processes a draw event, which - at some point - waits for the clipboard using the LO event loop, which processes another (now nested) draw event -> crash.

      This happens, because LO sets
      qApp->clipboard()->setProperty( "useEventLoopWhenWaiting", true );

      because the X11 event processing in clipboardWaitForEvents would interfere with the LO X11 locking.

      I had a look at QX11Data::clipboardWaitForEvents (gui/kernel/qclipboard_x11.cpp:520), and this installs a clipboard event filter in the qapp, which should just handle Clipboard events, but this doesn't seems to work as intended.

      Probably the eventFilter should be installed in the used eventDispatcher in the "useEventLoopWhenWaiting" code branch?


        1. bt-repaint-error.txt
          28 kB
          Jan-Marek Glogowski
        2. bt-segv.txt
          18 kB
          Jan-Marek Glogowski
        3. l-qclipboard_fix_recursive.patch
          4 kB
          Luboš Luňák

          Issue Links

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



              • Assignee:
                jmux Jan-Marek Glogowski
              • Votes:
                5 Vote for this issue
                11 Start watching this issue


                • Created:

                  Gerrit Reviews

                  There are no open Gerrit changes