Issue 120172 - [Crash]After undo delete text box with animation assgined, edit the textbox will cause a crash.
Summary: [Crash]After undo delete text box with animation assgined, edit the textbox w...
Status: CLOSED FIXED
Alias: None
Product: Impress
Classification: Application
Component: editing (show other issues)
Version: 3.4.0
Hardware: All All
: P3 Major (vote)
Target Milestone: 3.4.1
Assignee: Andre
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-03 09:29 UTC by Shan Zhu
Modified: 2012-07-25 09:08 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---
jsc: 3.4.1_release_blocker+


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Shan Zhu 2012-07-03 09:29:55 UTC
build info: AOO3.4.1_r135

Steps:
1. Create a file in Presentaion.
2. Create a new slide.
3. Input some text in outline text box.
4. Insert a shape, right click it -> Custom Animation, assign an animation to it.
5. Select the outline text box, assign an animation to it, press Delete to delete the outline text box.
6. Press Ctrl+Z to undo the deleting.

Issue:
You can see the shape will be lost.
Then, do any operation on text box will cause a crash. For instance, drag&drop to move/resize the text box; input content and click a blank place...
Comment 1 Yan Ji 2012-07-03 09:32:08 UTC
Reproduced in AOO 3.4.1 dev snapshot build
Comment 2 Andre 2012-07-12 08:50:33 UTC
Taking over.
Comment 3 Andre 2012-07-13 07:29:33 UTC
The root of the crash lies in DrawView::DeleteMarked():

- The shape that is being deleted has its origin in a PresObj, a template shape that displays the text "Click to add text"

- When that shape is deleted then internally it is replaced by a new PresObj.  Therefore the first operation in the delete is an insert.

- PresObjs are inserted by default at the end of the shape list of a page.  An undo object is generated automatically for this.

- After the PresObj has been created DrawView::DeleteMarked() calls SetObjectOrdNum at the page to move the PresObj to the right position (from index 3 to index 1 in the scenario described above (four shapes)).  This operation is not recorded by an undo operation.

- When later the deletion of the text object is reversed via undo, the wrong indices are used to delete/insert objects.  As a result dead objects are kept in the list.  Accessing them afterwards leads to the crash.
Comment 4 SVN Robot 2012-07-13 08:33:03 UTC
"af" committed SVN revision 1361092 into trunk:
#i120172# Add missing undo action for changing index of new PresObj.
Comment 5 Andre 2012-07-13 08:33:57 UTC
Fixed by adding an undo action for changing the index of the new PresObj.
Comment 6 jsc 2012-07-13 09:41:18 UTC
set release blocker flag to 3.4.1
Comment 7 Andre 2012-07-13 09:55:18 UTC
Merged fix into 3.4.1 branch.
Comment 8 Andre 2012-07-13 09:56:18 UTC
SVN revision on the AOO34 branch is 1361131.
Comment 9 SVN Robot 2012-07-13 10:06:37 UTC
"af" committed SVN revision 1361131 into branches/AOO34:
#i120172# Add missing undo action for changing index of new PresObj.
Comment 10 Li Feng Wang 2012-07-20 09:00:02 UTC
Verify pass on AOO trunk 1362376.
Comment 11 Li Feng Wang 2012-07-25 06:44:46 UTC
Verify pass on AOO341 branch r1364591.
Comment 12 jsc 2012-07-25 09:08:40 UTC
set target milestone AOO 3.4.1