Download it now!
Bug 142932 - Crash when pasting cells with comments and "skip empty cells" option selected
Summary: Crash when pasting cells with comments and "skip empty cells" option selected
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.1.4.2 release
Hardware: All All
: medium normal
Assignee: Julien Nabet
URL:
Whiteboard: target:7.3.0 target:7.2.0.0.beta2 tar...
Keywords: bibisected, bisected, haveBacktrace, regression
Depends on:
Blocks:
 
Reported: 2021-06-18 14:06 UTC by Ming Hua
Modified: 2021-07-06 04:13 UTC (History)
3 users (show)

See Also:
Crash report or crash signature: ["ScColumn::DeleteBeforeCopyFromClip(sc::CopyFromClipContext &,ScColumn const &,sc::ColumnSpanSet &)"]


Attachments
Sample file that helps trigger the crash (8.60 KB, application/vnd.oasis.opendocument.spreadsheet)
2021-06-18 14:06 UTC, Ming Hua
Details
gdb bt (11.28 KB, text/plain)
2021-06-19 11:40 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ming Hua 2021-06-18 14:06:09 UTC
Created attachment 173006 [details]
Sample file that helps trigger the crash

Description:
When using "Paste Special" dialog to copy a row with comments for some cells, and "skip empty cells" option selected in that dialog, Calc crashes.

Steps to Reproduce:
1. Open attached sample file;
2. Click on "1" row header to select the whole first row;
3. Click on the "+" tab/button at the bottom to create a new sheet, cell A1 of the new sheet is automatically selected;
4. Click menu entry Edit > Paste Special > Paste Special... to get the dialog;
5. Leave the "Selection" checkboxes untouched, so "Text" selected and "Comments" unselected, among others;
6. Select "Skip empty cells" in the "Options" checkboxes;
7. Click "OK" button, Calc crashes.

Additional Information:
Reproduced with both 7.1.4 and 7.2.0 Beta1 on Windows 10:

Version: 7.1.4.2 (x64) / LibreOffice Community
Build ID: a529a4fab45b75fefc5b6226684193eb000654f6
CPU threads: 2; OS: Windows 10.0 Build 19041; UI render: Skia/Raster; VCL: win
Locale: zh-CN (zh_CN); UI: en-US
Calc: threaded

Version: 7.2.0.0.beta1 (x64) / LibreOffice Community
Build ID: c6974f7afec4cd5195617ae48c6ef9aacfe85ddd
CPU threads: 2; OS: Windows 10.0 Build 19041; UI render: Skia/Raster; VCL: win
Locale: zh-CN (zh_CN); UI: zh-CN
Calc: threaded

The crash report linked to is from 7.1.4.  For some reason my 7.2.0 Beta1 installation doesn't return a crash report URL.
Comment 1 Xisco Faulí 2021-06-18 14:42:47 UTC Comment hidden (obsolete)
Comment 2 Ming Hua 2021-06-18 15:05:05 UTC
(In reply to Xisco Faulí from comment #1)
> I believe you have to copy after step 2, isn't it ?
Yes of course.  I used shortcut Ctrl+C to copy.
Comment 3 Julien Nabet 2021-06-19 11:40:20 UTC
Created attachment 173011 [details]
gdb bt

On pc Debian x86-64 with master sources updated today + gen rendering, I could reproduce this.
Comment 4 Julien Nabet 2021-06-19 11:54:05 UTC
I gave a try with https://gerrit.libreoffice.org/c/core/+/117497
Comment 5 Xisco Faulí 2021-06-21 08:48:06 UTC
Forgot my previous comment, i can reproduce it in

Version: 7.2.0.0.beta1+ / LibreOffice Community
Build ID: d376297c643785564e7bda1a74b573c35ade6cb8
CPU threads: 4; OS: Linux 5.7; UI render: default; VCL: x11
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 6 Xisco Faulí 2021-06-21 09:02:35 UTC
Regression introduced by:

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

author	Noel Grandin <noel.grandin@collabora.co.uk>	2019-12-12 16:49:19 +0200
committer	Noel Grandin <noel.grandin@collabora.co.uk>	2019-12-13 07:04:49 +0100
commit	afad9ccb381a02b90654a5fa302480e46f38a1fc (patch)
tree	805e39b189c25d8dbd8ab932baca0fc0d7482d06
parent	d755b2d4a3340f42a90d15d4795cc947a0b18e4a (diff)
sc: rowcol: tdf#50916 pass ScDocument* around in data/

Bisected with bibisect-linux64-7.0
Comment 7 Commit Notification 2021-06-22 09:14:54 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

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

tdf#142932: fix crash when pasting cells with comments+"skip empty cells"

It will be available in 7.3.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 Commit Notification 2021-06-22 12:45:54 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "libreoffice-7-2":

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

tdf#142932: fix crash when pasting cells with comments+"skip empty cells"

It will be available in 7.2.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 9 Julien Nabet 2021-06-22 18:12:57 UTC
Cherry-pick for 7.1 branch waiting for review here:
https://gerrit.libreoffice.org/c/core/+/117637
Comment 10 Commit Notification 2021-06-22 19:46:27 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "libreoffice-7-1":

https://git.libreoffice.org/core/commit/0a8131d098e24842480c9c42b5e47accc7c59ce0

tdf#142932: fix crash when pasting cells with comments+"skip empty cells"

It will be available in 7.1.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.
Comment 11 Ming Hua 2021-07-06 04:13:11 UTC
Confirmed with 7.1.5 RC1:
Version: 7.1.5.1 (x64) / LibreOffice Community
Build ID: 2ca94649fd6dbdcab938c55c28b6a950a9634a34
CPU threads: 2; OS: Windows 10.0 Build 19041; UI render: default; VCL: win
Locale: zh-CN (zh_CN); UI: zh-CN
Calc: threaded

Thanks for the quick fix, Julien!