Bug 92370 - Copy-paste of formula that results in #DIV/0! bug causes wrong result
Summary: Copy-paste of formula that results in #DIV/0! bug causes wrong result
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.4.3.2 release
Hardware: Other Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-27 02:49 UTC by Vesa Roto
Modified: 2015-10-18 17:58 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:
Regression By:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vesa Roto 2015-06-27 02:49:07 UTC
Entering a cell function that results in a #DIV/0! and then copying that cell many times causes resulting formulas to show up correctly but not result in #DIV/0! even if that is the correct value if the calculation source cell is empty.

Note: Copying it only few times causes correct result.

Steps to reproduce:
-Take a empty spreadsheet.
-Enter a cell resulting in #DIV/0! in a cell.   
   Example: type =10/b1 into cell c1
-See that the formula and result are as expected. 
   Example: The formula in c1 is 10/b1 and that the cell value shows #DIV/0!
-Copy the cell with the formula
   Example copy c1
-Select the cell below. 
  Example c2
-Go down many times with page down while holding shift to select many cells.
   Note: If I go down only 2-3 times this does not happen, need to go more. In my tries I went down all the way to cells 110 or 122 or similar to get this bug to happen.
-Paste
-Note that the pasted cells contain the correct formula but wrong result.  
   Example all the cells c2-c122 contain formulas like =10/b2 to =10/b122 but the values are 10, not #DIV/0! as expected. 
-Enter different values in the referenced cells and see that the calculation changes to be correct for any number not if the cell is empty.
   Example: enter 2 in b2 and see c2 change to 5, enter 10 and see c2 change to 1, enter 0 and get #DIV/0!. But press del to delete the cell contents in b2 and see the value change back to 10 not #DIV/0!.
-Check same in the original formula and see that it gives #DIV/0! as expected.
   Example enter the same values in b1 and see same results, except that after the deletion the result in c1 is #DIV/0!, not 10.

As noted above if I only copy the cell to smaller number of cells it works as original.  Say from c1 to c2-c87 the effect is as in c1, that is as example an empty b2 results in #DIV/0! in c1.
Comment 1 raal 2015-06-27 09:37:10 UTC
Cannot reproduce with Verze: 5.0.0.1 (x64)
ID sestavení: 9a0b23dd0ab9652e0965484934309f2d49a7758e, win10
Comment 2 Buovjaga 2015-07-02 09:57:45 UTC
Cannot reproduce.

Vesa: do you get the same result with 4.4.4 or 5.0 RC2?

Win 7 Pro 64-bit, Version: 4.4.4.3
Build ID: 2c39ebcf046445232b798108aa8a7e7d89552ea8
Locale: fi_FI
Comment 3 Vesa Roto 2015-07-02 13:30:23 UTC
I can reproduce it in:

Version: 4.4.3.2
Build ID: 88805f81e9fe61362df02b9941de8e38a9b5fd16
Locale: en_GB
Running windows 8.1(2 computers) and running windows 7

Version: 4.4.4.3
Build ID: 2c39ebcf046445232b798108aa8a7e7d89552ea8
Locale: en_GB
Running windows 8.1
(updated one of the 4.4.3.2 to this)

Version: 5.0.0.2
Build ID: a26d58f11b99b6aeddf7f7884effea188cc6e512
Locale: en-GB (en_GB)
Running windows 7
(updated one of the 4.4.3.2 to this)
Comment 4 Vesa Roto 2015-08-08 00:10:29 UTC
Also happens in: 

Version: 5.0.0.5
Build ID: 1b1a90865e348b492231e1c451437d7a15bb262b
Locale: en-GB (en_GB)

Running windows 8.1
Comment 5 Joel Madero 2015-10-18 01:42:21 UTC
Please try with a fresh profile - https://wiki.documentfoundation.org/UserProfile

Report back with your findings :) Thanks!
Comment 6 Jacques Guilleron 2015-10-18 12:44:48 UTC
Hi all,

I no longer reproduce with
LO 5.1.0.0.alpha1+ Build ID: 186f32f63434e16ff5776251657f902d5808ed3d
TinderBox: Win-x86@39, Branch:master, Time: 2015-10-16_09:42:47
under Windows 7 Home
Try this:
Once copied the formula to reproduce, select a range of less than 100 rows, 
let's say C2:C98. Ctrl+V. All copied cells contain #DIV/0 !.
Select now a range of more than 100 rows, let's say C2:C103. Ctrl+V. Copied cells now contain 10.
In Tools > Options > LibreOffice > OpenCL
Deliver Allow use of OpenCL. You can no longer reproduce those differences.
See: Bug 94924 - OpenCL: strange behavior in formulas computing
This issue is now fixed and available on master and will be avaiilable with 
LO 5.0.4.
Comment 7 Joel Madero 2015-10-18 17:58:11 UTC
With last comment I will push this to WFM -

@Vesa - please try to test with master (not recommended for daily use right now but you can install, test, then uninstall).

http://dev-builds.libreoffice.org/daily/master/Win-x86@39/current/

From final comment it looks like this is resolved. If it's not, please again try to reset your profile (as already suggested) and if that fails to fix the problem set the bug back to UNCONFIRMED.

Thanks for your bug reporting efforts!