Description: Having a large table (ex. 200000 rows) - may be a single column -, deleting a large number of rows or cells breaks a formula (like sum, for example) that refers to them. Steps to Reproduce: 1. Create a big table of 200000 lines. For this example may be a single column from A1:A200000 filled with 1. This could be achieved by going to cell A200000, use ctrl+shift+uparrow to select up to A1, type 1 followed by alt+shift+enter 2. Enter in cell A200001 (for example) the formula =SUM(A1:200000) 3. Delete rows (or cells - not their content) A2 to A199998 (for example) Actual Results: The entered formula (SUM), now in cell A4, gives Error:522 and contain formula =SUM(A1:A196611) Expected Results: The formula should be =SUM(A1:A3) with result 3. Reproducible: Always User Profile Reset: Yes Additional Info: This happens with other formulas. Not only the SUM. Versão: 6.0.6.2 ID da versão: 1:6.0.6-0ubuntu0.18.04.1 Processos do CPU: 8; SO: Linux 4.15; Gestão da interface: padrão; VCL: kde4; Configuração regional: pt-PT (pt_PT.UTF-8); Calc: group
Reproducible Versión: 4.2.0.0.beta1 Id. de compilación: f4ca7b35f580827ad2c69ea6d29f7c9b48ebbac7 up to Version: 6.2.0.0.alpha1 (x64) Build ID: ff46ad24d1d3cbcea45895520483ed1fd4ff488b CPU threads: 4; OS: Windows 10.0; UI render: GL; VCL: win; Locale: es-ES (es_ES); Calc: CL Works with: Versión: 4.1.6.2 Id. de compilación: 40ff705089295be5be0aae9b15123f687c05b0a Seems it begun with deep evolution of calc in 4.2
Created attachment 146071 [details] test case reproducible with: Version: 6.1.3.1 (x64) Build-ID: a9670562c26181ec3afbe381c9ff499ae88c98b7 CPU-Threads: 4; BS: Windows 10.0; UI-Render: Standard; Gebietsschema: de-DE (de_DE); Calc:
Bibisected to the following range using repo bibisect_win_44. https://cgit.freedesktop.org/libreoffice/core/log/?qt=range&q=6a0985eca284e6e2eb6a80e284ab5c59d8b005f7..1eb82c78a223d9a0b2bb5c3f5c129c1ee8bdf303 Most likely culprit: author Kohei Yoshida <kohei.yoshida@collabora.com> 2014-10-27 07:32:32 -0700 committer Kohei Yoshida <kohei.yoshida@collabora.com> 2014-10-27 07:37:38 -0700 "fdo#85282: Correct adjustment of range reference on delete & shift." Bug 85282 started with 4.2, I wonder if that's what m.a.riosv encountered in comment 2, or this bug occurs earlier with different steps.
Kohei was the one who did such big and amazing work in calc's core for 4.2. https://wiki.documentfoundation.org/ReleaseNotes/4.2#Calc_2 But I think, currently, he is not taking bugs on LibreOffice.
Checked with bibisect-44max, and indeed the commit is the one identified in comment 3. https://cgit.freedesktop.org/libreoffice/core/commit/?id=c3c16d5b74fb5707691283538a969a03c2f918b0
reproducible wtih Version: 4.4.7.2 Build-ID: f3153a8b245191196a4b6b9abd1d0da16eead600 Gebietsschema: de_DE but *not* reproducible with Version 3.6.7.2 (Build ID: e183d5b)
reproducible with: Version: 6.3.0.0.alpha0+ (x64) Build ID: f8251c40b4c512b6ea54ea2207a3816d8b925711 CPU threads: 4; OS: Windows 10.0; UI render: default; VCL: win; Locale: de-DE (de_DE); UI-Language: en-US Calc: it does not matter, if "Calc:threaed" is enabled or disabled: Menu Tools/Options.../LibreOffice Dev Calc/Calculate CPU threading settings [ ] Enable multithreaded calculation
Deena Francis committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/3b8e554b69de349a20d10ec90b27ab71a013b464 tdf#120948: row deltas should be stored as SCROW... It will be available in 6.5.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.
Fixed in master.
Deena Francis committed a patch related to this issue. It has been pushed to "libreoffice-6-4": https://git.libreoffice.org/core/commit/1ca0986bcc82e9fcfad055617359b619af53c794 tdf#120948: row deltas should be stored as SCROW... It will be available in 6.4.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.
Deena Francis committed a patch related to this issue. It has been pushed to "libreoffice-6-3": https://git.libreoffice.org/core/commit/ab6720ec8a9359212fe3ea4f71037acd0b5709fa tdf#120948: row deltas should be stored as SCROW... It will be available in 6.3.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.
OK. Tested for 6.4.0.1.. No problems so far. Thanks.