[Upstream] threading crashes in qt with kde theme

Bug #914033 reported by Jonathan Riddell
88
This bug affects 11 people
Affects Status Importance Assigned to Milestone
Qt
Fix Released
Medium
libreoffice (Mandriva)
Fix Released
Medium
libreoffice (Ubuntu)
Fix Released
Undecided
Björn Michaelsen
qt4-x11 (Ubuntu)
Fix Released
Undecided
Unassigned
Oneiric
Fix Released
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.

Revision history for this message
In , Jspam-k (jspam-k) wrote :

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.

Revision history for this message
In , Jspam-k (jspam-k) wrote :

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]

Revision history for this message
In , Jeffdchang (jeffdchang) wrote :

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

Revision history for this message
In , Tomáš Chvátal (scarabeus) wrote :

Still reproducable on current trunk.

Revision history for this message
In , L-lunak (l-lunak) wrote :

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

Revision history for this message
In , L-lunak (l-lunak) wrote :

Fixed in master.

Revision history for this message
In , Tomáš Chvátal (scarabeus) wrote :

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

Revision history for this message
In , L-lunak (l-lunak) wrote :

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

Revision history for this message
In , L-lunak (l-lunak) wrote :

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.

Revision history for this message
In , L-lunak (l-lunak) wrote :

Created attachment 53777
qt4 patch

Revision history for this message
In , Cabral (cabral) wrote :

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

Revision history for this message
In , Cabral (cabral) wrote :

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).

Revision history for this message
In , Cabral (cabral) wrote :

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.

Revision history for this message
In , Cabral (cabral) wrote :

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

Revision history for this message
In , Cabral (cabral) wrote :

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.

Revision history for this message
In , Dtardon (dtardon) wrote :

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

Revision history for this message
In , Dtardon (dtardon) wrote :

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

Revision history for this message
In , Dtardon (dtardon) wrote :

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

Revision history for this message
In , L-lunak (l-lunak) wrote :

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

Revision history for this message
In , Markus Mohrhard (moggi) wrote :

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

Revision history for this message
In , Markus Mohrhard (moggi) wrote :

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

Revision history for this message
Jonathan Riddell (jr) wrote :

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

Revision history for this message
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
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

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
penalvch (penalvch)
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)
description: updated
Revision history for this message
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)
Changed in libreoffice (Ubuntu):
status: New → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

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
Revision history for this message
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
Revision history for this message
Martin Pitt (pitti) wrote :

I checked that the current precise version has this patch.

Changed in qt4-x11 (Ubuntu):
status: New → Fix Released
Revision history for this message
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
Revision history for this message
In , Libreoffice-z (libreoffice-z) wrote :

Can someone please add target information?

Revision history for this message
In , Psychonaut (psychonaut) wrote :

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

Revision history for this message
In , L-lunak (l-lunak) wrote :

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
Revision history for this message
In , Ville Aakko (wildpenguin) wrote :

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?

Revision history for this message
In , chris (ign-christian) wrote :

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

Revision history for this message
In , Ville Aakko (wildpenguin) wrote :

Replying here as a reguestet by ign_christian in Bug 67011.

I can reproduce this on KDE 4.10.4 (I have mixed my KDE version with my QT version above - sorry), also qtcore has since been upgraded to 4.8.4-r5).

Also, I'm sorry about the duplicate in bug (In reply to comment #25). Howeveer, I'm not sure it should be marked as duplicate since 1) The bug 67011 happens on every spreadsheet, not just in certain circumstances 2) It's not a crash (per se) but a total hang (inresponsiveness) of the UI input (keyboard + mouse), and 3) There's no mention of KDE specificity in this bug report and 4) This bug is for a very old version of libreoffice compared to the version in bug 67011 (3.4.2 release vs. 4.1.0.2).

However, if you still feel it is a duplicate, it's OK of course. Maybe reopen? Or, I could try to upgrade to KDE 4.10.5 (it's a long compile and will take a while)?

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

Other bug subscribers

Remote bug watches

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