Bug 116192 - Calc busy loop when using VLOOKUP
Summary: Calc busy loop when using VLOOKUP
Status: RESOLVED INSUFFICIENTDATA
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.0.1.1 release
Hardware: x86-64 (AMD64) macOS (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Calc-Threaded
  Show dependency treegraph
 
Reported: 2018-03-05 05:44 UTC by Benoit Sigoure
Modified: 2019-01-11 15:26 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Spreadsheet to reproduce the issue (7.84 KB, application/vnd.oasis.opendocument.spreadsheet)
2018-03-05 05:46 UTC, Benoit Sigoure
Details
macOS report when Calc hangs and is force-quit (902.08 KB, text/plain)
2018-03-11 21:23 UTC, Benoit Sigoure
Details
CPU sample taken by Activity Monitor while LibreOffice is pegging the CPU (910.18 KB, text/plain)
2018-03-11 21:29 UTC, Benoit Sigoure
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Benoit Sigoure 2018-03-05 05:44:25 UTC
Description:
Simple uses of VLOOKUP can make Calc busy loop forever

Steps to Reproduce:
1. Create a new spreadsheet
2. On Sheet1, insert the following 3 rows 2 columns:
colA colB
foo  1
bar  2

3. Add Sheet2 and insert the following 2 columns 2 rows:
colA colB
foo

in cell B2 on Sheet2 (under "colB") enter the following formula:
=VLOOKUP(A2, Sheet1.A:B, 2, 0)

Actual Results:  
Upon hitting enter Calc will start to busy loop and peg the CPU at 100%.

Expected Results:
The formula in cell B2 should evaluate to "1".


Reproducible: Always


User Profile Reset: No



Additional Info:
Sometimes the formula manages to get evaluated before Calc starts to busy loop.


User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3355.0 Safari/537.36
Comment 1 Benoit Sigoure 2018-03-05 05:46:26 UTC
Created attachment 140339 [details]
Spreadsheet to reproduce the issue

The bug can be triggered by entering the formula in cell Sheet2.B2
Comment 2 Benoit Sigoure 2018-03-05 05:54:03 UTC
BTW this looks similar to bug 114509 but I couldn't determine whether it was the same issue.  That issue mentions a fairly large input, in my case the input is trivially small.

Also if the input is sorted and the last argument passed to VLOOKUP is 1 (or it's omitted), the issue happens anyways.  I upgraded to LibreOffice 6 to try to avoid this bug but I'm pretty certain I was running into it on whatever 5.x I was on before (a fairly recent one).
Comment 3 Benoit Sigoure 2018-03-05 05:59:42 UTC
Also I just check as per m.a.riosv's comment in that bug that I do have "Search criteria = and <> must apply to the whole cells" enabled out of the box.
Comment 4 Xavier Van Wijmeersch 2018-03-05 08:02:18 UTC
I think its more your formula that give the problem.
With =VLOOKUP(A2;$Sheet1.A:B;2;0) i have the correct value of 1
Try to change , to ; and test it again

Version: 6.0.1.1
Build ID: SlackBuild for 6.0.1 by Eric Hameleers
CPU threads: 8; OS: Linux 4.14; UI render: default; VCL: kde4; 
Locale: nl-BE (en_US.UTF-8); Calc: group
Comment 5 Benoit Sigoure 2018-03-05 08:43:58 UTC
Hmm, I never thought the coma vs semicolon made a difference, but in any case I tried it and it doesn't work for me.  Calc hangs as soon as I hit enter after pasting =VLOOKUP(A2;$Sheet1.A:B;2;0)
Comment 6 Kevin Suo 2018-03-05 15:45:48 UTC
(In reply to Benoit Sigoure from comment #5)
Would you please copy and paste the content in Help - About LibreOffice dialog? This information may be helpful.
Comment 7 Benoit Sigoure 2018-03-05 19:33:28 UTC
Version: 6.0.1.1
Build ID: 60bfb1526849283ce2491346ed2aa51c465abfe6
CPU threads: 4; OS: Mac OS X 10.13.3; UI render: default; 
Locale: en-US (en_US.UTF-8); Calc: group threaded
Comment 8 Kevin Suo 2018-03-05 23:07:31 UTC
(In reply to Benoit Sigoure from comment #7)
This seems to be caused by Calc Threaded Calculation (Calc: group threaded). Would you try to reset your yser profile and see if the issue is gone?

Threaded Calculation was disabled by default in Version 6.0 due to bugs. But I see it is enabled in your version, this may be because you haved installed a tesing version of 6.0 which enabled threaded calculation?
Comment 9 Benoit Sigoure 2018-03-05 23:34:39 UTC
Oh I enabled threading yesterday to see if it would make a difference.  I had the issue before enabling it.  It wasn't enabled out of the box.
Comment 10 Kevin Suo 2018-03-06 00:04:42 UTC
(In reply to Benoit Sigoure from comment #9)
Do you mean the bug still exists without enableing threaded calculation?

Also, does reseting the user profile resolves the issue?
Comment 11 Benoit Sigoure 2018-03-11 21:11:05 UTC
I can reproduce this consistently on a brand new laptop with the latest version of LibreOffice.

Version: 6.0.2.1
Build ID: f7f06a8f319e4b62f9bc5095aa112a65d2f3ac89
CPU threads: 4; OS: Mac OS X 10.13.3; UI render: default; 
Locale: en-US (en_US.UTF-8); Calc: group
Comment 12 Benoit Sigoure 2018-03-11 21:23:33 UTC
Created attachment 140570 [details]
macOS report when Calc hangs and is force-quit
Comment 13 Benoit Sigoure 2018-03-11 21:29:43 UTC
Created attachment 140572 [details]
CPU sample taken by Activity Monitor while LibreOffice is pegging the CPU
Comment 14 Buovjaga 2018-03-13 19:19:57 UTC
No problem with LibreOffice 6.0.2.1, macOS 10.12.6
Comment 15 Alex Thurgood 2018-03-15 07:51:05 UTC
No repro with:

Version: 6.1.0.0.alpha0+
Build ID: 9122f4598450d8a96e63fb29cc8166a6ae09587a
CPU threads: 4; OS: Mac OS X 10.13.3; UI render: default; 
Locale: fr-FR (fr_FR.UTF-8); Calc: group
Comment 16 eisa01 2018-04-08 10:12:21 UTC
I can't repro this either

Version: 6.0.2.1
Build ID: f7f06a8f319e4b62f9bc5095aa112a65d2f3ac89
CPU threads: 2; OS: Mac OS X 10.12.6; UI render: default; 
Locale: en-US (en_US.UTF-8); Calc: group
Comment 17 Buovjaga 2018-04-08 10:23:24 UTC
Benoit: just to be sure, you could try launching in Safe mode to test it: Help - Restart in safe mode and then Continue in safe mode.
Comment 18 Xisco Faulí 2018-06-04 12:05:39 UTC
(In reply to Buovjaga from comment #17)
> Benoit: just to be sure, you could try launching in Safe mode to test it:
> Help - Restart in safe mode and then Continue in safe mode.

I have set the bug's status to 'NEEDINFO'. Please change it back to
'UNCONFIRMED' if the issue is still present
Comment 19 QA Administrators 2018-12-03 13:13:27 UTC Comment hidden (obsolete)
Comment 20 QA Administrators 2019-01-11 15:26:59 UTC
Dear Bug Submitter,

Please read this message in its entirety before proceeding.

Your bug report is being closed as INSUFFICIENTDATA due to inactivity and
a lack of information which is needed in order to accurately
reproduce and confirm the problem. We encourage you to retest
your bug against the latest release. If the issue is still
present in the latest stable release, we need the following
information (please ignore any that you've already provided):

a) Provide details of your system including your operating
   system and the latest version of LibreOffice that you have
   confirmed the bug to be present

b) Provide easy to reproduce steps – the simpler the better

c) Provide any test case(s) which will help us confirm the problem

d) Provide screenshots of the problem if you think it might help

e) Read all comments and provide any requested information

Once all of this is done, please set the bug back to UNCONFIRMED
and we will attempt to reproduce the issue. Please do not:

a) respond via email 

b) update the version field in the bug or any of the other details
   on the top section of our bug tracker

Warm Regards,
QA Team

MassPing-NeedInfo-20190111