Issue 104148 - Anchor autoshape as whatever does crash OOo
Summary: Anchor autoshape as whatever does crash OOo
Status: CLOSED DUPLICATE of issue 102752
Alias: None
Product: Writer
Classification: Application
Component: code (show other issues)
Version: DEV300m54
Hardware: All All
: P2 Trivial (vote)
Target Milestone: ---
Assignee: writerneedsconfirm
QA Contact: issues@sw
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-11 10:44 UTC by eric.bachard
Modified: 2009-08-11 11:14 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description eric.bachard 2009-08-11 10:44:27 UTC
Crash verified on Mac OS X Intel ( 10.4) by me, and on Linux by JB Faure

Steps to reproduce :

1) Open a new Writer document
2) Insert whatever autoshape, e.g. a smiley 
3) Select the autoshape
4) Right click -> Anchor -> as Character  


* Expected:  shape anchored as character

* Current result : crash


Note: same for other cases (at page, .. )


After investigations, it seems that some properties of the new anchor are NULL or missing (probably 
page number, or index.

Code concerned :

(gdb) info b
Num Type           Disp Enb Address    What
1   breakpoint     keep y   0x3323104d in SwDoc::ChgAnchor(SdrMarkList const&, RndStdIds, unsigned 
char, unsigned char) at /Users/ericb/Desktop/DEV300_m54/sw/source/core/doc/docfly.cxx:600

The crash occurs around line 774 :

aNewAnch.SetAnchor( &aPos );       // Comment:  aPos contains : 

SetAttr( aNewAnch, *pContact->GetFmt() );    


The trace gives :

774                         aNewAnch.SetAnchor( &aPos );
(gdb) 
775                         SetAttr( aNewAnch, *pContact->GetFmt() );
(gdb) 
terminate called after throwing an instance of 'com::sun::star::uno::RuntimeException'

Program received signal SIGABRT, Aborted.
0x9003d66c in kill ()
(gdb) x 0x9003d66c
0x9003d66c <kill+12>:   0x00e80e73


And the stack :

(gdb) bt
#0  0x9003d66c in kill ()
#1  0x9010e8cf in raise ()
#2  0x9010d422 in abort ()
#3  0x90b4539c in __gnu_cxx::__verbose_terminate_handler ()
#4  0x90b43602 in __gxx_personality_v0 ()
#5  0x90b43640 in std::terminate ()
#6  0x90b43754 in __cxa_throw ()
#7  0x2bb431b3 in SdrObject::getShapePropertyChangeNotifier ()
#8  0x32ecd949 in SwDrawContact::Modify (this=0x279e9710, pOld=0xbfffa914, pNew=0xbfffa8fc) at 
/Users/ericb/Desktop/DEV300_m54/sw/source/core/draw/dcontact.cxx:1656
#9  0x32e425a4 in SwModify::Modify (this=0x25125000, pOldValue=0xbfffa914, 
pNewValue=0xbfffa8fc) at /Users/ericb/Desktop/DEV300_m54/sw/source/core/attr/calbck.cxx:244
#10 0x32e45223 in SwFmt::Modify (this=0x25125000, pOldValue=0xbfffa914, pNewValue=0xbfffa8fc) 
at /Users/ericb/Desktop/DEV300_m54/sw/source/core/attr/format.cxx:389
#11 0x32ee8663 in SwFrmFmt::Modify (this=0x25125000, pOld=0xbfffa914, pNew=0xbfffa8fc) at 
/Users/ericb/Desktop/DEV300_m54/sw/source/core/layout/atrfrm.cxx:2480
#12 0x32e4587d in SwFmt::SetFmtAttr (this=0x25125000, rSet=@0xbfffa9b8) at 
/Users/ericb/Desktop/DEV300_m54/sw/source/core/attr/format.cxx:530
#13 0x3303a0d8 in SwDoc::SetAttr (this=0x12917a00, rSet=@0xbfffa9b8, rFmt=@0x25125000) at 
/Users/ericb/Desktop/DEV300_m54/sw/source/core/doc/docfmt.cxx:1182
#14 0x3303a1df in SwDoc::SetAttr (this=0x12917a00, rAttr=@0xbfffab10, rFmt=@0x25125000) at 
/Users/ericb/Desktop/DEV300_m54/sw/source/core/doc/docfmt.cxx:1170
#15 0x330ae8b5 in SwDoc::ChgAnchor (this=0x12917a00, _rMrkList=@0x31e464c0, 
_eAnchorType=FLY_IN_CNTNT, _bSameOnly=0 '\0', _bPosCorr=1 '\001') at 
/Users/ericb/Desktop/DEV300_m54/sw/source/core/doc/docfly.cxx:775



BTW: the indentation in the code is awfull :/
Comment 1 eric.bachard 2009-08-11 10:48:31 UTC
Raising priority,because that's a crash
Comment 2 eric.savary 2009-08-11 10:56:03 UTC
duplicate 

*** This issue has been marked as a duplicate of 102752 ***
Comment 3 eric.savary 2009-08-11 10:56:19 UTC
closed
Comment 4 eric.bachard 2009-08-11 11:06:18 UTC
@es : thank you very much, and sorry for the dupe  
Comment 5 eric.savary 2009-08-11 11:14:05 UTC
Ya pas d'mal ! ;)