Bug 130179 - CRASH: inserting comment to picture
Summary: CRASH: inserting comment to picture
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.4.0.0.alpha0+
Hardware: All All
: highest critical
Assignee: Miklos Vajna
URL:
Whiteboard: target:6.5.0 target:6.4.1
Keywords: bibisected, bisected, haveBacktrace, regression
Depends on:
Blocks:
 
Reported: 2020-01-24 19:17 UTC by Xisco Faulí
Modified: 2020-01-29 09:42 UTC (History)
3 users (show)

See Also:
Crash report or crash signature: ["SwWrtShell::InsertPostIt(SwFieldMgr &,SfxRequest const &)"]


Attachments
sample file (632.99 KB, application/vnd.oasis.opendocument.text)
2020-01-24 19:17 UTC, Xisco Faulí
Details
bt with debug symbols (10.37 KB, text/plain)
2020-01-24 20:47 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Xisco Faulí 2020-01-24 19:17:11 UTC
Created attachment 157411 [details]
sample file

Steps to reproduce:
1. Open attached document
2. Click on the picture
3. Insert - Comment

-> Crash

Reproduced in

Version: 7.0.0.0.alpha0+
Build ID: 6b4fe3e44b4daa89fef6a3385919b00472eaed60
CPU threads: 4; OS: Linux 4.19; UI render: default; VCL: gtk3; 
Locale: en-US (en_US.UTF-8); UI-Language: en-US
Calc: threaded
Comment 1 Xisco Faulí 2020-01-24 19:18:35 UTC
Regression introduced by:

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

author	Miklos Vajna <vmiklos@collabora.com>	2019-07-04 17:40:09 +0200
committer	Miklos Vajna <vmiklos@collabora.com>	2019-07-04 18:22:06 +0200
commit	b382025abcd05ff75dd2cbe46df76213d4913f00 (patch)
tree	792ea8a0298faaf531379b5793af5f98a52c459c
parent	9a4980c3b16a8068d6ebba8377d2c5c0cb4b2367 (diff)
sw comments on frames: fix comment insert for as-char frame at para start

Bisected with: bibisect-linux64-6.4

Adding Cc: to Miklos Vajna
Comment 2 Julien Nabet 2020-01-24 20:47:48 UTC
Created attachment 157415 [details]
bt with debug symbols

On pc Debian x86-64 with master sources updated today, I got an assertion
Comment 3 Julien Nabet 2020-01-24 21:19:04 UTC
With LO Debian package 6.3.4, I can't reproduce this because "Insert comment" is disabled when clicking on the picture.
Comment 4 Xavier Van Wijmeersch 2020-01-25 06:42:42 UTC
I can reproduce with

Version: 7.0.0.0.alpha0+
Build ID: d52384260c4a8f096945b33b89430398ffa69431
CPU threads: 8; OS: Linux 5.4; UI render: default; VCL: gtk3; 
Locale: nl-BE (en_US.UTF-8); UI-Language: en-US
Calc: threaded
Comment 5 Mike Saunders 2020-01-25 11:24:52 UTC
(In reply to Julien Nabet from comment #3)
> With LO Debian package 6.3.4, I can't reproduce this because "Insert
> comment" is disabled when clicking on the picture.

Yes, it's a new feature introduced with LO 6.4.
Comment 6 Miklos Vajna 2020-01-27 14:05:21 UTC
I'll take a look. The image commenting is meant to work only with as-char/at-char images, the UI should be disabled for the at-para case.
Comment 7 Commit Notification 2020-01-27 19:54:25 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

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

tdf#130179 sw comments on frames: limit insert UI for at-char and ...

It will be available in 6.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 8 Xisco Faulí 2020-01-28 09:14:07 UTC
I do confirm the issue is fixed in

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

as adding comment is disabled.
@Miklos, thanks for fixing this issue!
Comment 9 Commit Notification 2020-01-29 09:42:08 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-6-4":

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

tdf#130179 sw comments on frames: limit insert UI for at-char and ...

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