Issue 97570 - Insert a file with Object document and Undo twice crashes Writer
Summary: Insert a file with Object document and Undo twice crashes Writer
Status: CLOSED FIXED
Alias: None
Product: Writer
Classification: Application
Component: code (show other issues)
Version: DEV300m37
Hardware: All All
: P2 Trivial (vote)
Target Milestone: ---
Assignee: michael.ruess
QA Contact: issues@sw
URL:
Keywords:
: 97574 (view as issue list)
Depends on:
Blocks: 84292
  Show dependency tree
 
Reported: 2008-12-25 05:29 UTC by amy2008
Modified: 2013-08-07 14:44 UTC (History)
3 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 amy2008 2008-12-25 05:29:44 UTC
Can reproduce it with DEV300m37 on WinXP and Fedora

How to reproduce it 
1 Open a new Writer document
2 Insert - Object - OLE Object, OLE Object appears, OK
3 File - Save As, save this doucment as test1.doc and close it
4 Open another new Writer document, Table - Insert - Table, OK
5 Set cursor below the inserted table, Insert - File, select test1.doc and click
  'Insert' button
6 Undo firstly
7 Undo secondly

Result
After step 6, inserted file changes a little, but the nested Object still there.
After step 7, OOo crashes

Expectation
OOo works well

Regards 
Li Meiying
Comment 1 michael.ruess 2009-01-05 14:11:08 UTC
It is essential, that the document containing the OLE object is saved in MS Word
.doc format. Then it will lead to the crash in Undo as described above.
Comment 2 michael.ruess 2009-01-05 14:15:02 UTC
*** Issue 97574 has been marked as a duplicate of this issue. ***
Comment 3 Mathias_Bauer 2009-02-02 13:51:39 UTC
Michael, please take over
Comment 4 mst.ooo 2009-10-06 14:58:22 UTC
retarget
Comment 5 mst.ooo 2009-11-03 15:07:21 UTC
the problem is caused if the inserted file contains a frame that is anchored AT
character.

it is not necessary that the file is in WW8 format; because WW8 cannot store
anchor type at paragraph, the frame is stored with anchor AT character on WW8
export.

in SwReader::Read there is some special code to create Undo objects for inserted
frames with anchors at page or at paragraph.

there is no special code for frames AT character, so these survive the Undo of
the file insertion.
if this happens, the node offsets in previous Undo objects are wrong, and thus
further Undo steps likely crash.
Comment 6 mst.ooo 2009-11-04 13:05:41 UTC
fixed in CWS sw33bf01.

http://hg.services.openoffice.org/hg/cws/sw33bf01/rev/4bc8a0d61c14
Comment 7 mst.ooo 2009-11-12 10:40:16 UTC
please verify
Comment 8 michael.ruess 2009-11-12 14:22:18 UTC
Verified fix in CWS sw33bf01.
Comment 9 michael.ruess 2010-01-14 13:06:09 UTC
Checked fix in DEV300m68.