Bug 94186 - Let A, B empty cells than A+B/2=2 under certain conditions
Summary: Let A, B empty cells than A+B/2=2 under certain conditions
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.0.1.2 release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisectRequest, regression
Depends on:
Blocks:
 
Reported: 2015-09-13 12:52 UTC by Markus Benter
Modified: 2020-05-25 10:27 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
Minimal Example (22.90 KB, application/vnd.oasis.opendocument.spreadsheet)
2015-09-13 12:52 UTC, Markus Benter
Details
The Calculation (2.60 KB, image/png)
2015-09-13 12:55 UTC, Markus Benter
Details
The result of A+B (888 bytes, image/png)
2015-09-13 12:56 UTC, Markus Benter
Details
Screenshot showing results and formulas (46.23 KB, image/png)
2015-09-13 21:32 UTC, m_a_riosv
Details
Screenshot after opening with both options at Always recalculate + hard recalc + Version box. (74.17 KB, image/png)
2015-09-14 13:56 UTC, m_a_riosv
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Benter 2015-09-13 12:52:45 UTC
Created attachment 118667 [details]
Minimal Example

If I have a certainly large filled table under some conditions A+B/2=2 if A is an empty cell and B is an empty cell. The error cannot be fixed by colsing/reopening or hard recalculate (Ctrl+Shift+F9). I've attached a minimal example file.

The Bug could be related to #89404 but I worked on this table regularly with 4.4.* and the this bug appears first since I've switched to 5.0.1.2 recently. Thus, the bugs might be independent.
Comment 1 Markus Benter 2015-09-13 12:55:52 UTC
Created attachment 118668 [details]
The Calculation
Comment 2 Markus Benter 2015-09-13 12:56:24 UTC
Created attachment 118669 [details]
The result of A+B
Comment 3 m_a_riosv 2015-09-13 16:30:15 UTC
Hi Markus, thanks for reporting.

Reproducible.
Win10x64
Versión: 4.4.5.2 Id. de compilación: a22f674fd25a3b6f45bdebf25400ed2adff0ff99

Last working
Version: 4.3.7.2 Build ID: 8a35821d8636a03b8bf4e15b48f59794652c68ba

With an operator before the reference to the first empty cell, it works.

=B314+C314/2 shows the error
=+B314+C314/2 not.
Comment 4 GerardF 2015-09-13 19:10:08 UTC
Oddly, I can't reproduce with the same 4.4.5.2
I see 0 at opening and writting again the formula display also 0.

With 5.1.0.0 alpha1+, I see 2 but hard recalc cure the problem.

I try with various settings in calc options and still can't reproduce...
What are your calculation settings ?
Comment 5 m_a_riosv 2015-09-13 21:32:28 UTC
Created attachment 118682 [details]
Screenshot showing results and formulas

Attached a screenshot showing results and formulas.

Maybe some obscure option makes the difference.

I have tried changing Menu/Tools/LibreOffice calc/Formula - Detailed calculation - Custom - Treat empty string as zero, but no luck.
Comment 6 m_a_riosv 2015-09-13 21:35:10 UTC
I forgot, hard recalc doesn't solve the issue.
Comment 7 GerardF 2015-09-14 07:38:41 UTC
I find why I saw 0 in the 1st attempt :
In Tools > Options > Calc, Formula → "Recalculation on file load" was on "always recalculate" for ODF spreadsheet.

Trying with a new profile (default settings), I got 2 but Ctrl+Shift+F9 works.

The only difference I see with Markus and Miguel Angel is I'm on 32bit OS (Win Vista 32)
Comment 8 GerardF 2015-09-14 07:55:04 UTC
Forget to say that I try with both FR and US locale.

There is a strange thing : The format used (0,0" "[$mg]) is listed in the "Currency" category.
Comment 9 m_a_riosv 2015-09-14 13:56:33 UTC
Created attachment 118701 [details]
Screenshot after opening with both options at Always recalculate + hard recalc + Version box.

Tested with master 32 bits.

Nothing change for me, with both types "always recalculate" activated and after a hard recalc.
Comment 10 raal 2016-02-07 20:47:01 UTC
I can not confirm with Version: 5.2.0.0.alpha0+
Build ID: 91a7580e03d5b47c6e2513afce85ddee45e730b6
CPU Threads: 1; OS Version: Windows 6.1; UI Render: default; 
TinderBox: Win-x86@39, Branch:master, Time: 2016-02-03_23:51:42

after hard recalc is result 0,0 mg
Comment 11 Xisco Faulí 2016-09-13 10:28:40 UTC
Since we have a bibisect repository for windows covering the branch where this regression was introduced, adding keyword 'bibisectRequest'.
More info: https://wiki.documentfoundation.org/QA/Bibisect/Windows
Comment 12 Markus Mohrhard 2016-10-09 23:58:45 UTC
Works in master. This needs a CTRL+SHIFT+F9 and then a resave as the wrong value is stored in the document.
Comment 13 m_a_riosv 2016-10-10 09:05:22 UTC
With hard recalc works for me with:
Version: 5.1.6.1 (x64)
Build ID: f3e25ec0581f5012f54d8810dcddd5824f4ee374
CPU Threads: 1; OS Version: Windows 6.19; UI Render: default; 
Locale: es-ES (es_ES); Calc: CL
Version: 5.2.2.2 (x64)
Build ID: 8f96e87c890bf8fa77463cd4b640a2312823f3ad
CPU Threads: 4; OS Version: Windows 6.19; UI Render: GL; 
Locale: es-ES (es_ES); Calc: CL

Maybe it was some of the OpenCL issues solves now. (More than 100 equal formulas).
Comment 14 CherylSilvia 2020-05-25 10:27:12 UTC Comment hidden (spam)