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

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

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Not Evaluated
    • 5.4.1
    • 4.8.4
    • GUI: Drag and Drop
    • None
    • Kubuntu Saucy 13.10 (qt4: 4:4.8.4+dfsg-0ubuntu18)
      LibreOffice master build (4.2 alpha)
    • a2f78ea0a147301222cb5346fad7e09121d87d59

    Description

      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?

      Attachments

        1. bt-repaint-error.txt
          28 kB
        2. bt-segv.txt
          18 kB
        3. l-qclipboard_fix_recursive.patch
          4 kB

        Issue Links

          For Gerrit Dashboard: QTBUG-34614
          # Subject Branch Project Status CR V

          Activity

            People

              Unassigned Unassigned
              jmux Jan-Marek Glogowski
              Votes:
              5 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes