Bug 57613 - To insert a formula with multiplication generate a loops
Summary: To insert a formula with multiplication generate a loops
Status: ASSIGNED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: low critical
Assignee: László Németh
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Writer-Tables Performance
  Show dependency treegraph
 
Reported: 2012-11-27 14:39 UTC by Mario Cor
Modified: 2024-02-09 22:50 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:


Attachments
here you can reproduce the problem (20.11 KB, application/vnd.oasis.opendocument.text)
2012-11-27 14:39 UTC, Mario Cor
Details
bt with debug symbols (gtk3) (10.71 KB, text/plain)
2019-05-28 09:39 UTC, Julien Nabet
Details
perf flamegraph (224.41 KB, application/x-bzip)
2020-01-12 17:33 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mario Cor 2012-11-27 14:39:03 UTC
Created attachment 70665 [details]
here you can reproduce the problem

I try to add a formula making a multiplication between columns of a table and the libreoffice generates a loops. If you try many times generates a crash of Libreoffice an even of the SO.
Comment 1 Lennard Wasserthal 2012-12-03 13:59:29 UTC
Verified. (windows XP, 32 bit) The cells are getting tremendously long (over several pages)
and the view seems to try to find a region which contains the middle of the cell and the cursor, which is not possible. You can get out of that with ESCAPE, but since it is a seldomly used function, it doesn't fulfill the criteria of a blocker. First I need to find out why the cells are getting long.
Comment 2 Lennard Wasserthal 2012-12-09 18:32:56 UTC
On Windows, it was version 3.6.3.
Works better in 3.5.4.2 (linux, 64 bit)! and master 4.0 with last commit f2cce815d17ecab4a9440d3cae2064db60fa5d2c
So this is mainly a windows - or 32 bit bug.
the edited cell doesn't get longer in Linux, (so there is no loop) but the subsequent cells are pushed to the far during edit for some reason.
that means the following pages dont contain columns, just an empty table.
And the empty area is growing with time, so you cant scroll to the end.
It happens when you enter the second operand.

I thought Maybe thisis because there are two tables in another, but even then I cant reproduce this with a self-made document - yet...
Comment 3 QA Administrators 2015-01-05 17:52:14 UTC Comment hidden (obsolete)
Comment 4 Buovjaga 2015-01-20 16:27:41 UTC
I do not know, how I could reproduce this.
I need step by step instructions.
Comment 5 Gordo 2015-05-06 00:05:02 UTC
There is a frame anchored to a paragraph in the header.  The frame runs down the right side of the page.  It is used for a border that lines up with the tables so that text outside of the tables has a border.

Reproduced thusly:
1. Place cursor in Tabla1:D14.
2. Press Formula on toolbar.
3. Click in B14 (two columns over).
4. Type "*".
5. Click in C14.
Result:
It is at this point that the cell stretchs and the page count increases.  Escape.
6. Double click on frame or select Marco2 in Navigator and Delete.
7. Repeat steps 1 through 5.
Result:
Loopy no more.

Unchecking AutoSize of the Height of the frame didn't help.

Something interesting is if you change the wrap of the frame to None then it goes into a loop of adding pages.

Version: 4.4.3.2
Build ID: 88805f81e9fe61362df02b9941de8e38a9b5fd16
Comment 6 QA Administrators 2016-09-20 09:37:28 UTC Comment hidden (obsolete)
Comment 7 Jean-Baptiste Faure 2019-05-11 16:00:30 UTC
Still reproduced in current master.

Version: 6.3.0.0.alpha0+
Build ID: 2de1fd7d8b8bd42c66190140cc4506df0c3367f1
Threads CPU : 4; OS : Linux 4.15; UI Render : par défaut; VCL: gtk3; 
Ubuntu_18.04_x86-64
Locale : fr-FR (fr_FR.UTF-8); Langue IHM : fr-FR
Calc: threaded

Best regards. JBF
Comment 8 Jean-Baptiste Faure 2019-05-11 16:03:28 UTC
Forgot to add the removing the frame "Marco2" makes the problem not reproducible.

Best regards. JBF
Comment 9 Julien Nabet 2019-05-28 09:39:56 UTC Comment hidden (off-topic)
Comment 10 Julien Nabet 2019-05-28 09:49:21 UTC Comment hidden (off-topic)
Comment 11 Julien Nabet 2019-05-28 09:49:50 UTC Comment hidden (off-topic)
Comment 12 Julien Nabet 2019-05-28 12:08:48 UTC
On pc Debian x86-64 with master sources updated today, I could reproduce this.

Indeed, removing the frame allows to avoid the bug.

Michael: thought you might be interested in this old bug still present.
Comment 13 Julien Nabet 2019-05-28 15:02:15 UTC
After some gdb session, it seems the loop is in this block:
https://opengrok.libreoffice.org/xref/core/sw/source/core/crsr/crsrsh.cxx?r=aebf1925#1830
Comment 14 Julien Nabet 2020-01-12 17:33:54 UTC
Created attachment 157087 [details]
perf flamegraph

Here's a Flamegraph retrieved on pc Debian x86-64 with master sources updated today.
Comment 15 BogdanB 2021-08-23 09:31:51 UTC
Also in
Version: 7.3.0.0.alpha0+ / LibreOffice Community
Build ID: 5b025285b3528910a4360899abb2bbbaadc72c97
CPU threads: 4; OS: Linux 5.11; UI render: default; VCL: gtk3
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
Calc: threaded

Without frame everything is quick. With frame is freezing.
Comment 16 Tex2002ans 2024-02-09 22:50:10 UTC
> Forgot to add the removing the frame "Marco2" makes the problem not reproducible.

Yes, very strange.

When I did comment 0's 6+7 first (deleting "Marco2" Frame), then:

- Steps 1-5 worked.

But if I did Steps 1-5 first:

- The layout completely glitched + 100% CPU usage.

- - -

Also, if I pressed ESC immediately after Step 5:

- I was able to "escape", and try 6+7.

But if I was too slow:

- I was stuck in the 100% glitch/"loop".

But if I did something even stranger, and I SCROLLED the vertical bar down immediately after Step 5 (after the table cells went weird):

- I was able to stay active.
- And I could see the pages infinitely generating/counting up.
   - I clicked out of LO after I reached page ~350.

- - -

Version: 24.2.0.3 (X86_64) / LibreOffice Community
Build ID: da48488a73ddd66ea24cf16bbc4f7b9c08e9bea1
CPU threads: 8; OS: Windows 10.0 Build 22631; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded