Bug 136270 - Ungrouping drawing object group unleashes an avalanche of pages
Summary: Ungrouping drawing object group unleashes an avalanche of pages
Status: RESOLVED DUPLICATE of bug 115625
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.2.0.3 release
Hardware: All All
: medium major
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected
Depends on:
Blocks: Regress-elim-SvxShapePolyPolygonBezier
  Show dependency treegraph
 
Reported: 2020-08-29 18:32 UTC by Buovjaga
Modified: 2023-08-30 11:13 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Minimal example file (32.55 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2023-08-30 09:28 UTC, Gabor Kelemen (allotropia)
Details
Upon opening it looks the same (145.99 KB, image/png)
2023-08-30 09:29 UTC, Gabor Kelemen (allotropia)
Details
Ungrouping splits the table (146.03 KB, image/png)
2023-08-30 09:32 UTC, Gabor Kelemen (allotropia)
Details
Reduced, good file (29.62 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2023-08-30 09:33 UTC, Gabor Kelemen (allotropia)
Details
The reduced file in Word and in Writer after ungrouping - good (143.03 KB, image/png)
2023-08-30 09:33 UTC, Gabor Kelemen (allotropia)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Buovjaga 2020-08-29 18:32:34 UTC
1. Open attachment 164645 [details] from bug 136082
2. Open the Navigator in the Sidebar, expand Drawing objects
3. Double-click Group 254 (you will jump to page 6)
4. Right-click the selected group in the document display, select Ungroup

Observe sudden appearance of hundreds of pages.

Bibisected with win32-6.2 to https://git.libreoffice.org/core/commit/72b52ba3c7bd3233ca3e721c3e3d69dd08246bdc
tdf#119109 sw: fix SwTableFrame follow chain formatting

Before this commit, the number of pages increased to 15. This in itself is a regression thanks to https://git.libreoffice.org/core/commit/36bade04d3780bc54c51b46bb0b63e69789658a5 Armin's commit is blamed for bug 122717 among others.

Adding Cc: to Michael Stahl
Comment 1 Xisco Faulí 2021-02-09 14:08:08 UTC
Dear Michael Stahl,
This bug has been in ASSIGNED status for more than 3 months without any
activity. Resetting it to NEW.
Please assign it back to yourself if you're still working on this.
Comment 2 Buovjaga 2021-09-02 13:08:37 UTC
The original problem is now gone.  Now it only creates one extra copy of the group.

Arch Linux 64-bit
Version: 7.3.0.0.alpha0+ / LibreOffice Community
Build ID: e8cef7a93170fdca1a66f80184e7c207d3ca376e
CPU threads: 8; OS: Linux 5.13; UI render: default; VCL: kf5 (cairo+xcb)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: threaded
Built on 1 September 2021
Comment 3 Buovjaga 2022-03-06 12:57:10 UTC
Good news: no extra group created anymore.

Arch Linux 64-bit
Version: 7.4.0.0.alpha0+ / LibreOffice Community
Build ID: 896c097f1fa4bc9d2e5ea87a696c125bb335ecac
CPU threads: 8; OS: Linux 5.16; UI render: default; VCL: kf5 (cairo+xcb)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: threaded Jumbo
Built on 3 March 2022
Comment 4 Gabor Kelemen (allotropia) 2022-04-01 09:13:40 UTC
(In reply to Buovjaga from comment #3)
> Good news: no extra group created anymore.
> 
> Arch Linux 64-bit
> Version: 7.4.0.0.alpha0+ / LibreOffice Community
> Build ID: 896c097f1fa4bc9d2e5ea87a696c125bb335ecac
> CPU threads: 8; OS: Linux 5.16; UI render: default; VCL: kf5 (cairo+xcb)
> Locale: fi-FI (fi_FI.UTF-8); UI: en-US
> Calc: threaded Jumbo
> Built on 3 March 2022

Can not confirm, ungrouping still creates two sets of pink rectangle shape and image. Number of pages grows from 6 to 7.

Also ungrouping Group 255 on page 2 still creates the avalanche. Group 255 also appears in two instances on page 2 and 3, while there is only one of it in Word.

And Shape 4 is a cropped shape with image fill, but the image fill is not cropped, so the woman in front of the fence is horizontally "compressed".

This template is such a bug mine :(.

Version: 7.4.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 0a05b1f46263a16c6d40c841a317c3ba9f4d31d6
CPU threads: 14; OS: Windows 10.0 Build 19044; UI render: default; VCL: win
Locale: en-US (hu_HU); UI: en-US
Calc: threaded Jumbo
Comment 5 Michael Stahl (allotropia) 2023-08-28 15:11:21 UTC
that's unsurprising. the document has a group shape "Group 255" in the background and anchored in the header, which means it is on every page; the actual text you see is inside a table. the sub-shapes "Rectangle 241" and "Shape 9" of "Group 255" are *not* in the background but have wrap mode "parallel", and together cover the entire rightmost column of the table; there is no place to put the text content of the table because every page is covered by the header-anchored shapes and the only surprise is why this doesn't go into an infinite loop.

(yes, the pink rectangle and the text "on" it are entirely unrelated in the document structure.)

hmm... some testing indicates: 

LO 6.0 Linux bibisect repo master => infinite number of pages
LO 4.0.6.2 => group shapes aren't imported
LO 5.4 Linux bibisect repo master => infinite number of pages
LO 5.2.3.3 Linux => infinite number of pages
LO 5.0.6.2 Linux => infinite number of pages
LO 4.3.7.1 Linux => shape import is buggy (too small)
LO 4.4.7.2 Linux => shape import is buggy (too small)
...
bibisect in releases repo finds libreoffice-5.0.4.1 is where it went from buggy import to Ungroup resulting in infinite pages

=> this never worked, removing "regression".

unclear what to do about it.

looks like a case of "doctor it hurts when i do this - don't do that, then."
Comment 6 Gabor Kelemen (allotropia) 2023-08-30 09:28:45 UTC
Created attachment 189239 [details]
Minimal example file

To reproduce the issue, select Group 3 from the Navigator, then ungroup it -> the two shapes appear on 3 pages.
Comment 7 Gabor Kelemen (allotropia) 2023-08-30 09:29:17 UTC
Created attachment 189240 [details]
Upon opening it looks the same
Comment 8 Gabor Kelemen (allotropia) 2023-08-30 09:32:05 UTC
Created attachment 189241 [details]
Ungrouping splits the table

Somehow the grouped shape in the header and the table in the body interact with each other and the table is split. The second row is disappearing between the second and third pages.

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: c9916d9be9c060d43fc063b76d70629162650fea
CPU threads: 15; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: en-US (hu_HU); UI: en-US
Calc: threaded
Comment 9 Gabor Kelemen (allotropia) 2023-08-30 09:33:19 UTC
Created attachment 189242 [details]
Reduced, good file

Deleting one of the three columns from the table in Word however makes the document not trigger this behavior.
Comment 10 Gabor Kelemen (allotropia) 2023-08-30 09:33:56 UTC
Created attachment 189243 [details]
The reduced file in Word and in Writer after ungrouping - good
Comment 11 Gabor Kelemen (allotropia) 2023-08-30 11:04:15 UTC
A bit of bibisecting on 7.6 shows:

https://git.libreoffice.org/core/+/afbe948d4c47391092c8fcf4130bd7501c3d5062

author	Justin Luth <justin.luth@collabora.com>	Thu Mar 23 12:17:28 2023 -0400
committer	Justin Luth <jluth@mail.com>	Fri Mar 24 18:25:37 2023 +0000
tree c1cf7a48b9bd3d5e6cabfacc1164d797ea1d3c4f
parent ae4e5e38b5ec99123ef478143501a9b0a3650171 [diff]

tdf#115625 tdf#76022 sw table: CalcFlyOffset: get correct surround for textbox

This stopped the "avalanche of shapes" when ungrouping the Group 255 at the top of the second page in the original attachment 164645 [details] 

On the other hand, it created the corner case with the minimal attachment 189239 [details] - I'll take this into a separate issue.

*** This bug has been marked as a duplicate of bug 115625 ***