As in the title, works with 3 points or 2 prior. /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../include/c++/10.2.0/debug/vector:427: In function: std::__debug::vector::reference std::__debug::vector<double, std::allocator<double>>::operator[](std::__debug::vector::size_type) [_Tp = double, _Allocator = std::allocator<double>] Error: attempt to subscript container with out-of-bounds index 1, but container only holds 1 elements. Objects involved in the operation: sequence "this" @ 0x0x55d8ea1a98b0 { type = std::__debug::vector<double, std::allocator<double> >; } To test, create a line chart, add a trend line, and set the parameter as given.
Created attachment 171206 [details] gdb bt On pc Debian x86-64 with master sources updated today, I could reproduce this. I attached a bt with some gdb.
Samuel: noticing https://cgit.freedesktop.org/libreoffice/core/commit/?id=a9b71098845edcb4f6b4629795168d174f28ef70 author Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de> 2021-03-09 09:44:24 +0100 committer Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de> 2021-03-10 08:37:59 +0100 commit a9b71098845edcb4f6b4629795168d174f28ef70 (patch) tree 5c65be57ca1b8b55794e617460ee7e06bb9cf50d parent 96388e5e809a48573970df9b6b2649517a08447f (diff) tdf#133423 Fix 'central' formula for moving average
I'm trying to follow the code reading https://docs.oasis-open.org/office/OpenDocument/v1.3/cs02/part3-schema/OpenDocument-v1.3-cs02-part3-schema.html#property-chart_regression-moving-type, I don't understand why we calculate "yAvg" whereas it talks about "averaged-abscissa" ; I would have expected "xAvg" since (abscissa corresponds to "x"). Did I miss something?
Can you please attach a bugdoc? I can't reproduce this currently.
Created attachment 171211 [details] Test case Just set Period to 2 and see it crash on Okay.
Proposed fix: https://gerrit.libreoffice.org/c/core/+/114121
Samuel Mehrbrodt committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/a6066989f7d346d0d43f8db46b12786546f769e8 tdf#141689 Fix crash in 'Central' moving avg function 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.