https://bugs.documentfoundation.org/show_bug.cgi?id=173897
Bug ID: 173897
Summary: Writer hangs forever (100 % CPU, endless layout loop)
when converting/opening a document with a multi-line
user field inside a section, with page-anchored
frames, from 25.2.5.1 onwards. The same file loads and
converts in about 1 s with 25.2.4.3 and 24.8.
Product: LibreOffice
Version: 25.2.5.2 release
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: Writer
Assignee: [email protected]
Reporter: [email protected]
Description:
## Summary
Writer hangs forever (100 % CPU, endless layout loop) when converting/opening a
document with a multi-line user field inside a section, with page-anchored
frames, from 25.2.5.1 onwards. The same file loads and converts in about 1 s
with 25.2.4.3 and 24.8.7.2.
## Steps to reproduce
1. Download the attached `layout_loop_repro.odt` (synthetic data only).
2. Run: `soffice --headless --convert-to pdf layout_loop_repro.odt`
(opening the file in the GUI should show the same hang, not tested).
## Actual result
The process never finishes (killed after 30 s in all tests). No PDF is written.
## Expected result
PDF is created in about 1 s, as with 24.8.7.2 and 25.2.4.3.
## Versions tested (same file, same command, 30 s limit)
| Version | Result |
|---|---|
| 24.8.7.2 | OK (1 s) |
| 25.2.4.3 | OK (2 s) |
| 25.2.5.1 | HANG |
| 26.2.2.2 | HANG |
| 26.8.0.3 | HANG |
| 26.8.1.1 | HANG |
The regression therefore appears between 25.2.4.3 and 25.2.5.1. I did not
bisect to a commit.
## Document structure (what the file contains)
- `office:text` with a user field declaration (`text:user-field-decl`, string
value with about 3,000 characters, 10 blocks of lines separated by ` `,
tab-separated columns).
- Field used once via `text:user-field-get` in one paragraph (own paragraph
style with tab stops and fixed line height).
- Everything inside a `text:section` (style `editable=false`, one column).
- Two `draw:frame` elements with `text:anchor-type="page"` and
`style:vertical-rel="page"`, `style:horizontal-rel="page"`, one of them with
`style:rel-width="30%"` and `loext:may-break-between-pages="true"`.
- A page style (`styles.xml`) with header/footer containing frames.
## Observations from minimizing the file
- The hang depends on the length of the field value. With 6 to 9 blocks the
file converts fine; with 10 to 12 blocks it hangs in 26.8.0.3 (14 and 20 blocks
did not hang in an earlier variant). It seems to depend on where the page break
falls.
- Without `styles.xml` (default page style) the file does not hang.
- With the section removed, the original document does not hang (tested with
the original file, not with the reduced one).
- Frames anchored "to paragraph" instead of "to page" hung in an earlier
variant of the document as well, so changing the anchor alone is not a
workaround.
## Notes
- The reduced file was produced by automatically removing elements from a real
document as long as the hang (26.8) and the OK result (24.8.7.2) were both
preserved. Texts were then replaced by neutral placeholders of the same length,
so the layout stays comparable.
- Similar older layout-loop reports exist (see meta bug 101280), but I did not
find a bug that matches this combination.
Steps to Reproduce:
1. Download the attached `layout_loop_repro.odt` (synthetic data only).
2. Run: `soffice --headless --convert-to pdf layout_loop_repro.odt`
(opening the file in the GUI should show the same hang, not tested).
Actual Results:
The process just hangs and crashes after around 20 seconds.
Expected Results:
The document should be exported to PDF
Reproducible: Always
User Profile Reset: No
Additional Info:
Repro-Document: https://cloud.r3ktm8.de/index.php/s/yTyMqy4yobqean5
(Document was AI generated based of a original document produced by our
service)
--
You are receiving this mail because:
You are the assignee for the bug.