LibreOffice KDE4 backend crashes in Qt4 recursive paint events
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
qt4-x11 (Ubuntu) |
Fix Released
|
High
|
Unassigned | ||
Precise |
Won't Fix
|
High
|
Unassigned | ||
Quantal |
Won't Fix
|
High
|
Unassigned | ||
Saucy |
Won't Fix
|
High
|
Unassigned | ||
Trusty |
Fix Released
|
High
|
Unassigned |
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-
because the X11 event processing in clipboardWaitFo
QX11Data:
But actually the Qt internal glib event loop doesn't honor the QEventLoop:
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:
[1] https:/
[2] https:/
[3] https:/
[4] https:/
[IMPACT]
The patch fixes the glib event loop to pass a currently failing testcase in the Qt4 library (processEventsE
[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.
Changed in qt4-x11 (Ubuntu): | |
status: | New → Triaged |
tags: | added: kubuntu |
Changed in qt4-x11 (Ubuntu Trusty): | |
milestone: | none → ubuntu-14.04 |
description: | updated |
tags: | added: verification-done-precise verification-done-quantal |
tags: | removed: verification-needed |
Changed in qt4-x11 (Ubuntu Precise): | |
status: | Fix Committed → Confirmed |
Changed in qt4-x11 (Ubuntu): | |
milestone: | ubuntu-14.04 → none |
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 |
Status changed to 'Confirmed' because the bug affects multiple users.