Bug 144244 - Crash when FILESAVE a calc file after delete some columns
Summary: Crash when FILESAVE a calc file after delete some columns
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.1.5.2 release
Hardware: All All
: highest critical
Assignee: Julien Nabet
URL:
Whiteboard: target:7.4.0 target:7.3.0.0.beta2 tar...
Keywords: bibisected, bisected, haveBacktrace, regression
: 146197 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-09-01 15:47 UTC by António Galvão
Modified: 2021-12-16 20:33 UTC (History)
8 users (show)

See Also:
Crash report or crash signature: ["mdds::multi_type_vector<mdds::mtv::custom_block_func1<mdds::mtv::noncopyable_managed_element_block<55,ScPostIt> >,mdds::detail::mtv::event_func>::get_block_position(unsigned int,unsigned int)"]


Attachments
An example of file that error happen (28.52 KB, application/vnd.oasis.opendocument.spreadsheet)
2021-09-01 15:49 UTC, António Galvão
Details
gdb bt (15.43 KB, text/plain)
2021-09-03 20:11 UTC, Julien Nabet
Details
bt with debug symbols (14.04 KB, text/plain)
2021-11-25 20:08 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description António Galvão 2021-09-01 15:47:07 UTC
Description:
When i open a xlsx file with calc, if i delete columns, libreoffice crash when i try save it.
If i save first as ods and open that file after, the same thing happens.
This error only happens in the latest versions.

Steps to Reproduce:
1.Open the file attached (saved from a xlsx file)
2.delete a column or more
3.save

Actual Results:
libreoffice crash

Expected Results:
save the file


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Version: 7.1.5.2 / LibreOffice Community
Build ID: 10(Build:2)
CPU threads: 4; OS: Linux 5.3; UI render: default; VCL: gtk3
Locale: pt-PT (pt_PT.UTF-8); UI: pt-PT
Ubuntu package version: 1:7.1.5~rc2-0ubuntu0.20.04.1~lo1
Calc: threaded
Comment 1 António Galvão 2021-09-01 15:49:18 UTC
Created attachment 174705 [details]
An example of file that error happen
Comment 2 Telesto 2021-09-03 17:29:20 UTC
Repro
Version: 7.3.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 05ff3d67d0e2e436406786c949eb7cfca107ba33
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL

not with
Version: 6.4.0.0.beta1+ (x64)
Build ID: 20be5cd0bdc57d812bf34a2debfe48caa51de881
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: GL; VCL: win; 
Locale: nl-NL (nl_NL); UI-Language: en-US
Calc: CL
Comment 3 Julien Nabet 2021-09-03 20:11:39 UTC Comment hidden (obsolete)
Comment 4 Timur 2021-09-06 12:22:50 UTC
No repro 7.0, regression in 7.1, repro 7.3+.
Comment 5 Timur 2021-09-06 12:52:00 UTC
Regression in 7.1 from:

commit ad88dd7082fdfbd1e61de4d8305f98394e0a8d9c
Date:   Thu Nov 12 13:45:27 2020 +0100
    source 3238606c8470f3eaeada3fc601e186ec5cfac925
    pre 5006e4fe6bd5e5a176e2e1837e826a0b67da08e7

author	Regina Henschel <rb.henschel@t-online.de>	2020-11-11 
committer	Regina Henschel <rb.henschel@t-online.de>	2020-11-12 
tdf138138 Apply shape shift also to NoRotatedAnchor
Comment 6 Timur 2021-09-13 10:49:29 UTC
Hi Regina. Could you please check what seems like regression from your commit.
Comment 7 Xisco Faulí 2021-09-15 09:08:24 UTC
@Eike, @Mike, I thought you might be interested in this issue
Comment 8 Julien Nabet 2021-11-25 20:08:06 UTC
Created attachment 176507 [details]
bt with debug symbols

Here's an updated bt but it still shows the same.

I confirm reverting ad88dd7082fdfbd1e61de4d8305f98394e0a8d9c (quoted in comment 5)  makes the crash disappear.
Comment 9 Julien Nabet 2021-11-25 21:05:29 UTC
I gave a try with this patch, it didn't crash:
https://gerrit.libreoffice.org/c/core/+/125852
make sc.check didn't display pb for sc/qa/unit/scshapetest

As indicated in the patch, I thought it could be relevant to use the same controls for ScDrawObjData retrieved by GetNonRotatedObjData as we do with ScDrawObjData retrieved with GetObjDataTab.
Comment 10 Commit Notification 2021-12-01 14:15:16 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/1d45f84bd08c8d196fcf3c9baaf2cad010884e5c

tdf#144244: fix crash when FILESAVE a calc file after delete some columns

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 11 Commit Notification 2021-12-01 15:21:59 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

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

tdf#144244: sc_uicalc: Add unittest

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 12 Commit Notification 2021-12-01 16:10:56 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "libreoffice-7-3":

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

tdf#144244: fix crash when FILESAVE a calc file after delete some columns

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 13 Commit Notification 2021-12-01 17:12:06 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "libreoffice-7-2":

https://git.libreoffice.org/core/commit/788859c02f11d264ab04cec4a29a1bcaafc05c18

tdf#144244: fix crash when FILESAVE a calc file after delete some columns

It will be available in 7.2.4.

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 14 Julien Nabet 2021-12-01 18:11:25 UTC
Thank you Xisco for the cherry-picks! :-)
Comment 15 Christian Lohmaier 2021-12-06 13:30:12 UTC
7.2.4 was a hotfix release, updating target in status-whiteboard
Comment 16 Xisco Faulí 2021-12-13 19:55:52 UTC
*** Bug 146197 has been marked as a duplicate of this bug. ***
Comment 17 BogdanB 2021-12-16 20:33:59 UTC
No crash in
Version: 7.4.0.0.alpha0+ / LibreOffice Community
Build ID: d47628f287f4377394c4ff488c433bfe254b6abe
CPU threads: 4; OS: Linux 5.11; UI render: default; VCL: gtk3
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
Calc: threaded