Issue 15712 - Loop when creating Master document from existing document
Summary: Loop when creating Master document from existing document
Status: CLOSED FIXED
Alias: None
Product: Writer
Classification: Application
Component: ui (show other issues)
Version: OOo 1.1 Beta
Hardware: PC Windows 2000
: P2 Trivial (vote)
Target Milestone: ---
Assignee: eric.savary
QA Contact: issues@sw
URL:
Keywords: oooqa
: 13193 (view as issue list)
Depends on:
Blocks:
 
Reported: 2003-06-17 10:02 UTC by aspsaegesser
Modified: 2013-08-07 14:43 UTC (History)
2 users (show)

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


Attachments
File to produce the hanging in Master Docu creation (31.08 KB, application/octet-stream)
2003-06-17 10:07 UTC, aspsaegesser
no flags Details
a smaller document exhibiting the same problem (5.46 KB, application/octet-stream)
2003-07-09 18:30 UTC, openoffice
no flags Details
Error messages produced while trying to generate master doc (16.30 KB, application/octet-stream)
2003-07-11 08:48 UTC, aspsaegesser
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description aspsaegesser 2003-06-17 10:02:17 UTC
I've got a document with about 50 pages and 11 chapters (Heading 1). I want to 
convert it into a Master document: File --> send --> Create Master Document.

All the sub-documents are created correctly, but the master document is not. 
Actually the file is there, but empty - and OpenOffice.org hangs. Deadlock. No 
recovery, even after a long time.
I had seen the problem already in version 1.01. Is there anything one can do the 
wrong way?
The hanging also occurs with an empty document, i.e. a new doc just existing of 
the underlying template. I attach such a file.

Thanks and best regards
Walter
Comment 1 aspsaegesser 2003-06-17 10:07:17 UTC
Created attachment 6935 [details]
File to produce the hanging in Master Docu creation
Comment 2 andreschnabel 2003-07-06 16:28:39 UTC
I can confirm this on WinXP, OOo 1.0.3 and 1.1beta2.
OpenDocument, send to global doc:
The subdocuments are created, but some of them with 0 size!
after that OOo hangs.
Comment 3 andreschnabel 2003-07-06 16:31:07 UTC
Lowering Prio to 2:  freezes in Basic functionality 
Comment 4 h.ilter 2003-07-07 10:44:43 UTC
Reassigned to ES
Comment 5 eric.savary 2003-07-08 15:44:06 UTC
ES->AMA: I can reproduce it in a 645m10. But I can't evaluate the dum
file (See report mail on iBIS, id "rqzptn"). Pleasae dispatch accordingly.
Comment 6 eric.savary 2003-07-08 15:44:33 UTC
Reassigned to AMA
Comment 7 eric.savary 2003-07-09 13:20:14 UTC
ES->DVO: as discussed. It's ok first for RC.
Comment 8 openoffice 2003-07-09 17:57:42 UTC
The problem apparently occurs whenever the only thing in a chapter
(i.e. between to 'heading 1') ss an index (or section?).

Work-around: include an empty paragraph behind the index.
Comment 9 openoffice 2003-07-09 18:16:46 UTC
dvo: Changed target to OOo 2.0.
Reason for the reassignment is that the planned release for 1.1 is
really soon now, so we're trying to minimize changes made to the code
base. Since there's a rather simple work-around (add an empty
paragraph after the indices) and since I can't seem to come up with a
fix right away, I think this is tolerable.
I'll keep the issue, so I can fix it for 2.0 (or maybe some 1.1.1
release).
Comment 10 openoffice 2003-07-09 18:29:53 UTC
dvo: The problem appears to be in SwNodes::_MoveNodes(...),
sw/source/core/docnode/nodes.cxx#492. It's just that I can't make up
my mind on how to fix this...

At #523 there's a check whether the move range overlaps the start
position. That may be wrong, as the checks run against aIndex-1, and
maybe it should be aIndex. But I also don't understand why the method
hangs below. When the first SwEndNode is copied, the copy range is
changed to something odd, which might just as well be the problem.

Comment 11 openoffice 2003-07-09 18:30:47 UTC
Created attachment 7516 [details]
a smaller document exhibiting the same problem
Comment 12 aspsaegesser 2003-07-11 08:44:55 UTC
Thanks for all your investigations. I have tried out the work-around 
(adding an empty paragraph after any index). It works with my original 
attachment.
But there seem to be other bugs. Though it does not hang anymore with 
the doc I'm working on, it produces another bug and the masterdoc is 
not generated. Sorry. 
I attach the produced error message (in German).

Walter
Comment 13 aspsaegesser 2003-07-11 08:48:56 UTC
Created attachment 7575 [details]
Error messages produced while trying to generate master doc
Comment 14 stefan.baltzer 2003-07-11 10:12:04 UTC
SBA->DVO: As discussed, target changed to OOo 1.1.1
Comment 15 openoffice 2003-07-11 10:28:40 UTC
dvo->aspsaegesser: Walter, I've looked at the error messages.
Unfortunately, those messages are rather generic, so I can't determine
what could go wrong.

Either way, to things:
1) Are you sure that's a genuine OOo bug at all? Those messages
commonly result from rather generic problems such as disk full, no
write permission, etc.  Could be a real bug, of course, but please
double-check.
2) If you determine it is a genuine bug, please write a _new_ issue.
Since the buggy behavious is completely different (error message,
rather than hanging), it is almost certainly a completely different
cause, so we want it in a seperate task. One issue for different,
well, issues make handling cumbersome. Also make sure to supply a
suitable bugdoc with the new issue, so we can reproduce that bug as
well. Thanks.
Comment 16 andreschnabel 2003-07-11 11:00:16 UTC
asc->dvo: 
I can confirm, that there is something going wrong, even I try your
workaround. I'm able to export to global dok but cannot open the doc.
I'll file a new issue for later today.
Walter: I'll cc you to the new issue
Comment 17 andreschnabel 2003-07-18 20:13:20 UTC
filed a new issue 17083 for the crash - problem.
But this seems to be special for the file.
Comment 18 andreschnabel 2003-07-18 20:57:19 UTC
*** Issue 13193 has been marked as a duplicate of this issue. ***
Comment 19 openoffice 2003-10-22 13:59:29 UTC
dvo: Found & fixed. Finally. Fat fas a fnasty fissue.:-)

I committed the fix in docglbl.cxx for CWS sw7pp1b, which should be
integrated into OOo 1.1.1.

The actual problem turned out that there is some special case
treatment for text sections which overlap the header 'sections' that
will be used for creating the global document. (docglbl.cxx#496) Said
special treatment failed to work if such a section was fully enclosed
in a header 'section'. The fix simply disables the treatment for these
cases.

My earlier analysis points to some other weirdness that is not
directly related to this bug. There appear to be a lot of those in
that rather untidy section of code, but I chose not to touch them as
they mostly seem to work as of now.
Comment 20 openoffice 2003-10-30 17:35:23 UTC
dvo->es: Please test.
Comment 21 eric.savary 2003-11-03 13:18:36 UTC
FIXED
Comment 22 eric.savary 2003-11-03 13:19:32 UTC
ES: verified in sw7pp1b,
Comment 23 h.ilter 2004-01-28 14:25:19 UTC
Verified with integrated 645m27s1-1_8738 = ok