Bug 167165 - Writer crashes when cursor placed over a specific page number in TOC
Summary: Writer crashes when cursor placed over a specific page number in TOC
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
25.2.3.2 release
Hardware: x86-64 (AMD64) All
: high critical
Assignee: Mike Kaganski
URL:
Whiteboard: target:26.2.0 target:25.8.0.0.beta2 t...
Keywords:
Depends on:
Blocks:
 
Reported: 2025-06-22 16:47 UTC by Andrey Pivovarov
Modified: 2025-07-01 07:10 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
File causing the crash (101.52 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2025-06-22 16:47 UTC, Andrey Pivovarov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey Pivovarov 2025-06-22 16:47:00 UTC
Description:
A document which was created in Writer, then exported as DOCX (Word 2007), edited by another person in Word of unknown version, and then reopened in Writer, placing cursor over a specific page number in an automatic TOC causes a crash. It also crashes spontaneously when working in the other parts of the document but at random times (usually after 2-10 minutes). Updating the TOC does not fix the issue.

Steps to Reproduce:
1. Open the attached document
2. Scroll down to the TOC
3. Place cursor over the page number 9 in the TOC

Actual Results:
Crash

Expected Results:
No crash


Reproducible: Always


User Profile Reset: Yes

Additional Info:
The behavior is idential with the Flatpak release 25.2.4.3. The document is a minimally edited version of the original document (confidential data removed).
Comment 1 Andrey Pivovarov 2025-06-22 16:47:28 UTC
Created attachment 201417 [details]
File causing the crash
Comment 2 Andrey Pivovarov 2025-06-22 16:51:54 UTC
Error message in the terminal:

terminate called after throwing an instance of 'com::sun::star::uno::RuntimeException'
Unspecified Application Error
Comment 3 Mike Kaganski 2025-06-22 17:18:46 UTC
You forgot to provide the full info from your LibreOffice's Help->About. Also, it seems important to provide your system's locale info. Based on the garbage instead of the filename in the attachment 201417 [details] properties, it could be an encoding problem, that could possibly manifest when generating the tooltip.
Comment 4 Andrey Pivovarov 2025-06-22 17:49:52 UTC
Sorry, here it is:

Version: 25.2.3.2 (X86_64) / LibreOffice Community
Build ID: 520(Build:2)
CPU threads: 8; OS: Linux 6.12; UI render: default; VCL: gtk3
Locale: ru-RU (ru_RU.UTF-8); UI: ru-RU
Debian package version: 4:25.2.3-2~bpo12+1
Calc: threaded

Locale info (custom mixed English/Russian):

LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE=ru_RU.UTF-8
LC_NUMERIC="en_US.UTF-8"
LC_TIME=ru_RU.UTF-8
LC_COLLATE="en_US.UTF-8"
LC_MONETARY=ru_RU.UTF-8
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS=ru_RU.UTF-8
LC_TELEPHONE=ru_RU.UTF-8
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
Comment 5 Andrey Pivovarov 2025-06-22 17:51:40 UTC
And the Flatpak version:

Version: 25.2.4.3 (X86_64) / LibreOffice Community
Build ID: 33e196637044ead23f5c3226cde09b47731f7e27
CPU threads: 8; OS: Linux 6.12; UI render: default; VCL: gtk3
Locale: ru-RU (ru_RU.UTF-8); UI: ru-RU
Flatpak
Calc: threaded
Comment 6 Telesto 2025-06-22 19:40:19 UTC
Confirm
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
Comment 7 Telesto 2025-06-22 19:42:30 UTC
Not in
Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 7afd11f8e476884662c18db85445752cc030b2e2
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
Comment 8 Telesto 2025-06-22 19:46:13 UTC
Stack without symbols
VCRUNTIME140!_CxxThrowException+0x90
swlo!SwXTextRange::getPropertyValue+0x1ba
swlo!SwModuleOptions::GetTableHMove+0x1ec3
mergedlo!ImplCallPreNotify+0x379
mergedlo!ImplCallPreNotify+0x230d
Comment 9 Mike Kaganski 2025-06-22 20:16:50 UTC
https://gerrit.libreoffice.org/c/core/+/186806
Comment 10 Commit Notification 2025-06-22 23:00:52 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

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

tdf#167165: catch possible exceptions when trying to get HyperLinkName

It will be available in 26.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 11 Commit Notification 2025-06-23 08:09:48 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

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

tdf#167165: check if node allows creating SwXTextRange

It will be available in 26.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 12 Commit Notification 2025-06-26 16:04:41 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-25-8":

https://git.libreoffice.org/core/commit/211099533e01f74d3d364b54e40d94c6d3bbe37d

tdf#167165: catch possible exceptions when trying to get HyperLinkName

It will be available in 25.8.0.0.beta2.

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 13 Commit Notification 2025-06-26 16:04:44 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-25-2":

https://git.libreoffice.org/core/commit/9ea547235e6ed57a91485a28fda7e300b188e8fa

tdf#167165: catch possible exceptions when trying to get HyperLinkName

It will be available in 25.2.5.

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 14 Commit Notification 2025-07-01 07:10:37 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-25-8":

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

tdf#167165: check if node allows creating SwXTextRange

It will be available in 25.8.0.0.beta2.

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.