Bug 158551 - Crash in: mdds::mtv::soa::multi_type_vector<sc::CellStoreTraits>::cbegin() const on Paste Special with Operation
Summary: Crash in: mdds::mtv::soa::multi_type_vector<sc::CellStoreTraits>::cbegin() co...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.4.0.0 alpha0+
Hardware: x86-64 (AMD64) Linux (All)
: high critical
Assignee: Not Assigned
URL:
Whiteboard: target:24.8.0 target:7.6.5 target:24....
Keywords: bibisected, bisected, haveBacktrace, regression
Depends on:
Blocks: Paste-Special Crash regressions-InitialColCount-to-1
  Show dependency treegraph
 
Reported: 2023-12-05 16:08 UTC by Stéphane Guillou (stragu)
Modified: 2023-12-15 08:11 UTC (History)
3 users (show)

See Also:
Crash report or crash signature: ["mdds::mtv::soa::multi_type_vector<sc::CellStoreTraits>::cbegin() const"]


Attachments
bt with debug symbols (11.97 KB, text/plain)
2023-12-05 20:52 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stéphane Guillou (stragu) 2023-12-05 16:08:59 UTC
This bug was filed from the crash reporting server and is br-01ba8184-19fe-44d5-9930-07503d20d9c8.
=========================================

Steps:
1. Copy cell A1
2. Paste special (Ctrl + Shift + V) in a different cell
3. In the dialog, tick "Objects" and one of of the "Operations" (Add, Subtract, Multiply or Divide)

Examples of crash report:
* 7.6: https://crashreport.libreoffice.org/stats/crash_details/218d8d7d-59c9-4f77-a1a8-b3754b305d9c
* 7.5: https://crashreport.libreoffice.org/stats/crash_details/8606e3ca-212c-4f81-9b4e-698b2d7670c8 with different crash signature: mdds::mtv::soa::multi_type_vector<mdds::mtv::custom_block_func3<mdds::mtv::default_element_block<52, svl::SharedString>, mdds::mtv::noncopyable_managed_element_block<53, EditTextObject>, mdds::mtv::noncopyable_managed_element_block<54, ScFormulaCell> >, s 
* 7.4, signature as above: https://crashreport.libreoffice.org/stats/crash_details/2364efcf-142f-4c72-bb00-5c50160f4ac5

Repro in:

Version: 7.4.7.2 / LibreOffice Community
Build ID: 723314e595e8007d3cf785c16538505a1c878ca5
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

up to a recent trunk build:

Version: 24.2.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: 43967453e15e1d054972a7586cfef8f8e0866270
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

Bibisected with linux-64-7.4 repo to first bad build commit [d14c498f036bf5f6f99503115eeec2a72bd1ba83] which points to:

commit 9e2d48b9e04f7ea895fb095699c32ed8a44eb129
author	Luboš Luňák 	Wed Mar 30 11:58:04 2022 +0200
committer	Luboš Luňák 	Thu Apr 28 05:51:53 2022 +0200
reduce Calc's INITIALCOLCOUNT to 1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133311

Upping the priority as Luboš is not active anymore.
Comment 1 Julien Nabet 2023-12-05 20:52:32 UTC
Created attachment 191260 [details]
bt with debug symbols

On pc Debian x86-64 with master sources updated today, I could reproduce this.
Comment 2 Julien Nabet 2023-12-06 12:12:08 UTC
I gave a try with https://gerrit.libreoffice.org/c/core/+/160389 but am really not sure if it's the right way to fix this (so won't assign myself for the moment).
Comment 3 Commit Notification 2023-12-14 09:28:08 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/3282756b7984457c79044d08127a4def64905979

tdf#158551: fix crash Paste Special with Operation (mdds)

It will be available in 24.8.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 4 Commit Notification 2023-12-14 15:49:19 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

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

tdf#158551: sc_uicalc: Add unittest

It will be available in 24.8.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 2023-12-14 16:05:24 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "libreoffice-7-6":

https://git.libreoffice.org/core/commit/3bbde86682ef130f7e30343ddd439d9d7f2ec197

tdf#158551: fix crash Paste Special with Operation (mdds)

It will be available in 7.6.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 6 Commit Notification 2023-12-14 16:05:27 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "libreoffice-24-2":

https://git.libreoffice.org/core/commit/78da3fde2df128d8d7caa2acd97d56cb374daf57

tdf#158551: fix crash Paste Special with Operation (mdds)

It will be available in 24.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 7 Xisco Faulí 2023-12-15 07:56:54 UTC
Hello Julien,
Should this issue be closed as RESOLVED FIXED ?
Comment 8 Julien Nabet 2023-12-15 08:11:36 UTC
(In reply to Xisco Faulí from comment #7)
> Hello Julien,
> Should this issue be closed as RESOLVED FIXED ?

Indeed! :-)