Bug 162507 - Page layout reflow after pressing delete causes hang (involving tables)
Summary: Page layout reflow after pressing delete causes hang (involving tables)
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.6.0.0 alpha0+
Hardware: x86-64 (AMD64) All
: high critical
Assignee: Miklos Vajna
URL:
Whiteboard: target:25.2.0 target:24.8.2
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Writer-Tables
  Show dependency treegraph
 
Reported: 2024-08-18 07:19 UTC by FishBoneEK
Modified: 2024-09-03 18:01 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
sample document (12.77 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2024-08-18 07:19 UTC, FishBoneEK
Details

Note You need to log in before you can comment on or make changes to this bug.
Description FishBoneEK 2024-08-18 07:19:49 UTC
Created attachment 195887 [details]
sample document

Cannot press delete in a certain position in the document, otherwise Writer will freeze. 

The position is marked in the uploaded document. 

There's a "Cannot merge table..." marking, which is related to another bug and is irrelevant to this one.
Comment 1 Buovjaga 2024-08-18 09:35:55 UTC
Repro (the position is found on page 4 in the document).

Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 25b61215ca91ec474c46f5ab8af067b4568f0bf9
CPU threads: 8; OS: Linux 6.10; UI render: default; VCL: kf6 (cairo+wayland)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: CL threaded
Comment 2 Telesto 2024-08-18 10:14:12 UTC
1. Open the attached file (attachment 195887 [details])
2. Go to page 6 and press delete
Comment 3 Telesto 2024-08-18 10:18:53 UTC
Also with
Version: 7.6.3.0.0+ (X86_64) / LibreOffice Community
Build ID: 35f19e5cb93ce218787904e99c2bedfd40e725cc
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL threaded

No freeze; the delete action is blocked with:
Version: 7.0.7.0.0+ (x64)
Build ID: 626ea4e62a3e5005fe9825923a1c0c5bdb61cc08
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: default; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL

Deleting the page break first + followed by deleting the line with backspace still doesn't freeze with 7.0.7. It does in master
Comment 4 m_a_riosv 2024-08-18 10:21:30 UTC
Something is wrong at opening the file, what are tables on Word, are imported as Frames just after the 'Cannot press Delete here → ' where there is a 'Break of Section' in Word.
Comment 5 Buovjaga 2024-08-18 11:08:52 UTC
Bibisected with linux-64-7.6 to 693ad3aadbf84afa750af73c330fe7e09b38a2e7
tdf#120262 sw floattable, legacy: go outside body only for page frame vert pos
Comment 6 Commit Notification 2024-09-03 07:54:17 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/5b0256f30ee154edb28b999bc4faba2453fc32b8

tdf#162507 sw floattable: fix not wanted join of two different split anchors

It will be available in 25.2.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 7 Miklos Vajna 2024-09-03 07:58:22 UTC
Writer layout doesn't support anchoring multiple, multi-page floating tables to the same text node. So probably the best way to prevent the hang is to make sure the UI doesn't allow creating such a model, similar to what the DOCX import does. This is done now, very similar to what Word does. (Simply nothing happens on the problematic delete, instead of hanging.)
Comment 8 Commit Notification 2024-09-03 18:01:19 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-24-8":

https://git.libreoffice.org/core/commit/5d8ca53e218ec96f29d66e483541b7304da169cd

tdf#162507 sw floattable: fix not wanted join of two different split anchors

It will be available in 24.8.2.

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.