Issue 92304

Summary: Insert header, change and delete page style, crashes when undoing
Product: Writer Reporter: jian.li
Component: codeAssignee: Mathias_Bauer
Status: CLOSED FIXED QA Contact: issues@sw <issues>
Severity: Trivial    
Priority: P2 CC: issues, jdaniel.alvaro, liujiaxiang, nesshof, peter.junge
Version: OOo 2.4.1Keywords: crash
Target Milestone: 3.4.0   
Hardware: All   
OS: All   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---
Issue Depends on:    
Issue Blocks: 84291    

Description jian.li 2008-07-31 04:44:23 UTC
1.Craete a new writer document;
2.Insert-Header-Default, insert a header;
3.Press F11 to pop up "Styles and Formatting" dialog, and change to "Page 
Styles";
4.Right click, and click "New" to create a new style "Untitled1";
5.Double click style "Untitled1" to apply it;
6.Select style "Untitled1" and right click on it, and then "Delete" and 
Press "Yes";
7.Undo for 3 times;
Writer crashes.
Comment 1 michael.ruess 2008-07-31 08:05:54 UTC
MRU->AMA: follw the steps
- new document and insert a header,
- create new page style, apply in and afterwards delete it
- three times undo -> crash
Comment 2 andreas.martens 2009-01-19 10:32:32 UTC
Due to our workload and resources (development as well as QA) I've to retarget
this issue to OOo3.2.
Comment 3 Mathias_Bauer 2009-02-02 13:24:43 UTC
Björn, please take over
Comment 4 Mathias_Bauer 2009-02-02 13:31:54 UTC
.
Comment 5 siuraymond 2009-03-26 02:36:12 UTC
Bug is confirmed under Linux in version OOo 2.4.1.
Comment 6 siuraymond 2009-03-31 02:30:02 UTC
After follow-up testing, it seems that skipping step 2 results in a crash as well.
Comment 7 bjoern.michaelsen 2009-07-30 15:13:43 UTC
reproducable on DEV300_m50 on unxlngi6.pro
Comment 8 bjoern.michaelsen 2009-08-28 17:55:21 UTC
retargeting 3.3
Comment 9 bjoern.michaelsen 2010-08-18 14:05:43 UTC
root cause is that SwUndoPageDescCreate keeps a naked pointer to the created
SwPageDesc. As the SwPageDescs array becomes the owner of the SwPageDesc (being
free to delete it), that is broken by design. As a fix SwPageDescs needs to use
refcounting pointers (e.g. a ::std::vector< ::std::tr1::shared_ptr< SwPageDesc
>) so that the ownership of the PageDesc can be shared with the undo object.
Comment 10 bjoern.michaelsen 2010-08-20 18:01:34 UTC
started work in cws swbookmarkfixes01 => STARTED
retargeting to 3.4
Comment 11 hans_werner67 2011-02-03 12:08:42 UTC
pls. reassign or close issues.
Thx.
Comment 12 Martin Hollmichel 2011-05-02 12:54:44 UTC
so mark as resolved fixed.
Comment 13 DanielAlvaro 2013-02-19 22:20:39 UTC
Hello I checked it with AOO 3.4.1 and the bug was solved.