Bug 84762 - F9 cell update fails in sheet with combination of randomnumber() with reference to other cells
Summary: F9 cell update fails in sheet with combination of randomnumber() with referen...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.3.2.2 release
Hardware: Other All
: high normal
Assignee: Eike Rathke
URL:
Whiteboard: target:5.1.0 target:5.0.0.3 target:4....
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2014-10-07 17:16 UTC by joachim.schwender
Modified: 2021-02-02 19:48 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file where F9 updating fails (27.94 KB, application/vnd.oasis.opendocument.spreadsheet)
2014-10-07 17:16 UTC, joachim.schwender
Details

Note You need to log in before you can comment on or make changes to this bug.
Description joachim.schwender 2014-10-07 17:16:42 UTC
Created attachment 107510 [details]
Example file where F9 updating fails

Updating cells  with F9 fails in a sheet with multiple cells, containing a combination of randomnumber() with reference to other cells. Shift+Ctrl+F9 works, any cell input works, just F9 causes updating of cell by cell.

Reproduce:
Open File with Version 4.3.2 (I have Linux x64), and press F9.
Expected: all fields must change because they contain random numbers.
Observation: cells are updated in a strange pattern cell by cell.

The bug is not observed if all cells do contain only randomnumber() function. If you delete content in the light green cells, F9 updates all cells at once.
Comment 1 raal 2014-10-08 18:49:30 UTC
I can reproduce with Version: 4.3.3.0.0+
Build ID: 14907346d792f2f93a00083bbab5086cf56ddb24
TinderBox: Linux-rpm_deb-x86_64@46-TDF, Branch:libreoffice-4-3, Time: 2014-09-26_03:56:08

Unable to reproduce with LO 4.2.6, regression
Comment 2 ign_christian 2014-10-09 06:38:01 UTC
Also reproduced with this data in cells A1:B2 on new blank spreadsheet: 

=RAND() =RAND()*A1
=RAND() =RAND()*A2

1st F9 will update all cells, 2nd F9 and so on will update 1by1 per row.

Reproduced with LO 4.3.2.2 - Ubuntu 12.04 x86

No repro with LO 4.3.1.2 -> regression started in 4.3.2.x
Comment 3 ign_christian 2014-10-09 06:46:31 UTC
It's ok (correct) with LO 4.2.7.1
Comment 4 joachim.schwender 2014-11-05 17:46:53 UTC
Bus is still present in Version 4.3.3.2
Comment 5 Michael Weghorn 2014-12-12 19:48:34 UTC
I bibisected it on Debian Jessie and got the result below.

As far as I understand, the version somehow does not seem to match with the previous comments, as the respective commit where the bug occurs for the first time says its version is "Version: 4.4.0.0.alpha0+" (in "Help" -> "About LibreOffice Dev").
The commit 3e965dd5a8232692695a640531e51d25aa5fa06b works, though its version is also shown as "4.4.0.0.alpha0+".

In my understanding, that somehow does not seem to match with the comments that the bug occurs in 4.3.3.0.0+ and in 4.3.3.2.

Probably, I just misunderstand something here?

# bad: [0777cd085a7633a48e03d25948cc67fce87b7ac7] source-hash-b800d0b6ad74ce4a9adb23b865dd174d1eefa47b
# good: [812c4a492375ac47b3557fbb32f5637fc89d60d9] source-hash-dea4a3b9d7182700abeb4dc756a24a9e8dea8474
git bisect start 'latest' 'oldest'
# bad: [8677ba6e74a774fb44ec7831f14e53d8663f59ed] source-hash-eb213e490d9a366477b921d1a408d85c4638499e
git bisect bad 8677ba6e74a774fb44ec7831f14e53d8663f59ed
# good: [42455e7bcd46db5523f7f8e1931bbd0bd4b51cfc] source-hash-b5608fd429790a3d1153341b2c86303b7090b15a
git bisect good 42455e7bcd46db5523f7f8e1931bbd0bd4b51cfc
# good: [c9abb8ae2eeeb1a6cadaa848b61cdeaec2fb8439] source-hash-4ef4cf11c0c214e27fdc91ac75ccc49bfac05e71
git bisect good c9abb8ae2eeeb1a6cadaa848b61cdeaec2fb8439
# good: [9c9945fdf79780aeb608e79f7dd3a9f06e137755] source-hash-1ea4f163c5a2f531dcfda7899b322636a735c618
git bisect good 9c9945fdf79780aeb608e79f7dd3a9f06e137755
# good: [258e084e9b9a18f5641f9d4df0b321467bec2560] source-hash-d718c1f65f850f7897b942c2e4415110132e51a5
git bisect good 258e084e9b9a18f5641f9d4df0b321467bec2560
# good: [3e965dd5a8232692695a640531e51d25aa5fa06b] source-hash-27d79b12e17a93f6e4eab2a3c09d423a4a04a63d
git bisect good 3e965dd5a8232692695a640531e51d25aa5fa06b
# bad: [a52a02efcd09ee44ee484effaef80391fa51ab2d] source-hash-2fb876d85ddbfea0e6b6a38f71135e3dbe4233bb
git bisect bad a52a02efcd09ee44ee484effaef80391fa51ab2d
# bad: [daf852f47d4f0d3e531138611c2d35d64a90460a] source-hash-fe9f8144c7a1a5e51544b4dacb8a2d7e70b321ee
git bisect bad daf852f47d4f0d3e531138611c2d35d64a90460a
# first bad commit: [daf852f47d4f0d3e531138611c2d35d64a90460a] source-hash-fe9f8144c7a1a5e51544b4dacb8a2d7e70b321ee
Comment 6 Matthew Francis 2014-12-27 11:38:49 UTC
The behaviour seems to have changed at the below commit. Before it, 'F9' refreshes all the cells using RAND(), after it only refreshes some

Adding Cc: to erack@redhat.com. Could you possibly take a look at this? Thanks


commit 0792aef9010007d5738723d8930990028bef2f9e
Author: Eike Rathke <erack@redhat.com>
Date:   Mon Aug 25 21:54:42 2014 +0200

    fdo#83067 also volatile cells need to listen to all references
    
    As we now broadcast also cell moves it is not sufficient anymore to add
    volatile cells only to the BCA_LISTEN_ALWAYS broadcaster, add them as
    listener to all referenced cells and ranges as usual.
    
    Change-Id: I7901b73db7e0c82c4bac302ae746810cbc16ea44
Comment 7 Eike Rathke 2015-07-09 00:13:29 UTC
That commit revealed a long standing flaw in the FormulaTree handling of recalc-always cells.
Comment 8 Commit Notification 2015-07-09 00:15:34 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

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

Resolves: tdf#84762 collect all recalc-always cells before setting any dirty

It will be available in 5.1.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 9 Eike Rathke 2015-07-09 00:33:15 UTC
Pending review
https://gerrit.libreoffice.org/16872 for 4-4
https://gerrit.libreoffice.org/16873 for 5-0
https://gerrit.libreoffice.org/16874 for 4-4-5
Comment 10 Commit Notification 2015-07-09 15:09:51 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-5-0":

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

Resolves: tdf#84762 collect all recalc-always cells before setting any dirty

It will be available in 5.0.0.3.

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 11 Commit Notification 2015-07-09 16:20:54 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-4-4":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=40775ba02d714f5abb0e8486d49c225b3199a222&h=libreoffice-4-4

Resolves: tdf#84762 collect all recalc-always cells before setting any dirty

It will be available in 4.4.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 12 Commit Notification 2015-07-10 14:33:53 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-4-4-5":

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

Resolves: tdf#84762 collect all recalc-always cells before setting any dirty

It will be available in 4.4.5.

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 13 Robinson Tryon (qubit) 2015-12-17 08:37:04 UTC Comment hidden (obsolete)
Comment 14 Commit Notification 2021-02-02 19:48:26 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/4c95b7415340b07fd94e8f374aa2dfbb070783f8

tdf#84762: sc_subsequent_filters: Add unittest

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.