Bug 114157 - 6.0Beta1: Calc becomes crazy when I insert a new sheet and then scroll
Summary: 6.0Beta1: Calc becomes crazy when I insert a new sheet and then scroll
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.0.0.0.beta1
Hardware: All Linux (All)
: medium normal
Assignee: Dennis Francis
URL:
Whiteboard:
Keywords: bibisected, bisected, haveBacktrace, regression
Depends on:
Blocks: Crash-Assert Calc-Threaded
  Show dependency treegraph
 
Reported: 2017-11-30 04:42 UTC by Kevin Suo
Modified: 2018-01-28 23:26 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
test document (143.87 KB, application/vnd.oasis.opendocument.spreadsheet)
2017-11-30 04:42 UTC, Kevin Suo
Details
Screenshot: Before new sheet is inserted (OK) (162.39 KB, image/png)
2017-11-30 04:44 UTC, Kevin Suo
Details
Screenshot: After new sheet is inserted and scroll (bad) (119.38 KB, image/png)
2017-11-30 04:45 UTC, Kevin Suo
Details
Screenshot: After UNDO (bad) (175.45 KB, image/png)
2017-11-30 04:46 UTC, Kevin Suo
Details
gdbtrace.log (master as of 1126) (43.99 KB, text/x-log)
2017-11-30 06:32 UTC, Kevin Suo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Suo 2017-11-30 04:42:34 UTC
Created attachment 138090 [details]
test document

Steps to Reproduce:

1. Open the test document with 6.0 beta1

2. Insert a new sheet before "FOP Database by Product Code".

3. Goto sheet "FOP Database by Product Code", and scroll left-and-right using the scroll-bar. 
(Please note that you have to do this step as soon as you have finished the previous step.)

--> Calc becomes crazy, the cell lines are misaligned. If you are quick enough to do step 3 after step 2, you may encounter an UI hang.

4. After Calc becomes crazy, if you try to close the application a warning dialog will show up, saying that you are not able to close the window while updating a link. 

5. Ctrl+Z to undo
--> The "crazy" is gone, but you get a lot of ERR:522 cells. This may be a different bug, but is highly related.


Additional information:
This test document is a reduced real-world working document. It contains complex cell formulas (functions) such as a combination of SUMPRODUCT and INDIRECT etc. (In the real world, one is using these functions on daily basis to do daily work).

Version: 6.0.0.0.beta1
Build ID:97471ab4eb4db4c487195658631696bb3238656c
CPU Core:4; OS:Linux 4.13; UI UI Rendering: Default; VCL: gtk2; 
Locale: zh-CN (zh_CN.UTF-8); Calc: group threaded
Fedora 26 x64

This does not happen with the following version thus may be a regression.
Version: 5.3.7.2.0+
Build ID: 5.3.7.2-3.fc26
CPU Threads: 4; OS Version: Linux 4.13; UI Render: default; VCL: gtk3; Layout Engine: new; 
Locale: zh-CN (zh_CN.UTF-8); Calc: group
Comment 1 Kevin Suo 2017-11-30 04:44:56 UTC
Created attachment 138091 [details]
Screenshot: Before new sheet is inserted (OK)
Comment 2 Kevin Suo 2017-11-30 04:45:35 UTC
Created attachment 138092 [details]
Screenshot: After new sheet is inserted and scroll (bad)
Comment 3 Kevin Suo 2017-11-30 04:46:20 UTC
Created attachment 138093 [details]
Screenshot: After UNDO (bad)
Comment 4 Kevin Suo 2017-11-30 06:32:29 UTC
Created attachment 138102 [details]
gdbtrace.log (master as of 1126)

Actually when I try to insert a new sheet with my own master build (with dbgutil enabled) as of Nov 26, crashes.

Attached is the backtrace.log file generated (from a dbgutil build but without debug symbols). Hope this would be helpful.

The terminal output (when loading the document, but before I insert a new sheet):
warn:configmgr:4127:4127:configmgr/source/xcuparser.cxx:908: ignoring modify of unknown set member node ".uno:PasteSpecialMenu" in "file:///run/media/suokunlong/HD-Kevin/lo/releases/libreoffice-master-1126/program/../share/registry/res/registry_vec.xcd"
warn:sfx.dialog:4127:4127:sfx2/source/dialog/filtergrouping.cxx:355: already have an element for WordPerfect
warn:sfx.dialog:4127:4127:sfx2/source/dialog/filtergrouping.cxx:355: already have an element for writerweb8_writer_template
warn:sfx.dialog:4127:4127:sfx2/source/dialog/filtergrouping.cxx:355: already have an element for writerglobal8
warn:vcl.gtk:4127:4127:vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx:906: no parent widget set
warn:sc:4127:4127:sc/source/filter/orcus/orcusfiltersimpl.cxx:173: Unable to load styles from xml file! failed to load 
warn:sfx.control:4127:4127:sfx2/source/control/dispatch.cxx:1374: Childwindow slot missing: 25917
warn:sfx.control:4127:4127:sfx2/source/control/dispatch.cxx:1374: Childwindow slot missing: 25917
warn:legacy.tools:4127:4127:svx/source/form/fmvwimp.cxx:444: FmXFormView::~FmXFormView: Window list not empty!
soffice.bin: /run/media/suokunlong/build/lo/source/core/sc/source/core/data/formulacell.cxx:2581: void ScFormulaCell::MaybeInterpret(): Assertion `!pDocument->mbThreadedGroupCalcInProgress' failed.
soffice.bin: /run/media/suokunlong/build/lo/source/core/sc/source/core/data/formulacell.cxx:2581: void ScFormulaCell::MaybeInterpret(): Assertion `!pDocument->mbThreadedGroupCalcInProgress' failed.
Comment 5 Xisco Faulí 2017-11-30 06:40:03 UTC
Reproduced in

Version: 6.1.0.0.alpha0+
Build ID: 2618e4a13d719122e6358d9d96864d1691e56a02
CPU threads: 4; OS: Linux 4.10; UI render: default; VCL: gtk3; 
Locale: th-TH (ca_ES.UTF-8); Calc: group threaded
Comment 6 Xisco Faulí 2017-11-30 06:55:06 UTC
Regression introduced by:

author	Tor Lillqvist <tml@collabora.com>	2017-10-04 12:40:20 +0300
committer	Dennis Francis <dennis.francis@collabora.co.uk>	2017-11-21 16:09:42 +0530
commit 5222910f969390c64c18866834d9af53e7c4c189 (patch)
tree 51b5104ddb0a1bde71cccd99b0e97584e4b0e536
parent fd9d991ec02c3df178220031be6bd8b38c6c2c23 (diff)
Make threaded calculation the default (when OpenCL is not used)
Introduce a configuration setting to turn it off. For now, can also be
turned off with the environment variable SC_NO_THREADED_CALCULATION,
but that is probably not something we want to keep or guarantee
staility of. (LO looks at way too many environment variables already.)

Bisected with: bibisect-linux64-6.0

Adding Cc: to Tor Lillqvist
Comment 7 Kevin Suo 2017-12-01 01:51:42 UTC
If I disable Calc Threaded Calculation, then the bug is gone.
(i.e., Go to Tools - Options - LibreOffice - Advanced - Expert Configuration, then search for "Thread", then you will see "UseThreadedCalculationForFormulaGroups" which is a bool option. Set this to False will disable threaded calculation).
Comment 8 Telesto 2018-01-28 14:19:31 UTC
No repro with
Version: 6.1.0.0.alpha0+
Build ID: ea89dabf8b6363972190a6b50c527c418d51c2c7
CPU threads: 4; OS: Windows 6.3; UI render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2018-01-27_22:55:15
Locale: nl-NL (nl_NL); Calc: CL
Comment 9 Kevin Suo 2018-01-28 23:26:17 UTC
(In reply to Telesto from comment #8)
I do not repoduce with the most recent daily builds.
However this does not mean that it was fixed. I saw many functions are put to blacklist after the threading bug (i.e., search for "threading" in git log). So I think Denis is still working on this.

Put this as WORKSFORME for now.