Bug 102364 - Freeze when doing Crtl + Z on large spreadsheet with concatenation
Summary: Freeze when doing Crtl + Z on large spreadsheet with concatenation
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.1.0.4 release
Hardware: All All
: medium critical
Assignee: Not Assigned
URL:
Whiteboard: target:6.3.0
Keywords: bibisected, haveBacktrace, regression
Depends on:
Blocks: Undo-Redo
  Show dependency treegraph
 
Reported: 2016-09-22 16:04 UTC by Xisco Faulí
Modified: 2018-12-19 10:29 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
Backtrace of hang with WinDbg (10.12 KB, text/plain)
2016-10-21 10:37 UTC, Aron Budea
Details
Another backtrace with WinDbg showing sclo.dll on fileopen (11.98 KB, text/plain)
2016-10-21 17:03 UTC, Timur
Details
Another backtrace from procdump on column insert (12.05 KB, text/plain)
2016-10-21 17:08 UTC, Timur
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Xisco Faulí 2016-09-22 16:04:59 UTC
User-Agent:       Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0
Build Identifier: 416eb656da5ecf82e4386bbffc7c843f6d065b3f

Freeze when doing Crtl + Z on large spreadsheet with concatenation

Reproducible: Always

Steps to Reproduce:
1. Open attachment 121732 [details]
2. Right-click on the header of column B.
3. In the pop-up menu select "Insert Columns Left".
4. Type Crtl + Z
Actual Results:  
Libreoffice freezes and the app needs to be killed

Expected Results:  
Action is performed eventually

Adding keyword 'wantBacktrace'


Reset User Profile?No
Comment 1 Buovjaga 2016-10-09 14:14:16 UTC
Repro, but I am unable to get a bt. It crashes on some Java thing, if run with --backtrace and if I try to attach gdb to it later, it somehow does not work.

Arch Linux 64-bit, KDE Plasma 5
Version: 5.3.0.0.alpha0+
Build ID: ff2a399b61f34f7920e594e8cbb6c19045b24956
CPU Threads: 8; OS Version: Linux 4.7; UI Render: default; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group
Built on October 7th 2016
Comment 2 Aron Budea 2016-10-21 10:37:40 UTC
Created attachment 128118 [details]
Backtrace of hang with WinDbg

Here's a backtrace, taken with WinDbg.

Version: 5.3.0.0.alpha0+
Build ID: ab03287ae182c4fadebe257aa5da5257bd5b7c2e
CPU Threads: 4; OS Version: Windows 6.1; UI Render: GL; 
Locale: hu-HU (hu_HU); Calc: group
Comment 3 Timur 2016-10-21 17:03:50 UTC
Created attachment 128133 [details]
Another backtrace with WinDbg showing sclo.dll on fileopen
Comment 4 Timur 2016-10-21 17:08:01 UTC
Created attachment 128134 [details]
Another backtrace from procdump on column insert
Comment 5 Timur 2016-10-21 17:29:29 UTC
This file is abnormally slow, it has dumps even before freeze. 
I tried to run Dr.Memory but ran out of memory. Valgrind?
Aron: "OS (WOW64 kernel32) symbols are WRONG. Please fix symbols to do analysis."
Comment 6 Eike Rathke 2017-04-25 13:00:45 UTC
@Kohei: you might be interested in this.. the cause seems to be that on Undo for each and every formula cell the whole range (entire column) is ungrouped and then regrouped just to be ungrouped and regrouped for the next cell.. eventually this might even succeed after a day or so.
Comment 7 Telesto 2017-12-03 13:56:34 UTC
Also in
Versie: 4.1.0.4 
Build ID: 89ea49ddacd9aa532507cbf852f2bb22b1ace2

but not in
Versie 4.0.0.3 (Bouw-id: 7545bee9c2a0782548772a21bc84a9dcc583b89)
Comment 8 Michael Meeks 2018-02-06 18:48:41 UTC
Curious as to why this is suddenly critical; ? =)
Comment 9 Buovjaga 2018-02-06 20:04:36 UTC
(In reply to Michael Meeks from comment #8)
> Curious as to why this is suddenly critical; ? =)

"since 2016" is not suddenly :) It is critical because of the effect "Libreoffice freezes and the app needs to be killed". That is what severity describes, the badness of the effect. Priority was left as medium because this is a rarer workflow.
Comment 10 Buovjaga 2018-07-04 19:21:18 UTC
Bibisected on Ubuntu 14.04 with 43all to range https://cgit.freedesktop.org/libreoffice/core/log/?qt=range&q=923312f67fbf120158f01c2c0e588af38fc22364...a2c34b3d9ac2d7e43e52846308cc63447fd51f23

Might be from this extensive commit and the ones related to it: https://cgit.freedesktop.org/libreoffice/core/commit/?id=59f38babd074cc0b835a5d2a1c81af013dba0deb

Remove broadcaster from ScBaseCell, remove ScNoteCell and CELLTYPE_NOTE...
and Calc is now officially broken.  Let's start fixing this bit by bit...
Comment 11 Commit Notification 2018-12-14 15:26:27 UTC
Luboš Luňák committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/a3fb726f4972c5a869e778353c8c1c19f149c5ea%5E%21

optimize expensive EndListener() calls (tdf#102364)

It will be available in 6.3.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 12 Commit Notification 2018-12-14 15:26:34 UTC
Luboš Luňák committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/169a1b542165f3444791fd6e672d56d3fe48bd66%5E%21

avoid possible expensive repetitive formula group changes (tdf#102364)

It will be available in 6.3.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 13 Luboš Luňák 2018-12-18 12:09:56 UTC
This should be fixed now.
Comment 14 Xisco Faulí 2018-12-19 10:15:40 UTC
Verified in

Version: 6.3.0.0.alpha0+
Build ID: 78073ecfdc50e78e3ce094c1259779b7c3b88bc4
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded

@Luboš Luňák, thanks for fixing this!!

Should it be cherry-picked to 6-2 branch ???