Bug 40819 - WW8 roundtrip is broken for huge bookmark counts
Summary: WW8 roundtrip is broken for huge bookmark counts
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
(earliest affected)
Master old -3.6
Hardware: Other All
: medium normal
Assignee: Björn Michaelsen
Depends on:
Blocks: Dev-subsequenttest-failures
  Show dependency treegraph
Reported: 2011-09-13 00:52 UTC by Stephan Bergmann
Modified: 2011-12-24 04:27 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Note You need to log in before you can comment on or make changes to this bug.
Description Stephan Bergmann 2011-09-13 00:52:53 UTC
sw subsequentcheck fails in getBookmarksHash() at sw/qa/complex/writer/CheckBookmarks.java:80 with a com.sun.star.container.NoSuchElementException when it calls getByName with sBookmarkname being something like "__UnoMark__1910_1361181355".
Comment 1 Stephan Bergmann 2011-09-13 01:14:51 UTC
<http://cgit.freedesktop.org/libreoffice/core/commit/?id=37e5910c13746cc3514a9e1443893dab306eb988> "fdo#40819# Disabled failing complex.writer.CheckBookmarks test for now."  Please re-enable once the problem is fixed.
Comment 2 Björn Michaelsen 2011-11-09 17:51:57 UTC
Finally rootcaused this down to:


which is just very, very wrong. It caused all marks to be exported, not just bookmarks. These include -- among other interesting things -- the internal UnoMarks, that should never, ever be visible via API (and whose lifetime is handled internally: they are transient).

As the temporary UnoMarks are generated internally whenever somebody even creates an UnoCursor (which everyone doing stuff working with Bookmarks/Fieldmarks/whatever does: for example to create a Bookmark), this horribly breaks the whole Bookmark/Fieldmark-API.

I will revert that commit tomorrow and suggest to find a clean solution instead of this dangerous hack.
Comment 3 Björn Michaelsen 2011-11-10 03:07:55 UTC
Fixed with:


and reenabled test with:


The WW8 roundtrip hash changed from DEV300m41 which could suggest a regression, but it is hard to check now where this has been introduced, as this has been broken by 37e5910c13746cc3514a9e1443893dab306eb988 since 2010-09-14 (so basically since the beginning of LO time).
Comment 4 Björn Michaelsen 2011-11-14 13:25:10 UTC
It seems that the WW8 roundtrip hash is unstable and depends on the host machine. On the machine where I did the fix the has was a stable:
On Stephans machine it was:
On a second machine I get:

This should not happen of course, as it indicates a defect that either the export or import via WW8 is lossy/systemdependent.
Comment 5 Björn Michaelsen 2011-11-14 14:07:29 UTC
Likely related (thanks vmiklos):


Disabled WW8 roundtrip for now:

Comment 6 Björn Michaelsen 2011-11-22 14:44:35 UTC
after investigation resolving as WORKSFORME by dropping ww8 roundtrips from the test. One option would be run the test with a lot fewer marks for the ww8 roundtrip, but thats not worth the effort for now.
Comment 7 Björn Michaelsen 2011-12-24 04:27:35 UTC