Issue 116193

Summary: [WW8] bookmark export loops
Product: Writer Reporter: mst.ooo
Component: save-exportAssignee: michael.ruess
Status: CLOSED FIXED QA Contact: issues@sw <issues>
Severity: Trivial    
Priority: P2 CC: bjoern.michaelsen, issues, openoffice, vmiklos
Version: DEV300m95   
Target Milestone: 3.4.0   
Hardware: All   
OS: All   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---
Attachments:
Description Flags
workaround none

Description mst.ooo 2010-12-21 12:35:46 UTC
the sw complex test CheckBookmarks creates a document with many bookmarks
and stores it via the WW8 filter as DOC.

this goes into an infinite recursion in DEV300m95:
in wrtw8nds.cxx there is some current index into a text node,
and that apparently goes from 0 to 1 to 0 to 1...

seems to be caused by the interaction of the SwAttrIter and the bookmark export:
the SwAttrIter has a current position 2^16-1, and then is incremented again
(by calling NextPos()) to 0.
Comment 1 Miklos Vajna 2010-12-21 13:19:04 UTC
Hm, I thought ca790fbee1db by OS alraedy fixed this. Is the document reproducing
the issue public?
Comment 2 mst.ooo 2010-12-21 13:28:18 UTC
@vmiklos:
it looks like i have this revision in my version here, with this comment:
GetSortedBookmarks: don't insert bookmarks from different nodes

so it's a different problem :)

the document does not really exist, it is dynamically created by the
CheckBookmarks test.

you can run it by starting an OOo like this:
> DISPLAY=:5 ./soffice "-accept=pipe,name=$USER;urp;" -norestore

then cd into sw/qa/complex/writer and run the test:
> OOO_SUBSEQUENT_TESTS=t OOO_TEST_SOFFICE="connect:pipe,name=$USER" dmake

i have hacked up something that makes it not loop,
now i get lots of assertions instead;
i'll attach the patch...
(having no idea how this WW8 contraption works,
and hbrinkm already on vacation...)
Comment 3 mst.ooo 2010-12-21 13:29:13 UTC
Created attachment 75386 [details]
workaround
Comment 4 Oliver Specht 2010-12-28 11:55:14 UTC
The loop is fixed in cws os156 in 
sw/source/filter/ww8/wrtw8nds.cxx

There is still an error reported from the test:
1) checkBookmarks(complex.writer.CheckBookmarks)
java.lang.AssertionError:
expected:<336129041068093585184822036889681886625795355984> but was:<-5262733394391
167343036575832159781436>
Comment 5 Oliver Specht 2010-12-28 13:46:18 UTC
*** Issue 115908 has been marked as a duplicate of this issue. ***
Comment 6 mst.ooo 2011-01-04 13:38:14 UTC
@os:

IIRC with the workaround i got a successful run of the checkBookmarks
(but that was of course before vacation...).

if your fix gets an assertion, then i'm afraid probably the fix is wrong?
Comment 7 mst.ooo 2011-01-11 13:55:36 UTC
some investigation reveals:
the CheckBookmarks test does run with the fix by os on linux.

the test fails also in a DEV300m90 build on windows.
it fails when checking the inserted paragraph breaks,
not on the WW8 file.
Comment 8 Oliver Specht 2011-02-04 08:04:45 UTC
test is running without error now
Comment 9 Miklos Vajna 2011-02-11 22:37:03 UTC
Oliver,

Hm, is os156 public? I don't see it listed at http://hg.services.openoffice.org/

Thanks,

Miklos (who was just curious about what was the fix)
Comment 10 mst.ooo 2011-02-12 17:50:42 UTC
@vmiklos:

that was a typo, the CWS is actually os146, not os156!

the changeset is this one:
http://hg.services.openoffice.org/cws/os146?cmd=changeset;node=9475b9d2a2dc
Comment 11 Miklos Vajna 2011-02-12 23:22:14 UTC
Oh, I see.

Thanks for the pointer!
Comment 12 michael.ruess 2011-02-28 10:23:27 UTC
Verified issue in CWS os146.