Bug 69244 - Other: Recalculate does not always work if formula link to other sheets
Summary: Other: Recalculate does not always work if formula link to other sheets
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.1.0.0.beta2
Hardware: Other Windows (All)
: highest normal
Assignee: Kohei Yoshida
URL:
Whiteboard: BSA target:4.3.0 target:4.1.6 target:...
Keywords: regression
Depends on:
Blocks: mab4.1 mab4.2
  Show dependency treegraph
 
Reported: 2013-09-12 00:21 UTC by actuaryfrank
Modified: 2016-02-29 10:26 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
Test file with values not updated (15.21 KB, application/vnd.oasis.opendocument.spreadsheet)
2014-01-25 20:20 UTC, Laurent Balland
Details

Note You need to log in before you can comment on or make changes to this bug.
Description actuaryfrank 2013-09-12 00:21:14 UTC
Problem description: 

In some of my Calc speadsheets, some cells do NOT recalculate when I hit Recalculate (or F9).  Other cells do recalculate.  I have not experienced this problem with any prior version.

Current behavior:  In some spread sheets not all cells are recalculated when I hit the Recalculate button.  I have not been able to find a way to force those cells to recalculate in 4.1.1.2.

Expected behavior: All cells in every spreadsheet should recalculate when I hit Recalculate (or F9).

Fortunately I still have an earlier version on another pc, so I am using that until this problem is resolved.

              
Operating System: Windows 7
Version: 4.1.1.2 release
Last worked in: 4.1.0.4 release
Comment 1 m_a_riosv 2013-09-12 14:40:21 UTC
Hi actuaryfrank, thanks for reporting.

Sure you need to do a hard recalc [Ctrl+Shift+F9].
Please take a look to:
https://help.libreoffice.org/Calc/Recalculate
Comment 2 actuaryfrank 2013-09-12 16:07:14 UTC
Mariosv, thanks for the tip on doing a hard recalc (Ctrl+Shift+F9).  I
uninstalled 4.1.1.2 and reinstalled one of the 4.0 versions, which solved
the problem.  Later I will try reinstalling 4.1.1.2 and using your hard
recalc suggestion.

Actuary Frank


On Thu, Sep 12, 2013 at 7:40 AM, <bugzilla-daemon@freedesktop.org> wrote:

>  mariosv <mariosv@miguelangel.mobi> changed bug 69244<https://bugs.freedesktop.org/show_bug.cgi?id=69244>
>  What Removed Added  Status UNCONFIRMED NEEDINFO  CC
> mariosv@miguelangel.mobi  Ever confirmed   1
>
>  *Comment # 1 <https://bugs.freedesktop.org/show_bug.cgi?id=69244#c1> on bug
> 69244 <https://bugs.freedesktop.org/show_bug.cgi?id=69244> from mariosv<mariosv@miguelangel.mobi>
> *
>
> Hi actuaryfrank, thanks for reporting.
>
> Sure you need to do a hard recalc [Ctrl+Shift+F9].
> Please take a look to:https://help.libreoffice.org/Calc/Recalculate
>
>  ------------------------------
> You are receiving this mail because:
>
>    - You reported the bug.
>
>
Comment 3 m_a_riosv 2013-09-12 16:10:54 UTC
Are you saying that in 4.0 works without hard recalc?
Comment 4 actuaryfrank 2013-09-12 17:33:29 UTC
Yes...and in every prior version, I never found it necessary to use hard
recalc.  Also in earlier versions of OpenOffice prior to the advent of
LibreOffice.


On Thu, Sep 12, 2013 at 9:10 AM, <bugzilla-daemon@freedesktop.org> wrote:

>   *Comment # 3 <https://bugs.freedesktop.org/show_bug.cgi?id=69244#c3> on bug
> 69244 <https://bugs.freedesktop.org/show_bug.cgi?id=69244> from mariosv<mariosv@miguelangel.mobi>
> *
>
> Are you saying that in 4.0 works without hard recalc?
>
>  ------------------------------
> You are receiving this mail because:
>
>    - You reported the bug.
>
>
Comment 5 m_a_riosv 2013-09-12 19:34:29 UTC
Please could you attach a simple sample file where to verify the issue?

Also please do not attach the original mail, if you can answer here?
Comment 6 Laurent Balland 2014-01-25 20:20:10 UTC
Created attachment 92784 [details]
Test file with values not updated

Procedure:
1. Open attached file
2. Change value in D4 (active sheet "Data")

Expected behavior:
Values in A4, B4 and C4 should be updated.

Current behavior:
Values are unchanged even if the cells where their formula are pointing is updated

Hit Ctrl+Shift+F9 to update.

Tested versions:
- LibO Suse 4.1.4.2
- LibO 4.2.0.3

I tried to simplify as much my file. But if I removed the first sheet (which is now useless), then cells values are automatically updated.
Comment 7 Laurent Balland 2014-01-25 20:27:05 UTC
The formula not updated are of the type: "='Other sheet'.A1"

On large and complex file it is quite difficult to detect such errors.
Comment 8 Joel Madero 2014-01-25 20:50:09 UTC
I believe this is a duplicate and has been resolved in the last couple days. In the future if you nominate a bug to MAB please make sure to follow procedures (leave a comment on the MAB tracker explaining the bug and why you nominated it)

This one probably qualifies but like I said, almost positive it's resolved as of a couple days ago.

If you would like to test: http://dev-builds.libreoffice.org/daily/libreoffice-4-2/Win-x86@42/2014-01-24_14.53.30/

That's from about 24 hours ago - perhaps it's fixed there
Comment 9 Laurent Balland 2014-01-26 08:02:32 UTC
@Joel: Thanks for your advise. Add comment on mab. Did you test with the version you mentioned?

Confirmed with master build on 25th January 2013 (yesterday) 
Version: 4.3.0.0.alpha0+
Build ID: 83924113beb0ebfd6abbe6f8ca44fb929da0934c
Comment 10 Jean-Baptiste Faure 2014-01-26 08:39:03 UTC
Confirmed with version 4.2.0.3.0+ Build ID: b09fae12aaae3519559a1915d258525b5fbcfbca (2 commits after RC3) on Ubuntu 13.10 x86-64
With this version the first time I modify the cell D4, I need to hit ctrl+maj+F9 to force to update the dependent cells. But if I modify again the value in D4, the update is automatic.

Same behavior with master (Version: 4.3.0.0.alpha0+ Build ID: 574773ac298153b97237b3432b601a83938eaf6b) 

With both versions, if the first thing I do when the file is loaded is to hit ctrl+maj+F9, then further recalculations are automatic.

Best regards. JBF
Comment 11 Laurent Balland 2014-01-26 08:43:47 UTC
NOT confirmed with:
- Version 4.0.6.1 (Build ID: 7168152d13aa529ba3718c9ae3700216a574137)
- Version: 4.1.0.0.alpha1 Build ID: 67ce08e2c64a6615abc90d3a3c442f90d86fa69
- Version: 4.1.0.0.beta1 Build ID: 5271b34bec742e190e2fe5a7dadb7334a705b54

Confirmed with:
- Version: 4.1.5.1 Build ID: e0a1805d063a472a7b281ae3977a26d42a48b20
- Version: 4.1.0.4 Build ID: 89ea49ddacd9aa532507cbf852f2bb22b1ace28
- Version: 4.1.0.0.beta2 Build ID: 33224f4f11a05cfad2249e812fcc2975fbb61f6

Bug was introduced between beta1 and beta2
Comment 12 Laurent Balland 2014-01-26 08:44:31 UTC
Update version to 4.1.0.beta2
Comment 13 Laurent Balland 2014-01-26 09:37:09 UTC
Bibisect report:
 3fc000620d2a04e69e07fb1d3f929baa34791528 is the first bad commit
commit 3fc000620d2a04e69e07fb1d3f929baa34791528
Author: Bjoern Michaelsen <bjoern.michaelsen@canonical.com>
Date:   Thu Oct 17 09:21:19 2013 +0000

    source-hash-23583553d1a9951eaa33dfb598606cdf55d3f01a
    
    commit 23583553d1a9951eaa33dfb598606cdf55d3f01a
    Author:     Michael Stahl <mstahl@redhat.com>
    AuthorDate: Sun Jun 2 13:26:30 2013 +0200
    Commit:     Michael Stahl <mstahl@redhat.com>
    CommitDate: Sun Jun 2 20:37:57 2013 +0200
    
        mysqlcppconn: MSVC 2010 finally has grown a stdint.h
    
        Change-Id: I5b8d948aad94ba492075245c18c8ed781baa469e

:100644 100644 27848ba16c148657f41ac7b1df02e091a44dd29f 7beb466ac333cd27a5756f959c24f4514c12f47b M   ccache.log
:100644 100644 601e47632607a385493e43c480061748c2ca4c7b 57fbcee71fd8e9eb24ab4c293f9023f03784d884 M   commitmsg
:100644 100644 21e4be7670edb7af70f3d7bf4f3a21a45c2e09bd 35f68343cf886768eaa96263b6e4a8164eb92a05 M   dev-install.log
:100644 100644 fc4c2507cb79b70a4e64b27a328ce2b4507374f9 43d9c0d800f3e49309b6b8e5393c27810a50c177 M   make.log
:040000 040000 787f0b310a532028f6ef2a3b46651a6000091148 827d6a3eb295e2aabe319c0683bab9adc4e2e26e M   opt


git bisect log                                                                               
# bad: [25428b1e953636f74986622c5df614f04c150ed1] source-hash-cb4e009c4539c535108021934e545194b35cad9d                                                  
# good: [f0f6c65eb764f0303f59c58d320e9b0d5a894377] source-hash-4b9740b4ec3987e1d4d2ad6d20b4dcf996a4fa2e                                                 
git bisect start 'latest' 'oldest'                                                                                                                      
# good: [a72833796a7e527d9efc9ca6d8fe9b579e469105] source-hash-1472b5f87314fe660ef1a7b254e51272669f12f6                                                 
git bisect good a72833796a7e527d9efc9ca6d8fe9b579e469105                                                                                                
# bad: [b21386bf459ae47bd6e461ea94cea6a06729a1ff] source-hash-570fe620e9d573cfc9fc260e6518563c6a6c1a3c                                                  
git bisect bad b21386bf459ae47bd6e461ea94cea6a06729a1ff                                                                                                 
# bad: [8febbf1f26867388acf1d005b58978cbe4130d16] source-hash-7275a051677b5646e56623b3addc783880ce8e9b                                                  
git bisect bad 8febbf1f26867388acf1d005b58978cbe4130d16                                                                                                 
# good: [6cb2b7f87d8177ca4821dc91ba4af8a39e4591b9] source-hash-c4cca49f49408bc4094bdfcf782de2f7cd16ce6a                                                 
git bisect good 6cb2b7f87d8177ca4821dc91ba4af8a39e4591b9                                                                                                
# bad: [5c46119324ebec87377c20c785cc294f41da5933] source-hash-7ef1a64bdb8f9afaeb93e7a88219650381e0d323                                                  
git bisect bad 5c46119324ebec87377c20c785cc294f41da5933                                                                                                 
# bad: [3810df8c8da681154871a0672049967026b4eaf9] source-hash-44404b7a6c7bb3b95d03094abb745f29a5154959                                                  
git bisect bad 3810df8c8da681154871a0672049967026b4eaf9                                                                                                 
# bad: [5c29d79153b6a65f1e1d024df872441a86b40cab] source-hash-bb6ecd8b40313b7cc83d4e619029f4e001334a52                                                  
git bisect bad 5c29d79153b6a65f1e1d024df872441a86b40cab                                                                                                 
# bad: [3fc000620d2a04e69e07fb1d3f929baa34791528] source-hash-23583553d1a9951eaa33dfb598606cdf55d3f01a                                                  
git bisect bad 3fc000620d2a04e69e07fb1d3f929baa34791528                                                                                                 
# first bad commit: [3fc000620d2a04e69e07fb1d3f929baa34791528] source-hash-23583553d1a9951eaa33dfb598606cdf55d3f01a
Comment 14 Laurent Balland 2014-01-26 15:28:34 UTC
A workaround is to set option: Tools > Option > LibreOffice Calc > Formula: Recalculation on file load, ODF Spreadsheet (not saved by LibreOffice)
to "Always recalculate". Actually, recalculation is operated even if the file has been saved by LibreOffice.

But the bug is not there. Under LibO 4.0, this option was set to default as "Always recalculate". But if you change this option to "Never recalculate", there is no bug: values are correctly calculated.

With LibO 4.1.0.beta1, option is set to "Never recalculate" as default, and there is no bug: values are correctly calculated.

With LibO 4.1.0.beta2, option is the same, but values are not recalculated. If you set option to "Always recalculate", then the bug does not appear (it is just like typing Ctrl+Shift+F9 when opening file).
Comment 15 Andras Timar 2014-01-26 22:18:07 UTC
@Markus: you were working on that part of the code in this commit range.
Comment 16 Commit Notification 2014-01-28 00:12:02 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "master":

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

fdo#69244: Write unit test for this.



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 17 Commit Notification 2014-01-28 00:12:16 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "master":

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

fdo#69244: Avoid putting these cells in formula tree prematurely.



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 18 Kohei Yoshida 2014-01-28 00:21:29 UTC
I guess this is on me now...
Comment 19 Kohei Yoshida 2014-01-28 00:22:18 UTC
Backport request underway:

4.2: https://gerrit.libreoffice.org/7707
4.1: https://gerrit.libreoffice.org/7708
Comment 20 Commit Notification 2014-01-28 02:51:41 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "libreoffice-4-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=795c5e629987906dea66c690313b3aa1590d7887&h=libreoffice-4-1

fdo#69244: Avoid putting these cells in formula tree prematurely.


It will be available in LibreOffice 4.1.6.

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 21 Commit Notification 2014-01-28 02:52:00 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "libreoffice-4-2":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=7a7ef5a915f7e4f4a9a21b819ab1013d6333a8d8&h=libreoffice-4-2

fdo#69244: Avoid putting these cells in formula tree prematurely.


It will be available in LibreOffice 4.2.1.

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 22 Kohei Yoshida 2014-01-28 02:52:23 UTC
Fixed.
Comment 23 Michel Rudelle 2014-01-31 10:10:47 UTC
Verified with:
Version: 4.2.1.0.0+
Build ID: 92346fb7714ca7c6a467771d8a8b01305c1b17d1
TinderBox: Win-x86@42, Branch:libreoffice-4-2, Time: 2014-01-31_00:15:33
Vista-32b
It's OK, thanks