[libreoffice] Resolves: rhbz#799628 crash with chewing IM with g3g

Caolán McNamara caolanm at fedoraproject.org
Tue Mar 6 11:43:38 UTC 2012


commit a67f28e79d9585adc950930e4fb89289b99dfd54
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Mar 6 11:43:34 2012 +0000

    Resolves: rhbz#799628 crash with chewing IM with g3g

 ...hbz-799628-crash-with-chewing-IM-with-g3g.patch |   32 +++++++++
 0001-silence-SolarMutex-not-locked-spew.patch      |   68 ++++++++++++++++++++
 libreoffice.spec                                   |    9 ++-
 3 files changed, 108 insertions(+), 1 deletions(-)
---
diff --git a/0001-Related-rhbz-799628-crash-with-chewing-IM-with-g3g.patch b/0001-Related-rhbz-799628-crash-with-chewing-IM-with-g3g.patch
new file mode 100644
index 0000000..7a82101
--- /dev/null
+++ b/0001-Related-rhbz-799628-crash-with-chewing-IM-with-g3g.patch
@@ -0,0 +1,32 @@
+From 7e3ebe35a6a1a69b3a36f7eb41e1ec5c5905f714 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm at redhat.com>
+Date: Mon, 5 Mar 2012 21:02:45 +0000
+Subject: [PATCH] Related: rhbz#799628 crash with chewing-IM with g3g
+
+---
+ vcl/unx/gtk/window/gtkframe.cxx |    8 +++++++-
+ 1 files changed, 7 insertions(+), 1 deletions(-)
+
+diff --git a/vcl/unx/gtk/window/gtkframe.cxx b/vcl/unx/gtk/window/gtkframe.cxx
+index 112e066..1cd1bd0 100644
+--- a/vcl/unx/gtk/window/gtkframe.cxx
++++ b/vcl/unx/gtk/window/gtkframe.cxx
+@@ -3984,8 +3984,14 @@ void GtkSalFrame::IMHandler::signalIMPreeditChanged( GtkIMContext*, gpointer im_
+         g_slist_free (attr_list);
+ 
+         // Set the sal attributes on our text
+-        for (int i = start; i < end; i++)
++        for (int i = start; i < end; ++i)
++        {
++            SAL_WARN_IF(i >= static_cast<int>(pThis->m_aInputFlags.size()),
++                "vcl.gtk", "pango attrib out of range?");
++            if (i >= static_cast<int>(pThis->m_aInputFlags.size()))
++                continue;
+             pThis->m_aInputFlags[i] |= sal_attr;
++        }
+     } while (pango_attr_iterator_next (iter));
+ 
+     pThis->m_aInputEvent.mpTextAttr         = &pThis->m_aInputFlags[0];
+-- 
+1.7.7.6
+
diff --git a/0001-silence-SolarMutex-not-locked-spew.patch b/0001-silence-SolarMutex-not-locked-spew.patch
new file mode 100644
index 0000000..8893ea2
--- /dev/null
+++ b/0001-silence-SolarMutex-not-locked-spew.patch
@@ -0,0 +1,68 @@
+From f9a4af41ca574760dbd22c8207661fabb6823e3b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm at redhat.com>
+Date: Tue, 6 Mar 2012 09:45:08 +0000
+Subject: [PATCH] silence SolarMutex not locked spew
+
+---
+ sw/source/core/txtnode/fntcache.cxx |    2 ++
+ sw/source/core/view/viewsh.cxx      |    2 ++
+ vcl/unx/gtk/window/gtkframe.cxx     |    3 +++
+ 3 files changed, 7 insertions(+), 0 deletions(-)
+
+diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx
+index 2ec7fb9..4ddeb3d 100644
+--- a/sw/source/core/txtnode/fntcache.cxx
++++ b/sw/source/core/txtnode/fntcache.cxx
+@@ -382,6 +382,8 @@ sal_uInt16 SwFntObj::GetFontLeading( const ViewShell *pSh, const OutputDevice& r
+     {
+         if ( USHRT_MAX == nGuessedLeading || USHRT_MAX == nExtLeading )
+         {
++            SolarMutexGuard aGuard;
++
+             const Font aOldFnt( rOut.GetFont() );
+             ((OutputDevice&)rOut).SetFont( *pPrtFont );
+             const FontMetric aMet( rOut.GetFontMetric() );
+diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
+index 0413382..774000c 100644
+--- a/sw/source/core/view/viewsh.cxx
++++ b/sw/source/core/view/viewsh.cxx
+@@ -253,6 +253,8 @@ void ViewShell::ImplEndAction( const sal_Bool bIdleEnd )
+     {
+         if ( !nLockPaint )
+         {
++            SolarMutexGuard aGuard;
++
+             sal_Bool bPaintsFromSystem = aInvalidRect.HasArea();
+             GetWin()->Update();
+             if ( aInvalidRect.HasArea() )
+diff --git a/vcl/unx/gtk/window/gtkframe.cxx b/vcl/unx/gtk/window/gtkframe.cxx
+index 24336ce..a2e6df8 100644
+--- a/vcl/unx/gtk/window/gtkframe.cxx
++++ b/vcl/unx/gtk/window/gtkframe.cxx
+@@ -3835,6 +3835,7 @@ void GtkSalFrame::IMHandler::signalIMCommit( GtkIMContext* CONTEXT_ARG, gchar* p
+ {
+     GtkSalFrame::IMHandler* pThis = (GtkSalFrame::IMHandler*)im_handler;
+ 
++    SolarMutexGuard aGuard;
+     vcl::DeletionListener aDel( pThis->m_pFrame );
+     // open a block that will end the GTK_YIELD_GRAB before calling preedit changed again
+     {
+@@ -4003,6 +4004,7 @@ void GtkSalFrame::IMHandler::signalIMPreeditChanged( GtkIMContext*, gpointer im_
+ 
+     GTK_YIELD_GRAB();
+ 
++    SolarMutexGuard aGuard;
+     vcl::DeletionListener aDel( pThis->m_pFrame );
+ 
+     pThis->m_pFrame->CallCallback( SALEVENT_EXTTEXTINPUT, (void*)&pThis->m_aInputEvent);
+@@ -4023,6 +4025,7 @@ void GtkSalFrame::IMHandler::signalIMPreeditEnd( GtkIMContext*, gpointer im_hand
+ 
+     pThis->m_bPreeditJustChanged = true;
+ 
++    SolarMutexGuard aGuard;
+     vcl::DeletionListener aDel( pThis->m_pFrame );
+     pThis->doCallEndExtTextInput();
+     if( ! aDel.isDeleted() )
+-- 
+1.7.7.6
+
diff --git a/libreoffice.spec b/libreoffice.spec
index 4cf21c6..a6b9e59 100644
--- a/libreoffice.spec
+++ b/libreoffice.spec
@@ -35,7 +35,7 @@ Summary:        Free Software Productivity Suite
 Name:           libreoffice
 Epoch:          1
 Version:        %{libo_version}.1
-Release:        2%{?dist}
+Release:        3%{?dist}
 License:        (MPLv1.1 or LGPLv3+) and LGPLv3 and LGPLv2+ and BSD and (MPLv1.1 or GPLv2 or LGPLv2 or Netscape) and Public Domain and ASL 2.0 and Artistic
 Group:          Applications/Productivity
 URL:            http://www.documentfoundation.org/develop
@@ -130,6 +130,8 @@ Patch16: 0001-make-hsqldb-build-with-java-1.7.patch
 Patch17: libreoffice-ensure-non-broken-xml-tree.patch
 Patch18: 0001-preserve-timestamps-for-.py-files.patch
 Patch19: 0001-Resolves-rhbz-788045-swriter-help-etc-doesn-t-show-h.patch
+Patch20: 0001-Related-rhbz-799628-crash-with-chewing-IM-with-g3g.patch
+Patch21: 0001-silence-SolarMutex-not-locked-spew.patch
 
 %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
 %define instdir %{_libdir}
@@ -970,6 +972,8 @@ mv -f redhat.soc extras/source/palettes/standard.soc
 %patch17 -p1 -b .ensure-non-broken-xml-tree.patch
 %patch18 -p1 -b .preserve-timestamps-for-.py-files.patch
 %patch19 -p1 -b .rhbz788045-swriter-help-etc-doesn-t-show-h.patch
+%patch20 -p1 -b .rhbz-799628-crash-with-chewing-IM-with-g3g.patch
+%patch21 -p1 -b .silence-SolarMutex-not-locked-spew.patch
 
 # TODO: check this
 # these are horribly incomplete--empty translations and copied english
@@ -2248,6 +2252,9 @@ update-desktop-database %{_datadir}/applications &> /dev/null || :
 %endif
 
 %changelog
+* Tue Mar 06 2012 Caolán McNamara <caolanm at redhat.com> - 3.5.1.1-3
+- Resolves: rhbz#799628 crash with chewing IM with g3g
+
 * Wed Feb 29 2012 Caolán McNamara <caolanm at redhat.com> - 3.5.1.1-2
 - Resolves: rhbz#788045 swriter --help doesn't show help
 - Resolves: rhbz#798667 missing .desktop icons


More information about the scm-commits mailing list