Issue 71598 - loop opening document with many objects anchored to a character
Summary: loop opening document with many objects anchored to a character
Status: CLOSED FIXED
Alias: None
Product: Writer
Classification: Application
Component: open-import (show other issues)
Version: OOo 2.0.4
Hardware: PC Windows XP
: P2 Trivial (vote)
Target Milestone: ---
Assignee: michael.ruess
QA Contact: issues@sw
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-11-16 01:52 UTC by jpannequin
Modified: 2013-08-07 14:42 UTC (History)
1 user (show)

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


Attachments
XML structure of bad document. (20.35 KB, image/png)
2006-11-16 01:53 UTC, jpannequin
no flags Details
XML structure of bad document. Zoom in. (125.14 KB, image/png)
2006-11-16 01:54 UTC, jpannequin
no flags Details
Minimal document => CRASH (12.78 KB, application/vnd.oasis.opendocument.text)
2006-11-16 01:54 UTC, jpannequin
no flags Details
Minimal document => NO CRASH (12.75 KB, application/vnd.oasis.opendocument.text)
2006-11-16 01:55 UTC, jpannequin
no flags Details
All Documents described in the bug report : with different tests, CRASH and NO CRASH (165.51 KB, application/x-compressed)
2006-11-16 01:57 UTC, jpannequin
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description jpannequin 2006-11-16 01:52:43 UTC
Crashed in OpenOffice.org 2.1 OOE680_m2 Developer Snapshot 

I am working on a document with many small frames(here : more than 600), each
are anchored to a character. 
Very quick summary :
Doc1 crashes. Doc2 does not crash. Diff of the content.xml :
[root@localhost ~]# diff content1.xml content2.xml
127,133d126
<           <draw:frame text:anchor-type="char" draw:z-index="54"
draw:style-name="gr3" svg:width="0.983cm" svg:height="0.426cm" svg:x="-0.275cm"
svg:y="-0.035cm">
<             <draw:text-box>
<               <text:p>
<                 <text:span text:style-name="T2">disciple</text:span>
<               </text:p>
<             </draw:text-box>
<           </draw:frame>

Context : This bug is linked to the bug #71596. About the other bug : Saving a
document with many frames anchored to a character goes wrong. The frames are not
anchored to the paragraph.
Testing shows that the crash is linked to the frames.

Description : Following to a big crash of OOW, I tried to reopen Doc3 (saved by
me) and Doc4 (autosave a few minutes later). OOW crashed while opening both
files (at the very last stage, when the bottom progress bar is full). The CPU
was 100 % busy by soffice.bin. So this is another crash.
I tried opening the file many times on my PC (Windows XP), with no luck. I tried
opening the file many times on another PC with Windows XP and OpenOffice 2.0,
with no luck as well.  (I am not sure if this is interesting : I even tried to
open it with AbiWord, it crashed as well).


XML Debugging :
I tried to debug the .odt file, looking at content.xml. Here are my findings :

I opened a new document, and replaced content.xml of the new document with the
one of the buggy document. => CRASH.

I then started with a new content.xml adding step by step the elements of the
buggy documents. The attached image (Bug OpenOffice 2 - Frame Crash 1) shows
that there was NO CRASH when adding only the first 4 elements located in the
<office:text> element (Doc5). So the problem lies in the <text:section> element.

When adding the <text:section> element and, in that element, only the first
element <text:p text:stylename="P4"> => CRASH (Doc6)

So let’s zoom in that element, see attached image (Bug OpenOffice 2 - Frame
Crash 2).
If I only remove the DF3 element (the last draw:frame) the document does not
crash anymore. (Doc7)
If I keep DF3 and remove DF2 the document does not crash anymore. (Doc8)
If I keep DF3, DF2, DF1 and remove the rest of the elements draw:frame, it bugs.
(Doc9)

So I then created the minimal buggy file that crashes Doc1 and the associated
non-buggy file Doc2.

END OF THE STORY.


Thanks for the help and the work done on OpenOffice.

PS:
I may help in developing a correction, because it is really annoying me.

Just a quick info, what do you use for a Development Tool / Debugger (with a
real step-by-step run, not the XML step-by-step described above), Eclipse Visual
C++ ? Would you have a link to a Quick Howto to get started with the tool and
Openoffice dev ?
Comment 1 jpannequin 2006-11-16 01:53:33 UTC
Created attachment 40611 [details]
XML structure of bad document.
Comment 2 jpannequin 2006-11-16 01:54:00 UTC
Created attachment 40612 [details]
XML structure of bad document. Zoom in.
Comment 3 jpannequin 2006-11-16 01:54:43 UTC
Created attachment 40613 [details]
Minimal document => CRASH
Comment 4 jpannequin 2006-11-16 01:55:13 UTC
Created attachment 40614 [details]
Minimal document => NO CRASH
Comment 5 jpannequin 2006-11-16 01:57:01 UTC
Created attachment 40615 [details]
All Documents described in the bug report : with different tests, CRASH and NO CRASH
Comment 6 michael.ruess 2006-11-16 09:22:19 UTC
MRU->OD: pls have a look. The attached document marked with "=> CRASH" will lead
to a loop. Unfortunately this does no seem to be the same as issue 71065 (loop
in two-column section) though this document here looks quite similar.
Comment 7 jpannequin 2006-11-18 11:34:02 UTC
Reproduced on Ubuntu 6.10 OpenOffice 2.0
Comment 8 frank.meies 2007-09-05 08:53:36 UTC
Loop does not occur anymore due to the implementation of some general loop
controls in the Writer layout engine, see issue 81146.
Comment 9 frank.meies 2007-09-10 13:38:23 UTC
fme->mru: Ready for QA.
Comment 10 michael.ruess 2007-09-17 13:23:09 UTC
Verified in CWS loopcontrol.
Comment 11 michael.ruess 2007-11-05 15:39:23 UTC
Checked fix in OO 2.4 dev build 680m235.