touch-packages team mailing list archive
-
touch-packages team
-
Mailing list archive
-
Message #117329
[Bug 1290514] Re: LibreOffice KDE4 backend crashes in Qt4 recursive paint events
** Changed in: qt4-x11 (Ubuntu Precise)
Status: Fix Committed => Confirmed
** Changed in: qt4-x11 (Ubuntu)
Milestone: ubuntu-14.04 => None
** Changed in: qt4-x11 (Ubuntu)
Importance: Undecided => High
** Changed in: qt4-x11 (Ubuntu Precise)
Importance: Undecided => High
** Changed in: qt4-x11 (Ubuntu Quantal)
Importance: Undecided => High
** Changed in: qt4-x11 (Ubuntu Trusty)
Importance: Undecided => High
** Changed in: qt4-x11 (Ubuntu Saucy)
Importance: Undecided => High
** Tags added: precise
--
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to qt4-x11 in Ubuntu.
https://bugs.launchpad.net/bugs/1290514
Title:
LibreOffice KDE4 backend crashes in Qt4 recursive paint events
Status in qt4-x11 package in Ubuntu:
Fix Released
Status in qt4-x11 source package in Precise:
Confirmed
Status in qt4-x11 source package in Quantal:
Won't Fix
Status in qt4-x11 source package in Saucy:
Won't Fix
Status in qt4-x11 source package in Trusty:
Fix Released
Bug description:
Distribution: Kubuntu 12.04
Package: qt4-x11 4:4.8.1-0ubuntu4.6
Program: LibreOffice 4.3 (current master build).
This bugs origin is a crash when using KDE4 native file picker dialogs
from within LibreOffice [1].
There are several similar ones in all distributions.
In the backtrace you can see, that LO calls the Qt event dispatcher,
which processes a draw event, which - at some point - waits for the
clipboard using the Qt / 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 handling / locking.
QX11Data::clipboardWaitForEvents (gui/kernel/qclipboard_x11.cpp:520)
actually installs the correct clipboard event filter in the qapp,
which should just handle Clipboard events.
But actually the Qt internal glib event loop doesn't honor the
QEventLoop::ExcludeSocketNotifiers (see
src/corelib/kernel/qeventdispatcher_glib.cpp).
Originally I opened [2], because I didn't want to deep dive into the
Qt codebase. Since I didn't get any usable replies and all my
implemented workarounds in LibreOffice didn't work I tried to
understand the backtrace from [2] and realized the missing
QEventLoop::ExcludeSocketNotifiers handling in the Qt glib code. I
opened [3] and pushed a patch for Qt review as [4].
[1] https://bugs.freedesktop.org/show_bug.cgi?id=69002
[2] https://bugreports.qt-project.org/browse/QTBUG-34614
[3] https://bugreports.qt-project.org/browse/QTBUG-37380
[4] https://codereview.qt-project.org/#change,80528
[IMPACT]
The patch fixes the glib event loop to pass a currently failing testcase in the Qt4 library (processEventsExcludeSocket in tests/auto/qeventloop/tst_qeventloop.cpp). The flag was never handled in the glib eventloop.
[TEST CASE]
LibreOffice uses a very rarely used Qt codepath to poll the X11 clipboard (using the event loop), which needs this patch. Otherwise it crashes very often with the KDE 4 backend when polling the clipboard. There is no other codepath.
Test by using LibreOffice with the KDE theme until it crashes. After the patch is applied it will no longer crash.
[REGRESSION POTENTIAL]
I can't imagine a program out there which relies on this brokeness.
If the patch was really broken to invert the behaviour, the impact would be immediately visible, as no socket events would be processed, including X11 events.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/qt4-x11/+bug/1290514/+subscriptions