Bug 98009 - Wrong calculation in calc when dragging formula
Summary: Wrong calculation in calc when dragging formula
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.1.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-19 16:25 UTC by David Zaragoza
Modified: 2017-02-01 00:49 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
The source with the numbers (2.58 KB, text/plain)
2016-02-19 16:25 UTC, David Zaragoza
Details
The ods file with the bug (29.29 KB, application/vnd.oasis.opendocument.spreadsheet)
2016-02-20 15:33 UTC, David Zaragoza
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Zaragoza 2016-02-19 16:25:19 UTC
Hi

I was doing a simple calculation in calc, please see the attached spreadsheet, and the result is wrongly displayed.

In the spreadsheet, just going to write for the second row:

B2=B202-E202
C2=C202-F202
D2=B2/C2

This is the same for rows 2 to 120.

B,C,E,F from 202 to 321 is the input I'm using for the calculations.

Steps to reproduce:

* Paste the data in rows 202 to 321 from source.txt separated by spaces.
* Write the formulas in B2, C2 and D2. In this moment the formula displays OK.
* Select B2, C2 and D2 and pull down to do the change, now it will bug out.
* After closing and opening, all formulas will be wrong.

Regards
Comment 1 David Zaragoza 2016-02-19 16:25:45 UTC
Created attachment 122805 [details]
The source with the numbers
Comment 2 David Zaragoza 2016-02-19 16:26:44 UTC
Also, I want to add that the bug only is created when pasting data from text file. If I enter the numbers manually it works ok.
Comment 3 m_a_riosv 2016-02-20 01:53:28 UTC
Please could you attach a sample file where to reproduce the issue.
Comment 4 David Zaragoza 2016-02-20 15:33:51 UTC
Created attachment 122820 [details]
The ods file with the bug
Comment 5 David Zaragoza 2016-02-20 15:34:29 UTC
(In reply to m.a.riosv from comment #3)
> Please could you attach a sample file where to reproduce the issue.

I uploaded the ods file. I forgot to upload it when reporting the bug.
Comment 6 m_a_riosv 2016-02-21 00:25:04 UTC
Hi David, thanks for the sample.

I think I can reproduce the issue only with the option:

Menu/Tools/Options/LibreOffice/OpenCL - Allow use of Software Interpreter (even when OpenCL is not availaable)

is enable, but not if the 'Allow use of OpenCL' is enable also.

Please could you test.

Even the https://bugs.documentfoundation.org/show_bug.cgi?id=94924 is solved maybe some relation with it.

Win10x64
Versión: 5.1.2.0.0+ Build ID: 8896851ddb02d043f3ebcc5b27b907369f0d6730
4; Windows 6.2; TinderBox: Win-x86@62-merge-TDF, Branch:libreoffice-5-1, Time: 2016-02-11_23:47:09
Comment 7 David Zaragoza 2016-02-22 10:16:29 UTC
Hi

I tested playing with those options and found the following.

In Linux, the error happens if:

* Both options are turned on.
* 'Allow use of software interpreter...' is on, but 'Allow use of OpenCL' is off.

The bug doesn't occur when:

* Both options are off.
* 'Allow use of OpenCL' is on but 'Allow use of software interpreter...'  is off.

So it seems to have something to do with the software interpreter.

I'm running libreoffice on a Intel(R) Core(TM) i7-4600U.

Regards
Comment 8 David Zaragoza 2016-02-22 11:08:04 UTC
Update

The bug is still there if I recreate the file with the options turned off.

I rolled back to 5.0.5.2 and in that version the bug occurs even with the opencl option disabled.
Comment 9 m_a_riosv 2016-02-24 23:50:31 UTC
(In reply to David Zaragoza from comment #8)
> Update
> 
> The bug is still there if I recreate the file with the options turned off.
> 
> I rolled back to 5.0.5.2 and in that version the bug occurs even with the
> opencl option disabled.

Have you done a hard recalc [Ctrl+Shift+F9]?
Comment 10 David Zaragoza 2016-02-25 16:10:19 UTC
(In reply to m.a.riosv from comment #9)
> 
> Have you done a hard recalc [Ctrl+Shift+F9]?

Yes, it did not change anything.
Comment 11 Michael Meeks 2016-07-06 19:36:07 UTC
David - there have been a number of S/W interpreter fixes in recent times. Is there any chance you can try a recent 5.1.x build, or even a 5.2.x pre-release ? I'm struggling to reproduce the steps here - although I've seen some copy/paste/import-from-CVS related formula problems in the past too.

Thanks !
Comment 12 QA Administrators 2017-01-31 00:29:01 UTC Comment hidden (obsolete)
Comment 13 m_a_riosv 2017-02-01 00:49:24 UTC
Not repro with:
Version: 5.2.5.1 (x64)
Build ID: 0312e1a284a7d50ca85a365c316c7abbf20a4d22
CPU Threads: 4; OS Version: Windows 6.19; UI Render: GL; 
Locale: es-ES (es_ES); Calc: group