Bug 146141 - Delete empty comment crash - Crash in: `anonymous namespace'::collectUIInformation
Summary: Delete empty comment crash - Crash in: `anonymous namespace'::collectUIInform...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.1.0.0.alpha0+
Hardware: All All
: high major
Assignee: Caolán McNamara
URL:
Whiteboard: target:7.4.0 target:7.3.0.0.beta2 tar...
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2021-12-09 09:42 UTC by jncressey
Modified: 2021-12-10 11:13 UTC (History)
2 users (show)

See Also:
Crash report or crash signature: ["`anonymous namespace'::collectUIInformation", "SwCursorShell::GotoFormatField(SwFormatField%20const%20&)"]


Attachments
click the dropdown on the comment and click 'delete comment' to cause crash (11.45 KB, application/zip)
2021-12-09 09:42 UTC, jncressey
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jncressey 2021-12-09 09:42:19 UTC
Created attachment 176832 [details]
click the dropdown on the comment and click 'delete comment' to cause crash

This bug was filed from the crash reporting server and is br-eb33a91a-55b5-4776-81f1-269ae70a2c8e.
=========================================

The crash occurred when deleting a comment that had an empty message in a docx document.

Deleting by right-clicking on the comment balloon did not cause a crash. But deleting by clicking the dropdown arrow on the comment balloon did cause a crash

I repeated a few times, deleting comments that had content that didn't crash, but deleting a comment that had 0 characters always crashed when deleting by the dropdown menu.
Comment 1 Xisco Faulí 2021-12-09 10:06:39 UTC
Regression introduced by:

https://cgit.freedesktop.org/libreoffice/core/commit/?id=091f244d4d68ea9973a502632c6aeee19d702139

author	Caolán McNamara <caolanm@redhat.com>	2020-09-28 12:32:56 +0100
committer	Caolán McNamara <caolanm@redhat.com>	2020-09-28 21:10:34 +0200
commit 091f244d4d68ea9973a502632c6aeee19d702139 (patch)
tree 9ebd536d2575385e75c0543eb14c6ee66f83d20c
parent fb48e9cca4b4ba26d20e1fdd0f9ee65e7ef54210 (diff)
Related: tdf#136985 restore focus to doc it wasn't initially in the comment

Bisected with: bibisect-linux64-7.1

Adding Cc: to Caolán McNamara
Comment 3 Caolán McNamara 2021-12-09 17:08:23 UTC
looks like a double delete, delete is selected, but the return of focus triggers an automatic delete of an empty comment too.
Comment 4 Commit Notification 2021-12-10 09:02:02 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/7c11589b54cfe212dfa90e5c3c29000c0c503748

Resolves: tdf#146141 don't double delete comments

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.
Comment 5 Commit Notification 2021-12-10 09:03:18 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-7-3":

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

Resolves: tdf#146141 don't double delete comments

It will be available in 7.3.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 6 Caolán McNamara 2021-12-10 09:04:41 UTC
done in trunk and 7-3, backport to 7-2 in gerrit
Comment 7 Commit Notification 2021-12-10 11:13:16 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-7-2":

https://git.libreoffice.org/core/commit/180ee81404522237c66a872cd0be718e79e00bfc

Resolves: tdf#146141 don't double delete comments

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