Bug 135168 - Lots of empty pages added on paste since 6.5
Summary: Lots of empty pages added on paste since 6.5
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.0.0.1 rc
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Additional-Blank-Pages
  Show dependency treegraph
 
Reported: 2020-07-26 19:15 UTC by Telesto
Modified: 2020-09-13 15:30 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file (1.22 MB, application/vnd.oasis.opendocument.text)
2020-07-26 19:15 UTC, Telesto
Details
Example file (260.63 KB, application/vnd.oasis.opendocument.text)
2020-08-11 16:02 UTC, Telesto
Details
Example file (233.36 KB, application/vnd.oasis.opendocument.text)
2020-08-11 18:53 UTC, Telesto
Details
Bibisect log (2.90 KB, text/plain)
2020-08-11 18:54 UTC, Telesto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2020-07-26 19:15:11 UTC
Description:
Lots of empty pages added on paste since 6.5

Steps to Reproduce:
1. Open the attached file
2. CTRL+A
3. CTRL+C
4. CTRL+N
5. CTRL+V

Actual Results:
401

Expected Results:
339 shows the original.. 330 on copy/paste with different versions.. so within acceptable range


Reproducible: Always


User Profile Reset: No



Additional Info:
Found in
Version: 7.0.0.0.beta1+ (x64)
Build ID: 2891e91a513520d68ea2b8c59c14335861a15253
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: default; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL

not in
6.4
Comment 1 Telesto 2020-07-26 19:15:33 UTC
Created attachment 163583 [details]
Example file
Comment 2 Xisco Faulí 2020-08-10 16:28:46 UTC
Please, create a minimal reproducer ( less than 10 pages or so )
Comment 3 Telesto 2020-08-11 16:02:34 UTC
Created attachment 164168 [details]
Example file

A reduced file of 67 pages; 90 after paste
Comment 4 Telesto 2020-08-11 18:53:18 UTC
Created attachment 164176 [details]
Example file

Trimmed down little bit more 23 pages
Comment 5 Telesto 2020-08-11 18:54:23 UTC
Created attachment 164177 [details]
Bibisect log

Bisected to
author	Michael Stahl <Michael.Stahl@cib.de>	2020-04-02 17:18:37 +0200
committer	Michael Stahl <michael.stahl@cib.de>	2020-04-03 17:20:22 +0200
commit	166b5010b402a41b192b1659093a25acf9065fd9 (patch)
tree	58a783dfc1800c604979380c121337ada3e5ad6f
parent	27aa4b16bf704d0246595750daf57b57ff2577b3 (diff)
tdf#130685 sw_redlinehide: fix copying to position following redline
In DocumentContentOperationsManager::CopyWithFlyInFly(), first
CopyNodes() also creates all layout frames, then SaveRedlEndPosForRestore
fixes the end position of all redlines that were moved by CopyNodes()
(they were moved not by changing their position but by inserting
new nodes before their end position).

Of course this means that the layout frames are created with redlines
that have only a temporary end position, and then things go wrong when
the end positions are adjusted, so add something similar to
SwUndoDelete::UndoImpl() to recreate the frames in CopyWithFlyInFly().

This hit the assert:
sw/source/core/text/redlnitr.cxx:94: std::unique_ptr<sw::MergedPara> sw::CheckParaRedlineMerge(SwTextFrame&, SwTextNode&, sw::FrameMode): Assertion `pNode != &rTextNode || &pStart->nNode.GetNode() == &rTextNode' failed.

(regression from ... sw_redlinehide)

https://cgit.freedesktop.org/libreoffice/core/commit/?id=166b5010b402a41b192b1659093a25acf9065fd9
Comment 6 Telesto 2020-08-11 19:05:16 UTC
Has something to do with graphic11 .. another developer uncovering the lovely (old) empty page bug related to image anchor. Maybe commit changes the timing a bit, tends to accelerate the (underlying) issue..
Comment 7 Xisco Faulí 2020-08-11 21:53:50 UTC
(In reply to Telesto from comment #4)
> Created attachment 164176 [details]
> Example file
> 
> Trimmed down little bit more 23 pages

Much appreciated. Thanks a lot!
Comment 8 BogdanB 2020-09-13 15:28:25 UTC
Confirmed with
Version: 7.0.1.2
Build ID: 7cbcfc562f6eb6708b5ff7d7397325de9e764452
CPU threads: 4; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: en-US (ro_RO.UTF-8); UI: en-US
Calc: threaded
Comment 9 BogdanB 2020-09-13 15:30:00 UTC
Tests were based on comment 4:

before: 23
after: 34