Ubuntu

[Upstream] threading crashes in qt with kde theme

Reported by Jonathan Riddell on 2012-01-09
88
This bug affects 11 people
Affects Status Importance Assigned to Milestone
Qt
Fix Released
Medium
libreoffice (Mandriva)
Fix Released
Medium
libreoffice (Ubuntu)
Undecided
Björn Michaelsen
qt4-x11 (Ubuntu)
Undecided
Unassigned
Oneiric
Undecided
Unassigned

Bug Description

let Qt call XInitThreads(), so that it knows it's been called
Otherwise QPixmap complains when used outside of the main Qt thread and resets itself to null pixmap, eventually leading to crashes.

Upstream reports that Libreoffice and Qt need a patch each to work together with
Libreoffice 3.4 and Qt 4.7, this is because of assumptions about threading.

Created attachment 50464
Test file on which my LibreOffice installation crashes

LibreOffice Calc crashes when moving specific cells in the attached document.

Steps to reproduce:
1) Open the attached test case file
2) Select the cells A52:F56 with your mouse
3) Drag the selected cells one row down with your mouse

Result: LibreOffice Calc crashes.

I am using the KDE extensions for LibreOffice.

Created attachment 50465
Java VM error log file

When running oocalc on a command line with debug symbols installed, I get the error message appended below.

The error report file mentioned in this message is attached.

There seem to be many components involved (LibreOffice, Qt, Java VM, …) and I cannot figure out which of them is causing the crash. Feel free to direct me to another bugtracker if LibreOffice is not causing the crash.

---

jojo@panther:~/dokumente> oocalc bugtest2.ods
QPixmap: It is not safe to use pixmaps outside the GUI thread
QPixmap: It is not safe to use pixmaps outside the GUI thread
QPixmap: It is not safe to use pixmaps outside the GUI thread
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0xb20b5ce6, pid=9811, tid=2877795184
#
# JRE version: 6.0_26-b03
# Java VM: Java HotSpot(TM) Client VM (20.1-b02 mixed mode linux-x86 )
# Problematic frame:
# C [libQtGui.so.4+0x23ece6] QX11PixmapData::createCompatiblePixmapData() const+0x156
#
# An error report file with more information is saved as:
# /home/jojo/dokumente/hs_err_pid9811.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
#

[error occurred during error reporting , id 0xb]

Failed to reproduce on LibreOffice 3.4 340m1(Build:103) for OpenSuse KDE.

Still reproducable on current trunk.

*** Bug 40901 has been marked as a duplicate of this bug. ***

Fixed in master.

*** Bug 39521 has been marked as a duplicate of this bug. ***

*** Bug 42149 has been marked as a duplicate of this bug. ***

It appears the the fix works only with (as of now not yet released) Qt-4.8 . This needs to be discussed on the devel list. I'll attach a backport of the Qt-4.8 change.

Created attachment 53777
qt4 patch

Created attachment 54150
"Allow using QPixmap outside GUI thread when using raster"

I also had to apply the attached patch on the QT 4.7.4 to solve a similar problem (https://qa.mandriva.com/show_bug.cgi?id=64792).

My previous comment is not valid, was testing it without having the lo-kde4
package installed. Both patches were not effective to solve the bug (LO 3.4.3 + QT 4.7.4 + KDE 4.6.5), but the only way to fix the problem by now was to force returning true in the qt_pixmap_thread_test function in qpixmap.cpp.

Created attachment 54194
libreoffice 3.4.3 fix to start xinitthread, makes qpixmap happy as it uses xlib thread safe access

For LO 3.4.3 the attached patch is also needed (https://bugs.freedesktop.org/attachment.cgi?id=54194). That was gathered from 3.4.4, and the proposed change from QT 4.8 (https://bugs.freedesktop.org/attachment.cgi?id=54150) is required in QT 4.7.4. Thus, tested with (LO 3.4.3 +
QT 4.7.4 + KDE 4.6.5) and the similar problem (https://qa.mandriva.com/show_bug.cgi?id=64792) is solved.

Sorry for any inconvenience by reporting this in a closed bug, but that could be useful for who is interested on running LO 3.4.3 with QT 4.7.x.

*** Bug 43267 has been marked as a duplicate of this bug. ***

*** Bug 43772 has been marked as a duplicate of this bug. ***

*** Bug 43833 has been marked as a duplicate of this bug. ***

*** Bug 42604 has been marked as a duplicate of this bug. ***

*** Bug 43907 has been marked as a duplicate of this bug. ***

*** Bug 43411 has been marked as a duplicate of this bug. ***

Jonathan Riddell (jr) wrote :

I'll upload a SRU of this when I've worked out what the state of the libreoffice patch is

Jonathan Riddell (jr) wrote :

Mandriva have a bug too with a nice summary https://qa.mandriva.com/show_bug.cgi?id=64792

Changed in qt:
importance: Unknown → Medium
status: Unknown → Fix Released

The attachment "qt4-x11_4.7.4-0ubuntu9.debdiff" of this bug report has been identified as being a patch in the form of a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-sponsors team please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch
summary: - threading crashes in qt with kde theme
+ [Upstream] threading crashes in qt with kde theme
Changed in libreoffice (Ubuntu):
assignee: nobody → Björn Michaelsen (bjoern-michaelsen)
Jonathan Riddell (jr) on 2012-01-10
description: updated
Jonathan Riddell (jr) wrote :

Uploaded to oneiric-proposed with debdiff from comment #1.

precise does not need it, qt 4.8 will be uploaded shortly

Jonathan Riddell (jr) on 2012-01-10
Changed in libreoffice (Ubuntu):
status: New → Fix Released

Hello Jonathan, or anyone else affected,

Accepted qt4-x11 into oneiric-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

no longer affects: libreoffice (Ubuntu Oneiric)
Changed in qt4-x11 (Ubuntu Oneiric):
status: New → Fix Committed
tags: added: verification-needed
Scott Kitterman (kitterman) wrote :

I tried replicating the problem with the ods file from the FDO bug and couldn't replicate it, so I think this is fixed. Seems to work fine with other Qt apps as well.

tags: added: verification-done
removed: verification-needed
Martin Pitt (pitti) wrote :

I checked that the current precise version has this patch.

Changed in qt4-x11 (Ubuntu):
status: New → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package qt4-x11 - 4:4.7.4-0ubuntu8.1

---------------
qt4-x11 (4:4.7.4-0ubuntu8.1) oneiric-proposed; urgency=low

  * Fixes LP: #914033, threading crashes in Libreoffice using KDE theme
  * Add kubuntu_30_xlib_calls_threadsafe.diff
   - let Qt call XInitThreads(), so that it knows it's been called
     Otherwise QPixmap complains when used outside of the main Qt
     thread and resets itself to null pixmap, eventually leading to
     crashes.
 -- Jonathan Riddell <email address hidden> Mon, 09 Jan 2012 13:58:07 +0000

Changed in qt4-x11 (Ubuntu Oneiric):
status: Fix Committed → Fix Released

Can someone please add target information?

Has this been fixed for Qt 4.7? I am still able to reproduce the crash with LibreOffice 3.5.2.2 + KDE 4.6.0 + Qt 4.7.1

There's no target information, because this can be fixed only in Qt. You need either Qt4.8 or the patch.

Changed in libreoffice (Mandriva):
importance: Unknown → Medium
status: Unknown → Fix Released

Hi,

I can reproduce this bug on Gentoo, app-office/libreoffice-4.1.0.1, kde-meta-4.8.4-r4, dev-qt/qtcore-4.8.4-r4. Can be worked around with OOO_FORCE_DESKTOP=gnome (which will of course lost KDE integration). Should I file a new bug report?

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.