Bug 162772 - Crash in "Target in Document" in Hyperlink dialog, if path is not suitable
Summary: Crash in "Target in Document" in Hyperlink dialog, if path is not suitable
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
25.2.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:25.2.0
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2024-09-03 16:26 UTC by Regina Henschel
Modified: 2024-09-05 12:07 UTC (History)
3 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 Regina Henschel 2024-09-03 16:26:20 UTC
Copy a link to a website to the clipboard.

Start a daily build. Create a new text document with some dummy text. Mark a word and press Ctrl+K. Now you are in the "Hyperlink" dialog.

Click on option "Document". Notice, that Path is filled with the link, you have put into the clipboard. That is bug 162753.

Alternatively enter a valid URL like https://www.libreoffice.org/ into the "Path" field.

Click on button "Target in Document". It tries to find an anchor in the linked document and crashes.

I see the problem in Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 1a95aa91f7cfe7765a5277cca09b35c398638a23
CPU threads: 32; OS: Windows 11 X86_64 (10.0 build 22631); UI render: Skia/Vulkan; VCL: win
Locale: de-DE (de_DE); UI: en-US
Calc: threaded

If you do the same in version LO 7.6 or LO 24.8 it takes a while until the linked document is examined, but then you will receive a list of possible link targets. It does not crash.
Comment 1 m_a_riosv 2024-09-03 21:24:40 UTC
Reproducible
Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 1a95aa91f7cfe7765a5277cca09b35c398638a23
CPU threads: 16; OS: Windows 11 X86_64 (10.0 build 22631); UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: en-US
Calc: CL threaded
Comment 2 Xisco Faulí 2024-09-05 09:50:45 UTC
Regression introduced by:

author	Noel Grandin <noel.grandin@collabora.co.uk>	2024-08-17 13:19:54 +0200
committer	Noel Grandin <noel.grandin@collabora.co.uk>	2024-08-27 09:10:04 +0200
commit a6ad198d097fb4a503c8d5831d484ff46721134b (patch)
tree e82ca01e800c5f50ce8db7bd8eb610790ee13c8d
parent 03b31a8ad48e3b8a9e54203ff3856702557757b5 (diff)
tdf#158556 use more comphelper::ByteReader

Bisected with: bibisect-linux64-25.2
Comment 3 Commit Notification 2024-09-05 11:51:44 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/6d6422b3ff0c3b252f87f76f1777a357aafeaea7

tdf#162772 Crash in "Target in Document" in Hyperlink dialog

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.