Bug 132603 - Crash when selecting part of a comment
Summary: Crash when selecting part of a comment
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.0.0.0.alpha0+
Hardware: All All
: high major
Assignee: Julien Nabet
URL:
Whiteboard: target:7.0.0
Keywords: bibisected, haveBacktrace, regression
Depends on:
Blocks:
 
Reported: 2020-05-01 22:01 UTC by Regina Henschel
Modified: 2020-05-06 11:51 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
document to reproduce the crash (14.06 KB, application/vnd.oasis.opendocument.text)
2020-05-01 22:01 UTC, Regina Henschel
Details
VS 2019 Call Stack (1.96 KB, text/plain)
2020-05-01 22:02 UTC, Regina Henschel
Details
bt with debug symbols (5.27 KB, text/plain)
2020-05-01 22:16 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Regina Henschel 2020-05-01 22:01:01 UTC
Created attachment 160203 [details]
document to reproduce the crash

Open attached document. Select a word in the comment. --> crash

Record changes and show changes are on.

I'm using a debug build Version: 7.0.0.0.alpha0+ (x64)
Build ID: 309569f7d1d144e7b1bcaa0211f04e9b26b9f2fd
CPU threads: 8; OS: Windows 10.0 Build 18362; UI render: GL; VCL: win; 
Locale: de-DE (en_US); UI-Language: en-US
Calc: CL

The error message is
Exception thrown: read access violation.
**this** was 0x38. occurred

The call stack will be attached.
Comment 1 Regina Henschel 2020-05-01 22:02:05 UTC
Created attachment 160204 [details]
VS 2019 Call Stack
Comment 2 Julien Nabet 2020-05-01 22:16:00 UTC
Created attachment 160206 [details]
bt with debug symbols

On pc Debian x86-64 with master sources updated today + enable-dbgutil, I could reproduce this.
Comment 3 Julien Nabet 2020-05-01 22:17:46 UTC
I don't reproduce this with LO Debian package 6.4.3
=> regression
Comment 4 Julien Nabet 2020-05-01 22:26:51 UTC
I gave a try with:
https://gerrit.libreoffice.org/c/core/+/93308
Comment 5 Aron Budea 2020-05-01 22:33:17 UTC
Regression started in the following range, bibisected using repo bibisect-linux-64-6.5:
https://cgit.freedesktop.org/libreoffice/core/log/?qt=range&q=40d83914d43f60a196dfabddea0b52e2046b333a..b5a79a6e81086df034632716110124af6ee35109

Opening the document with builds in between crashes LO.

This might be related to the following commit, I can see an SfxObjectShell::isContentExtractionLocked() call in the backtrace.
https://cgit.freedesktop.org/libreoffice/core/commit/?id=65404e2c72ea2d5d3f6c074121005b8b9369e7fb
author		Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>	2020-04-08 08:54:21 +0200
committer	Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>	2020-04-09 11:14:15 +0200

"Move is*Locked methods to object shell"

(In reply to Julien Nabet from comment #4)
> I gave a try with:
> https://gerrit.libreoffice.org/c/core/+/93308
A similar fix from Caolán resolved that fileopen crash, indeed the pattern looks hopeful:
https://cgit.freedesktop.org/libreoffice/core/commit/?id=b5a79a6e81086df034632716110124af6ee35109
Comment 6 Commit Notification 2020-05-02 05:36:55 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/8729c9751253f955840cffd24e2e31b1535a095a

tdf#132603: fix crash when selecting part of a comment

It will be available in 7.0.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 7 Xisco Faulí 2020-05-05 15:13:30 UTC
Verified in

Version: 7.0.0.0.alpha0+
Build ID: 017f90788c330d2e35a9c05a5...
CPU threads: 4; OS: Linux 4.19; UI render: default; VCL: x11; 
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

@Julien Nabet, thanks for fixing this issue!
Comment 8 Commit Notification 2020-05-06 11:51:15 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/7410d53b1b5ae85af7a8f96153ab7ac2b6e346ab

tdf#132603: sw: Add unittest

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