Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


Hi Caolan, all,

https://bugs.freedesktop.org/show_bug.cgi?id=36306

In Writer:

- open "File/Wizards/Letter"
- select "Formal Personal letter" radio button
- press "Finish" button

Boom!

This seems to be unrelated to the original report; what I see here is an
infinite recursion that of course ends at some stage - with a SIGSEGV:

#52 0x00007fffe07c2541 in SwGrfNode::LinkStubSwapGraphic
(pThis=0x2348dd0, pCaller=0x2348e78)

at /local/libreoffice/libreoffice-3-4/sw/source/core/graphic/ndgrf.cxx:938
#53 0x00007ffff4804e06 in Link::Call (this=0x2351620, pCaller=0x2348e78)

at /local/libreoffice/libreoffice-3-4/solver/340/unxlngx6.pro/inc/tools/link.hxx:140
#54 0x00007ffff4a4c23b in GraphicObject::GetSwapStream (this=0x2348e78)

at /local/libreoffice/libreoffice-3-4/svtools/source/graphic/grfmgr.cxx:409
#55 0x00007ffff4a4e0fd in GraphicObject::ImplAutoSwapIn (this=0x2348e78)

at /local/libreoffice/libreoffice-3-4/svtools/source/graphic/grfmgr.cxx:222
#56 0x00007ffff4a4e383 in GraphicObject::GetGraphic (this=0x2348e78)

at /local/libreoffice/libreoffice-3-4/svtools/source/graphic/grfmgr.cxx:788
#57 0x00007fffe07c01bd in SwGrfNode::_GetStreamForEmbedGrf
(this=0x2348dd0, _refPics=..., _aStrmName=...)

at /local/libreoffice/libreoffice-3-4/sw/source/core/graphic/ndgrf.cxx:809
#58 0x00007fffe07c237e in SwGrfNode::SwapGraphic (this=0x2348dd0,
pGrfObj=0x2348e78)

at /local/libreoffice/libreoffice-3-4/sw/source/core/graphic/ndgrf.cxx:978
#59 0x00007fffe07c2541 in SwGrfNode::LinkStubSwapGraphic
(pThis=0x2348dd0, pCaller=0x2348e78)

at /local/libreoffice/libreoffice-3-4/sw/source/core/graphic/ndgrf.cxx:938
#60 0x00007ffff4804e06 in Link::Call (this=0x2351620, pCaller=0x2348e78)

at /local/libreoffice/libreoffice-3-4/solver/340/unxlngx6.pro/inc/tools/link.hxx:140

etc.

The attached patch fixes that for me; it seems to me pointless to
construct the aGraphic object, just to ask its type, and throw it away,
but obviously GetGrfObj() has side-effects [at least the recursion ;-)].
I believe none of the side-effects are needed here, but would be great
to double-check.

Thank you,
Kendy
From 77c3ef6315304f665e638c26355a3695a5fbf5c9 Mon Sep 17 00:00:00 2001
From: Jan Holesovsky <kendy@suse.cz>
Date: Fri, 3 Jun 2011 14:35:38 +0200
Subject: [PATCH] Fix one of the crashes in wizards - fdo#36306

This fixes the following problem:

- open "File/Wizards/Letter"
- select "Formal Personal letter" radio button
- press "Finish" button
---
 sw/source/core/graphic/ndgrf.cxx |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/sw/source/core/graphic/ndgrf.cxx b/sw/source/core/graphic/ndgrf.cxx
index 6bcbec2..0a11a93 100644
--- a/sw/source/core/graphic/ndgrf.cxx
+++ b/sw/source/core/graphic/ndgrf.cxx
@@ -806,8 +806,7 @@ SvStream* SwGrfNode::_GetStreamForEmbedGrf(
         {
             xub_StrLen nExtPos = _aStrmName.Search( '.' );
             String aExtStr = _aStrmName.Copy( nExtPos );
-            Graphic aGraphic( GetGrfObj().GetGraphic() );
-            if ( aGraphic.GetType() != GRAPHIC_NONE )
+            if ( GetGrfObj().GetType() != GRAPHIC_NONE )
             {
                 _aStrmName = String( GetGrfObj().GetUniqueID(), RTL_TEXTENCODING_ASCII_US );
                 _aStrmName += aExtStr;
-- 
1.7.4.1


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.