Bug 133629 - FORMATTING: Calc crashes on setting borders to all cells on more than one sheet simultaneously
Summary: FORMATTING: Calc crashes on setting borders to all cells on more than one she...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.3.0.0.alpha0+
Hardware: All All
: high major
Assignee: Not Assigned
URL:
Whiteboard: target:7.1.0 target:7.0.0.1 target:6....
Keywords: bibisected, bisected, haveBacktrace, regression
Depends on:
Blocks: Regressions-1024plus-Columns
  Show dependency treegraph
 
Reported: 2020-06-03 10:00 UTC by [REDACTED]
Modified: 2021-02-05 15:10 UTC (History)
3 users (show)

See Also:
Crash report or crash signature: ["ScColumn::ApplyBlockFrame(SvxBoxItem const &,SvxBoxInfoItem const *,long,long,bool,short)"]


Attachments
bt with debug symbols (gen) (8.86 KB, text/plain)
2020-06-03 11:39 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description [REDACTED] 2020-06-03 10:00:52 UTC
This bug was filed from the crash reporting server and is br-70af951e-6f1a-4886-b878-21fb16db05a7.
=========================================

Calc crashes when trying to set the borders on all cells on two or more sheets simultaneously.

Steps to reproduce:

1) Open a new calc spreadsheet
2) Add one or more additional sheets (i.e. a total of 2 or more sheets available)
3) Select all sheets on the sheets tabs
4) Select all cells by clicking the square at the intersection of row and column headers
5) Right click -> Format cells -> Tab: Borders
6) Make any border setting
7) Click OK button

-> Crash 


Actual Results: Crash on changing the borders

Expected Results: Borders should be set according to settings made in the format dialog on all selected cells.

Reproducible: Always

User Profile Reset: Yes

Issue found on:

Windows:

Version: 6.4.4.2 (x64), Build ID: 3d775be2011f3886db32dfd395a6a6d1ca2630ff
CPU threads: 4; OS: Windows 10.0 Build 18363; UI render: default; VCL: win; 
Locale: de-DE (de_DE); UI-Language: en-US, Calc: threaded

Linux:

Version: 6.4.4.2, Build ID: 3d775be2011f3886db32dfd395a6a6d1ca2630ff
CPU threads: 8; OS: Linux 4.12; UI render: default; VCL: kf5; 
Locale: en-US (en_US.UTF-8); UI-Language: en-US, Calc: threaded

Version: 6.3.6.2
Build ID: 2196df99b074d8a661f4036fca8fa0cbfa33a497
CPU threads: 8; OS: Linux 4.12; UI render: default; VCL: kde5; 
Locale: en-US (en_US.UTF-8); UI-Language: en-US, Calc: threaded

macOS:

Version: 6.4.4.2, Build ID: 3d775be2011f3886db32dfd395a6a6d1ca2630ff
CPU threads: 4; OS: Mac OS X 10.15.5; UI render: default; VCL: osx; 
Locale: en-US (en_GB.UTF-8); UI-Language: en-US, Calc: threaded

Crash *not* present in

Linux
Version: 6.2.8.2, Build ID: f82ddfca21ebc1e222a662a32b25c0c9d20169ee
CPU threads: 8; OS: Linux 4.12; UI render: default; VCL: kde5; 
Locale: en-US (en_US.UTF-8); UI-Language: en-US, Calc: threaded
Comment 1 Julien Nabet 2020-06-03 11:39:52 UTC
Created attachment 161567 [details]
bt with debug symbols (gen)

On pc Debian x86-64 with master sources updated today, I could reproduce this.
Comment 2 Julien Nabet 2020-06-03 11:46:27 UTC
Noel: thought you might be interested in this one.
I see several changes possible:
1) 
Simply replace
for (SCCOL i=nStartCol; i<=nEndCol; i++)
->
for (SCCOL i=nStartCol; i<nEndCol; i++)

2) Like in ScTable::ApplyStyleArea
  2741  // If we would like set all columns to specific style, then change only default style for not existing columns <== It's the case here
   2742 nEndCol = aCol.size() - 1;
   2743 for (SCCOL i = nStartCol; i <= nEndCol; i++)

3)
nEndCol = ClampToAllocatedColumns(nEndCol);

4) other?

Any thoughts here?
Comment 3 Xisco Faulí 2020-06-15 14:02:41 UTC
Regression introduced by:

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

author	Noel Grandin <noel.grandin@collabora.co.uk>	2019-02-01 15:15:16 +0100
committer	Mike Kaganski <mike.kaganski@collabora.com>	2019-04-05 13:43:52 +0200
commit 7282014e362a1529a36c88eb308df8ed359c2cfa (patch)
tree 2776ad9601f494330076ac58c08554e719c6ab3a
parent df30a4515b1303b0891baa53754fa9b3e47e0c02 (diff)
tdf#50916 Makes numbers of columns dynamic.

Bisected with: bibisect-linux64-6.3

Adding Cc: to Noel Grandin
Comment 4 Commit Notification 2020-06-23 16:42:19 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/8cad16207cb6d6df098d2a2f307df4fbc7519035

tdf#133629 calc, crash on format borders on multiple sheets

It will be available in 7.1.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 Xisco Faulí 2020-06-24 09:29:59 UTC
Verified in

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

@Noel, thanks for fixing this issue!
Comment 6 Commit Notification 2020-06-24 12:51:13 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "libreoffice-7-0":

https://git.libreoffice.org/core/commit/8f8a9956cc2110990f7e4c9ddad53e30bd792bd5

tdf#133629 calc, crash on format borders on multiple sheets

It will be available in 7.0.0.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 7 Commit Notification 2020-06-24 13:30:52 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "libreoffice-6-4":

https://git.libreoffice.org/core/commit/613f02ad81a6acc759fb16946e1f7bbdb30c18f6

tdf#133629 calc, crash on format borders on multiple sheets

It will be available in 6.4.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 8 Commit Notification 2020-06-24 18:45:06 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "libreoffice-6-4-5":

https://git.libreoffice.org/core/commit/2d77062bb358be3492df945369ef5517eb0f4b6e

tdf#133629 calc, crash on format borders on multiple sheets

It will be available in 6.4.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 9 Commit Notification 2021-02-05 15:10:40 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/81497d6f45769efba4b8de89a12f3f9987840815

tdf#133629: sc: Add UItest

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