[Libreoffice] [REVIEW 3.4] Crash in wizards

Jan Holesovsky kendy at suse.cz
Fri Jun 3 06:13:44 PDT 2011


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


More information about the LibreOffice mailing list