Bug 139126 - faulty expressions cells show incorrect value
Summary: faulty expressions cells show incorrect value
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.0.4.2 release
Hardware: All All
: high major
Assignee: Eike Rathke
URL:
Whiteboard: target:7.2.0 target:7.1.0.2 target:7.0.5
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2020-12-21 12:43 UTC by Xisco Faulí
Modified: 2021-01-07 19:56 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Comparison 7.1 vs 7.2 (135.26 KB, image/png)
2020-12-21 12:43 UTC, Xisco Faulí
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Xisco Faulí 2020-12-21 12:43:32 UTC
Created attachment 168380 [details]
Comparison 7.1 vs 7.2

Steps to reproduce:
1. Open attachment 168180 [details] from bug 138925

-> faulty expressions cells show 179769313486232000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0 value

Reproduced in

Version: 7.2.0.0.alpha0+
Build ID: ad8485ebe11396aaac68095ef9eec819de6af26c
CPU threads: 4; OS: Linux 5.7; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 1 Xisco Faulí 2020-12-21 12:44:37 UTC
Regression introduced by:

https://cgit.freedesktop.org/libreoffice/core/commit/?id=ee2cc952eeb5385ee37485c822d7ad7abd8fb989

author	Eike Rathke <erack@redhat.com>	2020-11-25 13:54:31 +0100
committer	Eike Rathke <erack@redhat.com>	2020-11-25 15:47:34 +0100
commit	ee2cc952eeb5385ee37485c822d7ad7abd8fb989 (patch)
tree	e8e12b7af73ddc3a39025b09ffecc56a42ed55c7
parent	708a8b7f1d869580741787e71a9248757bb1541e (diff)
Related: tdf#136272 accept 1.79769313486232e+308 as DBL_MAX

Bisected with: bibisect-linux64-7.2

Adding Cc: to Eike Rathke
Comment 2 Eike Rathke 2021-01-06 13:33:20 UTC
Sigh.. that uncovered bugs in Writer. Writer wrongly uses the *valid* DBL_MAX value to flag error (which is the real underlying bug) and then fails to check it after import. In content.xml there is

          <table:table-cell table:style-name="Table33.E3" table:formula="ooow:&lt;?&gt;+&lt;D5&gt;" office:value-type="float" office:value="1.79769313486232E+308">
            <text:p text:style-name="P12">** Expression is faulty **</text:p>
          </table:table-cell>

which has a faulty formula with a valid numeric result and a different display string.
Comment 3 Commit Notification 2021-01-06 23:33:31 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/0e37ded8d4aea25e5d9f7325fba0597f509147bc

Resolves: tdf#139126 DBL_MAX is a valid value, just not for Writer

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.
Comment 4 Eike Rathke 2021-01-07 00:19:21 UTC
Pending review
https://gerrit.libreoffice.org/c/core/+/108916 for 7-1
https://gerrit.libreoffice.org/c/core/+/108900 for 7-0
Comment 5 Xisco Faulí 2021-01-07 09:29:03 UTC
Verified in

Version: 7.2.0.0.alpha0+
Build ID: 6bb6eb1692d7dd432103d0e7278534390084caf6
CPU threads: 4; OS: Linux 5.7; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

@Eike, thanks for fixing this issue!!
Comment 6 Commit Notification 2021-01-07 09:52:53 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-7-1":

https://git.libreoffice.org/core/commit/2569211290f460b4401a85f0540e965807bc5a34

Resolves: tdf#139126 DBL_MAX is a valid value, just not for Writer

It will be available in 7.1.0.2.

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.
Comment 7 Commit Notification 2021-01-07 09:54:06 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-7-0":

https://git.libreoffice.org/core/commit/428244a88ab01c68a8dec4d39eff3c0ece69b784

Resolves: tdf#139126 DBL_MAX is a valid value, just not for Writer

It will be available in 7.0.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.
Comment 8 Commit Notification 2021-01-07 19:56:47 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/90cc24d4728dc94a30865d3b3af9409d5967b45a

tdf#139126: sw_odfexport: 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.