Apache OpenOffice (AOO) Bugzilla – Issue 15712
Loop when creating Master document from existing document
Last modified: 2013-08-07 14:43:45 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
Created attachment 6935 [details] File to produce the hanging in Master Docu creation
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.
Lowering Prio to 2: freezes in Basic functionality
Reassigned to ES
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.
Reassigned to AMA
ES->DVO: as discussed. It's ok first for RC.
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.
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).
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.
Created attachment 7516 [details] a smaller document exhibiting the same problem
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
Created attachment 7575 [details] Error messages produced while trying to generate master doc
SBA->DVO: As discussed, target changed to OOo 1.1.1
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.
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
filed a new issue 17083 for the crash - problem. But this seems to be special for the file.
*** Issue 13193 has been marked as a duplicate of this issue. ***
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.
dvo->es: Please test.
FIXED
ES: verified in sw7pp1b,
Verified with integrated 645m27s1-1_8738 = ok