Bug 154428 - FILESAVE Shapes vanish from a Writer Frame after grouping and anchoring operation (gtk3 and kf5)
Summary: FILESAVE Shapes vanish from a Writer Frame after grouping and anchoring opera...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.5.0.0 alpha0+
Hardware: All Linux (All)
: medium major
Assignee: Not Assigned
URL:
Whiteboard: target:7.6.0 target:7.5.3.2
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Shapes
  Show dependency treegraph
 
Reported: 2023-03-28 15:49 UTC by bugzilla
Modified: 2023-08-04 09:27 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Simple Writer document illustrating shapes issue (18.42 KB, application/vnd.oasis.opendocument.text)
2023-03-29 12:54 UTC, bugzilla
Details

Note You need to log in before you can comment on or make changes to this bug.
Description bugzilla 2023-03-28 15:49:01 UTC
Whilst updating an existing Writer document, I discovered (belatedly) that several standard shapes used in diagrams have vanished completely!  This was only apparent AFTER document Reload. At the time of edit (and save) all graphics were present OK. 

The document uses several Frames, each containing some text plus a small diagram comprising basic shapes and lines.

I'm using LO 7.5.1.2 via the Ubuntu PPA on Mint 21.1. The issue is also present with the 7.5.1.2 AppImage, but the 7.4.6.2 AppImage works OK. Note the problem is particularly insidious as the 'damage' is not detected until you next open the document. (At first I wondered if the shapes had somehow become hidden, but then realised they had disappeared from Style Inspector as well)
 

STEPS TO RE-CREATE
------------------
This may not be the only sequence to provoke the defect, but it is repeatable.

1. Open a new Writer document and add a Frame via Insert > Frame > Interactively.

2. Insert a few (e.g. four) graphics objects e.g. square, circle, hexagon, triangle. The default Anchor is 'Paragraph' and default Wrap is 'Through'.

3. Save the document, then Reload.  All shapes should appear as originally added.

4. Group two objects, then Save & Reload.  Observe the grouped objects have moved hard-left and Wrap changed to 'Parallel' without user intervention. This is suspicious and does not happen with LO 7.4.6.2 AppImage. 

5. Select and drag the grouped object back to original position, Save/Reload and no further change observed.

6. Select original Group and change Anchor to 'Frame'. Save/Reload, no change observed.

7. Create another shape and add to existing group. This enlarged group will still be anchored to 'Frame'.

8. Save/Reload. Observe the newly extended group has vanished, including from Style Inspector.


Version Information
-------------------
Version: 7.5.1.2 (X86_64) / LibreOffice Community
Build ID: 50(Build:2)
CPU threads: 2; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-GB (en_GB.UTF-8); UI: en-GB
Ubuntu package version: 4:7.5.1~rc2-0ubuntu0.22.04.1~lo1
Calc: threaded
Comment 1 bugzilla 2023-03-29 12:54:09 UTC
Created attachment 186285 [details]
Simple Writer document illustrating shapes issue

I've attached a simple Writer document to help illustrate the shapes vanishing from frames issue.
Comment 2 bugzilla 2023-04-02 14:04:59 UTC
Problem continues with latest LO 7.5.2.2
Comment 3 Buovjaga 2023-04-04 11:40:31 UTC
Reproduced, commencing bibisect

Arch Linux 64-bit, X11
Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: ccd75379338648278fa5034cba1035ed4ed08d46
CPU threads: 8; OS: Linux 6.2; UI render: default; VCL: kf5 (cairo+xcb)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: threaded
Built on 4 April 2023
Comment 4 Buovjaga 2023-04-04 11:58:31 UTC
Bibisected with linux-64-7.5 to 8611f6e259b807b4f19c8dc0eab86ca648891ce3
ref-count SdrObject

Bibisecting steps:
0. Use gtk3 or kf5. No problem with gen or Windows.
1. In the first frame, select square and circle, right-click - Group (or use Format menu in case of a bug that prevents context menus)
2. Right-click group - Anchor - To Frame
3. Shift-click donut, right-click - Group
4. Save and reload
Comment 5 Commit Notification 2023-04-20 13:05:54 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/40babcfa637957bf7b59caa3cd12a630189e3e63

tdf#154827 and tdf#154428 graphics anchored in Writer as character..

It will be available in 7.6.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 6 Roland Baudin 2023-04-20 19:03:13 UTC
Good news! Will the fix be included in the next 7.5.x release?
Comment 7 Commit Notification 2023-04-21 08:53:03 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "libreoffice-7-5":

https://git.libreoffice.org/core/commit/e1beab2488a417e5fc3d63265d8e71c3807755f8

tdf#154827 and tdf#154428 graphics anchored in Writer as character..

It will be available in 7.5.4.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 8 Stéphane Guillou (stragu) 2023-04-25 22:26:46 UTC
Repro in 7.5.3.1, verified as fixed in:

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 5cd9de202765e243e41416802f3e4486b8a96f16
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

Thank you all!
Comment 9 Commit Notification 2023-04-26 12:01:28 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "libreoffice-7-5-3":

https://git.libreoffice.org/core/commit/397c30d9faae596803ebb087fb609d8eb52e1efd

tdf#154827 and tdf#154428 graphics anchored in Writer as character..

It will be available in 7.5.3.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 10 bugzilla 2023-05-10 18:01:51 UTC
Bug confirmed as squashed using 7.5.3.2 Ubuntu PPA.

Thanks for resolving.