Bug 146068 - Calc crashes when trend line using MA(central) lacks data
Summary: Calc crashes when trend line using MA(central) lacks data
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.2.0.4 release
Hardware: All All
: medium normal
Assignee: Caolán McNamara
URL: https://crashreport.libreoffice.org/s...
Whiteboard: target:7.6.0 target:7.4.7 target:7.5.4
Keywords: implementationError
: 151535 (view as bug list)
Depends on:
Blocks: Chart-Trendlines Crash
  Show dependency treegraph
 
Reported: 2021-12-05 23:49 UTC by Hernan
Modified: 2023-10-19 09:44 UTC (History)
5 users (show)

See Also:
Crash report or crash signature: ["chart::MovingAverageRegressionCurveCalculator::calculateValuesCentral(std::pair<std::vector<double,std::allocator<double> >,std::vector<double,std::allocator<double> > >)"]


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hernan 2021-12-05 23:49:45 UTC
Description:
When a graph in Calc includes a trend line using MA (variant: central), if the data is deleted or cut, the program crashes.

Steps to Reproduce:
1. In a blank Calc sheet, create a range of data , say 1,2,3,4 in cells A1:A4
2. Select the data and insert a Graph (column or line type).
3. Insert a trend line, type MA 2 , variant central
4. Click outside the graph, select the data range , and cut it (Ctrl-X)

Actual Results:
Program crashes.
And the recovery attempts fail.

Expected Results:
Should not crash.


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Version: 7.2.2.2 (x64) / LibreOffice Community
Build ID: 02b2acce88a210515b4a5bb2e46cbfb63fe97d56
CPU threads: 6; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win
Locale: es-AR (es_AR); UI: en-US
Calc: CL
Comment 1 Ezinne 2021-12-13 05:58:05 UTC
Reproducible in:

Version: 7.4.0.0.alpha0+ / LibreOffice Community
Build ID: d272bf4f8f3a083b8c37f7b10f89cd2bf76b7d21
CPU threads: 8; OS: Linux 5.11; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 2 Commit Notification 2023-04-17 15:04:19 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/13a2ca25e4b16a6ac310c03ec9b543c774a0df6c

Resolves: tdf#146068 don't crash when MA(central) lacks data

It will be available in 7.6.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 3 Caolán McNamara 2023-04-17 15:05:39 UTC
done in trunk, backport to 7-5 and 7-4 in gerrit
Comment 4 Commit Notification 2023-04-18 09:49:16 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-7-4":

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

Resolves: tdf#146068 don't crash when MA(central) lacks data

It will be available in 7.4.7.

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-04-18 09:49:19 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-7-5":

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

Resolves: tdf#146068 don't crash when MA(central) lacks data

It will be available in 7.5.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 6 Stéphane Guillou (stragu) 2023-10-19 09:41:35 UTC
Was also on Linux, with different signatures:

LO 7.3.7.2:
["chart::MovingAverageRegressionCurveCalculator::recalculateRegression(com::sun::star::uno::Sequence<double> const&, com::sun::star::uno::Sequence<double> const&)"]
https://crashreport.libreoffice.org/stats/crash_details/b6f749dc-c618-4325-b6ec-45fbd67bf4c1

LO 7.2.0.4:
https://crashreport.libreoffice.org/stats/crash_details/449a8a0d-5910-4f54-9180-8fa5d15bd903
["chart::MovingAverageRegressionCurveCalculator::calculateValuesCentral(std::pair<std::vector<double, std::allocator<double> >, std::vector<double, std::allocator<double> > >)"]

... too long to fit in the Crash signature field.

The different types of moving averages weren't available before 7.2, so assuming an implementation error from bug 133423.

No crash in current trunk build.
Comment 7 Stéphane Guillou (stragu) 2023-10-19 09:44:24 UTC
*** Bug 151535 has been marked as a duplicate of this bug. ***