Bug 106051 - recalculate does not always work (simple sum operation)
Summary: recalculate does not always work (simple sum operation)
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.3.0.3 release
Hardware: x86-64 (AMD64) All
: high major
Assignee: Arul Michael
URL:
Whiteboard: target:5.4.0 target:5.3.4
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-16 19:15 UTC by kalyp
Modified: 2018-03-14 16:13 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
example of described bug (8.98 KB, application/vnd.oasis.opendocument.spreadsheet)
2017-02-16 19:16 UTC, kalyp
Details

Note You need to log in before you can comment on or make changes to this bug.
Description kalyp 2017-02-16 19:15:31 UTC
Description:
I attach an example file but you can build your own. Reproducible every time for me. A sum depending on cells themselves sum does not recalculate, when defined from a dragged formula. 

Steps to Reproduce:
1. Put random numbers in a corner - in the example A1 to C4.
2. Below the first column, calculate the sum then drag right to do the same for all columns (cells A5-D5)
3. Right of the first line, calculate the line sum then drag down to do the same for all lines including the last, "summed" line (cells D1-D5). I get 182 in D5.
4. Just below, copy exactly D5 ie "=SUM(A5:C5)". I get 182 too.
(or replace steps 1-4 by opening the attached spreadsheet)
5. Select a line (eg 3) and hit "delete". Cells in line 3 are now empty. 

Actual Results:  
Totals recalculate EXCEPT for cell D5 (who depends on A5-C5), staying at 182. F9 solves the problem. Interestingly enough cell D6 (that was manually edited instead of dragging the formulas down) works just fine, updating to 132.
Also interestingly, inserting an empty line between lines 4 & 5 prior to deleting line 3 makes it work correctly.

Expected Results:
Both cells D5 & D6 should recalculate when deleting a line above - only D6 does.


Reproducible: Always

User Profile Reset: No

Additional Info:
Didn't reset my user profile but same problem on a different, new machine.
I put the severity as "normal" but personally for me, it is major - I can't trust my calculations anymore and need to recalculate everything whenever I change something.


User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36
Comment 1 kalyp 2017-02-16 19:16:23 UTC
Created attachment 131284 [details]
example of described bug
Comment 2 Julien Nabet 2017-02-17 13:43:53 UTC
On Win7 with LO 5.3.0.3, I could reproduce this.

Remark: you must empty the line not delete it because in this case, the sum is ok.

I increase priority because it concerns several envs and it gives wrong results by just calling sum function.
Comment 3 Julien Nabet 2017-02-17 13:45:52 UTC
I also could reproduce this with a brand new file by using the same method as described by the reporter.
Comment 4 Julien Nabet 2017-02-17 13:48:07 UTC
I could also reproduce this with brand new profile with or without OpenCL disabled.
Comment 5 Fakabbir amin 2017-02-18 15:10:24 UTC Comment hidden (off-topic)
Comment 6 Eike Rathke 2017-05-11 23:37:23 UTC Comment hidden (off-topic)
Comment 7 Commit Notification 2017-05-12 15:20:20 UTC
Arul Michael committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=c882c60f54cc90740a674eed8c47bde0e9959652

tdf#106051 Notify listeners on top and bottom of split formula group

It will be available in 5.4.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 8 Commit Notification 2017-05-12 19:08:44 UTC
Arul Michael committed a patch related to this issue.
It has been pushed to "libreoffice-5-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=f55f0b57b1f206763e97065f6121fcb55c53e53d&h=libreoffice-5-3

tdf#106051 Notify listeners on top and bottom of split formula group

It will be available in 5.3.4.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 9 Cor Nouws 2017-07-11 11:47:55 UTC
(In reply to Commit Notification from comment #8)
> Arul Michael committed a patch related to this issue.
> It has been pushed to "libreoffice-5-3":
> 
> http://cgit.freedesktop.org/libreoffice/core/commit/
> ?id=f55f0b57b1f206763e97065f6121fcb55c53e53d&h=libreoffice-5-3


Works fine in Version: 6.0.0.0.alpha0+
Build ID: 959be1b5a9cd522394dba9366686a1256588223b
CPU threads: 4; OS: Linux 4.10; UI render: GL; VCL: gtk2; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2017-07-11_00:18:59
Locale: nl-NL (nl_NL.UTF-8); Calc: group

Thanks for fixing Arul!
Comment 10 g4827387 2018-01-05 06:16:40 UTC
This issue still exists in Version: 5.3.4.2.
Comment 11 g4827387 2018-01-05 06:33:04 UTC
Just upgraded to 5.4.4.2 and happy to report that the problem seems to be resolved.
Comment 12 Anne 2018-03-14 16:13:57 UTC
I have upgraded to 5.4.5.1 and still auto sum does not work!