Bug 167213 - Freeze hitting Enter in footer, with multipage table with embedded tables
Summary: Freeze hitting Enter in footer, with multipage table with embedded tables
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.6.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: DOCX-Floatingtable
  Show dependency treegraph
 
Reported: 2025-06-25 17:57 UTC by Telesto
Modified: 2025-06-29 11:09 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Sample with embedded fonts (12.33 MB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2025-06-27 11:54 UTC, Telesto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2025-06-25 17:57:12 UTC
Description:
Freeze hitting Enter in footer, with multipage table with embedded tables

Steps to Reproduce:
1. Open attachment 201351 [details] (bug 167086)
2. Scroll to Page 20 (Go To Page doesn't work: bug 167212)
3. Click inside the footer
4. hit Enter (freeze) 

Actual Results:
Freeze

Expected Results:
No freeze


Reproducible: Always


User Profile Reset: No

Additional Info:
Found in
Version: 26.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 6faa7e6f7bae3e6a613b4f4b7cee4a9c6d2b7aae
CPU threads: 4; OS: Windows 10 X86_64 (build 19045); UI render: Skia/Raster; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL threaded

and in
Version: 7.6.3.0.0+ (X86_64) / LibreOffice Community
Build ID: 35f19e5cb93ce218787904e99c2bedfd40e725cc
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL threaded

fine with
Version: 7.4.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 6bc5d6cac2fd9e029357c618510a3b5f3aa7c085
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL
Comment 1 m_a_riosv 2025-06-26 09:35:33 UTC
Not freeze for me, it is a bit slow to recalculate the whole pages with those tables in.

Version: 26.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: e7201fd7c51743cb103bae82263d98830f5174cf
CPU threads: 16; OS: Windows 11 X86_64 (build 26100); UI render: default; VCL: win
Locale: en-US (es_ES); UI: en-US
Calc: CL threaded
Comment 2 Telesto 2025-06-26 19:28:32 UTC
Table layout changed during bibisect. second enter triggered a freeze for me since

$ git bisect good 7b9df9a79a83f8e5cafa07e526e71a0b492da73e is the first bad commit
commit 7b9df9a79a83f8e5cafa07e526e71a0b492da73e
Author: Norbert Thiebaud <nthiebaud@gmail.com>
Date:   Wed Apr 12 01:17:54 2023 -0700

    source ce3308a926f036b87515b8cd97d2b197063dc77a

    source ce3308a926f036b87515b8cd97d2b197063dc77a

 instdir/program/cuilo.dll          | Bin 4556288 -> 4556288 bytes
 instdir/program/setup.ini          |   2 +-
 instdir/program/swlo.dll           | Bin 17585152 -> 17585152 bytes
 instdir/program/swuilo.dll         | Bin 2535936 -> 2535936 bytes
 instdir/program/version.ini        |   2 +-
 instdir/program/writerfilterlo.dll | Bin 2889728 -> 2889728 bytes
 instdir/share/registry/main.xcd    |   2 +-
 7 files changed, 3 insertions(+), 3 deletions(-)
Comment 3 Telesto 2025-06-27 03:42:26 UTC
Hmm, font matters a lot. Without Dubia font support I got document with 21 pages on my macbook

Version: 26.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: e7201fd7c51743cb103bae82263d98830f5174cf
CPU threads: 8; OS: macOS 14.7.4; UI render: Skia/Metal; VCL: osx
Locale: nl-NL (nl_NL.UTF-8); UI: en-US
Calc: threaded
Comment 4 Telesto 2025-06-27 11:54:04 UTC
Created attachment 201518 [details]
Sample with embedded fonts
Comment 5 Telesto 2025-06-28 12:53:17 UTC
Alternative
1. Open the attached file
2. Place cursor in the first table 
3. Press delete table
3. CTRL+Z
Comment 6 m_a_riosv 2025-06-28 21:56:27 UTC
What should be looking at?
Comment 7 Telesto 2025-06-29 11:09:55 UTC
(In reply to m_a_riosv from comment #6)
> What should be looking at?

I'm trying to search for a reliable reproducer. I think the same layout oscillation starts occurring in various circumstances. So if I'm deleting table or adding a enter into the footer. The steps in comment 0 don't work on my macBook either. 

Alternative which trigger the issue on my macBook too:

1. Open attachment 201518 [details] (original file at bug 167086, this one has fonts embedded)
2. Scroll to Page 19 (Go To Page doesn't work: bug 167212)
3. Click inside the footer
4. hit Enter (freeze) 

-----
Side-comment: My provisory conclusion regarding comment 0: timing being relevant. So apparently the (table) layout code doesn't follow exactly the same steps, producing the same result regardless of the single core CPU performance. 
So faster CPU apparently able to produce a valid upper/lower value at the right moment in time. Stabilizing the layout, preventing oscillation) whereas slower CPU is too late. [So even optimized an debug build can differ] Resulting in invalidating a certain table layout to soon and starts (endlessly) retrying (oscillation).
So the table layout code is apparently not 100% thread safe. Fixing a general reproducer will likely make comment 0 go away too; say by making the calculations more efficient. 
With the possibility that the thread safety issue remaining, as it only occurs under stress. The current stress is 'artificially' generated by 'suboptimal' layout code for this specific case.