Bug 140986 - LO hangs when you select a cell with validity's drop-down
Summary: LO hangs when you select a cell with validity's drop-down
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.0 all versions
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:7.2.0 target:7.1.3
Keywords: bibisectRequest, regression, wantBacktrace
Depends on:
Blocks: Cell-Validity CPU-AT-100% Memory
  Show dependency treegraph
 
Reported: 2021-03-12 16:24 UTC by Paavo Ingalsuo
Modified: 2021-06-29 13:39 UTC (History)
5 users (show)

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


Attachments
File from link in description (1.03 MB, application/vnd.oasis.opendocument.spreadsheet)
2021-03-12 19:25 UTC, Roman Kuznetsov
Details
perf flamegraph (81.01 KB, image/svg+xml)
2021-03-13 14:46 UTC, Julien Nabet
Details
Bug in this file.. (1006.75 KB, application/vnd.oasis.opendocument.spreadsheet)
2021-04-24 10:47 UTC, Paavo Ingalsuo
Details
Minimized example file (25.13 KB, application/vnd.oasis.opendocument.spreadsheet)
2021-06-29 13:39 UTC, NISZ LibreOffice Team
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Paavo Ingalsuo 2021-03-12 16:24:59 UTC
LibreOffice Version: 7.0.3.1 and Ubuntu 20.10.
Reference file: http://bergheat.ingalsuo.fi/Bergheat46.ods

Try changing the value of cell $BERGHEAT.H22 from its drop-down menu.
No dice. Has been successful in the past.
$BERGHEAT.H22 cell selection affects many Bergheat46 cells.
The same problem has occurred in the $BERGHEAT.G35 cell. This cell also has an effect on many other cells.
For other menu cells that affect only a few cells, there is no problem.
Comment 1 Roman Kuznetsov 2021-03-12 19:23:22 UTC
confirm 100% CPU load, memory leak over 2 Gb and LO hangs when I just select H22 cell on BERGHEAT sheet in

Version: 7.2.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 9d8accf03984a64a4105826e55b221962628eb93
CPU threads: 4; OS: Windows 6.1 Service Pack 1 Build 7601; UI render: default; VCL: win
Locale: ru-RU (ru_RU); UI: en-US
Calc: CL

and in LO 5.0 32 bit I got Bad allocation error

but no problem in

LO 4.4.7

=> regression
Comment 2 Roman Kuznetsov 2021-03-12 19:25:28 UTC
Created attachment 170446 [details]
File from link in description
Comment 3 Julien Nabet 2021-03-13 14:46:57 UTC
Created attachment 170455 [details]
perf flamegraph

Here's a Flamegraph on pc Debian x86-64 with master sources updated today.
Comment 4 Julien Nabet 2021-03-13 14:49:43 UTC
Noel/Eike: anything in the Flamegraph which would explain the hang?
Comment 5 Noel Grandin 2021-03-13 18:34:32 UTC
This isn't a perf issue, something is generating an insanely long chunk of text as a validation string, and then something else is taking a very very long time to display that insanely long string.
Comment 6 Commit Notification 2021-03-14 11:43:06 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/924733c65902d0b17764aded56c88c99d4b9a568

tdf#140986 hang in validity message

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 7 Noel Grandin 2021-03-14 12:15:00 UTC Comment hidden (obsolete)
Comment 8 Noel Grandin 2021-03-14 12:15:14 UTC Comment hidden (obsolete)
Comment 9 Julien Nabet 2021-03-14 14:51:28 UTC
I gave a new try with the patch, it still hangs.

Also, this only 1MB file takes quite some time (about 40s) to open (Ryzen 5 with 32GB) with gen rendering (so no accessibility part that we can see with gtk3), it's another pb but quite annoying for just testing some behavior.
Comment 10 Commit Notification 2021-03-17 07:26:15 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "libreoffice-7-1":

https://git.libreoffice.org/core/commit/b6e705ec690b9911ce44f3e6cb1273737449f186

tdf#140986 hang in validity message

It will be available in 7.1.3.

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 11 Paavo Ingalsuo 2021-03-30 04:52:25 UTC
I have now edited by LibreOffice file Bergheat46.ods data validation message text lines shorter, and the problem seems to have disappeared.
New edited version: http://bergheat.ingalsuo.fi/Bergheat46.ods
Would it be appropriate for the admin to add here [https://help.libreoffice.org/latest/ka/text/scalc/guide/validity.html] information about the allowed validation text format?
Thanks for help!
Comment 12 Paavo Ingalsuo 2021-04-24 10:39:49 UTC Comment hidden (obsolete)
Comment 13 Paavo Ingalsuo 2021-04-24 10:47:11 UTC
Created attachment 171381 [details]
Bug in this file..
Comment 14 Paavo Ingalsuo 2021-04-24 10:50:40 UTC Comment hidden (no-value)
Comment 15 BogdanB 2021-05-14 04:23:17 UTC
The drop down is working well in Version: 7.2.0.0.alpha0+ / LibreOffice Community
Build ID: 54387d1d35cb79a30be208052831de74efd8b2f2
CPU threads: 4; OS: Linux 5.8; UI render: default; VCL: gtk3
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
Calc: threaded

About cell E128, if you select that cell and go to Data - Validity - Criteria and change from Ei/On to On/No, you will have what you need it.
Comment 16 NISZ LibreOffice Team 2021-06-28 12:54:17 UTC
(In reply to Paavo Ingalsuo from comment #12)
> Attached is the file (Bergheat46_114_BUG.ods) where the error occurs.
> To view the front page of the file (BERGHEAT), select the contents of cell
> E128 by selecting: Data / Validity / Input Help
> Appears:
> ¤¤¤
> choose
> [On]                                 tai                                 [Ei]
> 
> If you select [On],
> enter in the adjacent box
> distance in meters
> now in sizing
> from the existing mine.
> ¤¤¤
> Originally it looked like this:
> ¤¤¤
> choose
> [On] or [No]
> 
> If you select [On],
> enter in the adjacent box
> distance in meters
> now in sizing
> from the existing well.
> ¤¤¤
> Why is changing.
> The change occurs when you save the file and then reopen it.
> There are more invisible characters between these ( [On] or [No] ), why?
> If you save that file and again open it, it will be more invisible
> characters between ( [On] or [No] ).
> LibreCalc generates invisible characters by itself.!

That is bug 137945 - please try upgrading to 7.0.6 or 7.1.
Comment 17 NISZ LibreOffice Team 2021-06-29 13:39:39 UTC
Created attachment 173268 [details]
Minimized example file

With the commits above I was able to copy-paste the offending cell to a new file.

When you try to open the Data - Validity - Input help tab, Calc still freezes.

This happens ever since 4.2, in 4.1 the Input Help tab opened, but without contents in the Input help box.

Looking at the xml of the file, the Input help is not extensively huge (it's like 8 paragraphs including some empty ones) but contains some formatting markup which is kinda odd, given that this dialog does not offer formatting options for the Input help text.