Bug 170599 - Writer crashes when reopening Print Preview with outline folding enabled and a heading in the first paragraph
Summary: Writer crashes when reopening Print Preview with outline folding enabled and ...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
25.2.7.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Print-Preview Crash
  Show dependency treegraph
 
Reported: 2026-02-04 13:32 UTC by Takenori Yasuda
Modified: 2026-02-05 06:45 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Takenori Yasuda 2026-02-04 13:32:42 UTC
Description:
Writer crashes when Print Preview is opened, closed, and then opened again in a document where the first paragraph participates in the outline structure. The crash also occurs in Safe Mode.

The crash occurs when all of the following conditions are met:
- Formatting marks are shown.
- Hidden characters are displayed.
- Outline folding is enabled.
- The affected content is placed in the first paragraph.

The affected content includes:
- Heading 1–10 paragraph styles
- Bulleted or numbered lists
- Hidden Text or Hidden Paragraph fields

If any one of these conditions is not met, the crash does not occur.

This issue is particularly relevant to editing Markdown documents.
In Markdown files, the first line is very commonly a level-1 heading (for example, "# Heading"). When such files are imported into Writer, this line is converted into a heading paragraph (Heading 1–6).
Since LibreOffice 26.2 allows Markdown documents to be edited like regular Writer documents, this crash can affect a common and expected workflow.

This issue appears to be a regression introduced in the 25.2 series and is reproducible in later versions, including the 26.2 series and current master builds.

Steps to Reproduce:
1. Open LibreOffice Writer.
2. Enable Menu > View > Formatting Marks.
3. Open Menu > Options > LibreOffice Writer.
4. Enable View > Outline Folding > Show outline-folding buttons.
5. Enable Formatting Aids > Display Formatting > Hidden characters.
6. In the first paragraph, insert affected content (e.g. apply Heading 1).
7. Open Print Preview.
8. Close Print Preview.
9. Open Print Preview again.

Actual Results:
LibreOffice crashes.

Expected Results:
LibreOffice does not crash.


Reproducible: Always


User Profile Reset: Yes

Additional Info:
[Reproducible]
Version: 26.2.0.3 (X86_64)
Build ID: 620(Build:3)
CPU threads: 8; OS: Windows 11 x86_64 (build 26200); UI render: Skia/Raster; VCL: win
Locale: ja-JP (ja_JP); UI: ja-JP
Calc: CL threaded Jumbo

Also reproducible with:
- 25.2.7.2
- 26.8.0.0.alpha0

[Not reproducible]
Version: 24.8.7.2 (x86) / LibreOffice Community
Build ID: e07d0a63a46349d29051da79b1fde8160bab2a89
CPU threads: 8; OS: Windows 11 x86_64 (10.0 build 26200); UI render: Skia/Vulkan; VCL: win
Locale: ja-JP (ja_JP); UI: ja-JP
Calc: CL threaded
Comment 1 Mateusz Wlazłowski 2026-02-04 22:38:36 UTC
Crash

Version: 25.8.4.2 (X86_64) / LibreOffice Community
Build ID: 290daaa01b999472f0c7a3890eb6a550fd74c6df
CPU threads: 8; OS: Linux 6.14; UI render: default; VCL: gtk3
Locale: fr-FR (en_US.UTF-8); UI: en-US
Flatpak
Calc: threaded
Comment 2 Saburo 2026-02-05 06:45:21 UTC
bibisected with win64-25.8
commit dd72fd35bbe35798026f2f22189e34e57cf6d65c
author	Jim Raykowski
tdf#167405 Fix outline folding crash

***
adding CC: Jim Raykowski
Please, take a look?