Bug 149467 - Follow URL link in Writer text when navigator displayed: Crash in: _chkstk
Summary: Follow URL link in Writer text when navigator displayed: Crash in: _chkstk
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.3.3.2 release
Hardware: All All
: high major
Assignee: Not Assigned
URL:
Whiteboard: target:7.5.0 target:7.4.0 target:7.3.6
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2022-06-06 19:18 UTC by as-Sfy3y
Modified: 2022-08-09 11:38 UTC (History)
4 users (show)

See Also:
Crash report or crash signature: ["_chkstk"]


Attachments
Document with one line of text. A URL without whitespace appended only. (9.39 KB, application/vnd.oasis.opendocument.text)
2022-06-06 19:18 UTC, as-Sfy3y
Details

Note You need to log in before you can comment on or make changes to this bug.
Description as-Sfy3y 2022-06-06 19:18:08 UTC
Created attachment 180603 [details]
Document with one line of text. A URL without whitespace appended only.

This bug was filed from the crash reporting server and is br-5d2316f1-16a8-434d-85d4-076ff3072c48.
=========================================
1. I have created a Writer document with one line of text. The text is a https URL.
I did not append a white space. Thus writer did not create a hyperlink from the text.
2. I saved the document.
3. I opened the document and appended a white space to the URL. Writer makes it a hyperlink. 
4. I control-select the link to open it. 
5. Writer crashes.

It happens with 7.3.3.2 and 7.3.2.2.
See the attachement for a document to reproduce the problem.

Kind regards, Olav
Comment 1 Xisco Faulí 2022-06-07 08:30:15 UTC
No crash in

Version: 7.4.0.0.alpha1+ / LibreOffice Community
Build ID: 1e022eb12e1222d6d9c6d127a18b0ed8fd49b6c0
CPU threads: 8; OS: Linux 5.10; UI render: default; VCL: x11
Locale: es-ES (es_ES.UTF-8); UI: en-US
Calc: threaded
Comment 2 Xisco Faulí 2022-06-07 08:35:48 UTC
nor in

Version: 7.3.2.2 (x64) / LibreOffice Community
Build ID: 49f2b1bff42cfccbd8f788c8dc32c1c309559be0
CPU threads: 1; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded
Comment 3 Xisco Faulí 2022-06-07 08:36:07 UTC
What is your default internet browser ?
Comment 4 Xisco Faulí 2022-06-07 08:38:51 UTC
ok, I think I know how to reproduce it
Comment 5 Xisco Faulí 2022-06-07 08:44:09 UTC
Steps to reproduce:
1. Open attached document
2. Open the navigator
3. Add a space after the text -> text becomes a link
4. Click on the link

-> Crash
Comment 6 Xisco Faulí 2022-06-07 08:53:21 UTC
Regression introduced by:

author	Jim Raykowski <raykowj@gmail.com>	2021-09-19 19:55:06 -0800
committer	Jim Raykowski <raykowj@gmail.com>	2021-09-22 02:54:46 +0200
commit d62f03d316fb4c60087fc2af626bbd0b35b98693 (patch)
tree 8b00b39f229b6738c1c4d4028e36a980e92d7b23
parent bb09bfd25f25fb959123df1c01a52b8dffa97f50 (diff)
tdf#95378 Writer Navigator: Track hyperlinks

Bisected with: bibisect-linux64-7.3

Adding Cc: to Jim Raykowski
Comment 7 Jim Raykowski 2022-06-14 05:24:58 UTC
This crash is caused by an odd re-entrant happening. In this case re-entrance to SwContentTree::UpdateTracking happens when SfxHintId::DocChanged is broadcast from SwDocShell::SetModified when GetContentAtPos is called from SwContentTree::UpdateTracking which eventually causes a stack crash. The patch offered seems to fix the crash but I am unsure it will not cause other problems. Another approach would be to disallow re-entrance to the UpdateTracking function. My feeling is there is something not right with what GetContentAtPos is doing here.

https://gerrit.libreoffice.org/c/core/+/135802
Comment 8 Commit Notification 2022-07-30 04:11:29 UTC
Jim Raykowski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/45312369331688bde9d1b8c97ad883a69e5982d7

tdf#149467 fix re-entrance crash

It will be available in 7.5.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 9 Commit Notification 2022-08-02 10:57:01 UTC
Jim Raykowski committed a patch related to this issue.
It has been pushed to "libreoffice-7-4":

https://git.libreoffice.org/core/commit/22112cab00fc791607939becfe3d9416d3ff9d8a

tdf#149467 fix re-entrance crash

It will be available in 7.4.1.

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 10 Commit Notification 2022-08-02 10:58:14 UTC
Jim Raykowski committed a patch related to this issue.
It has been pushed to "libreoffice-7-3":

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

tdf#149467 fix re-entrance crash

It will be available in 7.3.6.

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 2022-08-08 10:27:50 UTC
Jim Raykowski committed a patch related to this issue.
It has been pushed to "libreoffice-7-4-0":

https://git.libreoffice.org/core/commit/30035a64cf59a0dffafd7017afd70b309dd258c8

tdf#149467 fix re-entrance crash

It will be available in 7.4.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.