Bug 154000 - Large text lines cause it to crash or slow down to the point of unusability.
Summary: Large text lines cause it to crash or slow down to the point of unusability.
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.6.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:7.6.0
Keywords: bibisectRequest, regression
Depends on:
Blocks: Character
  Show dependency treegraph
 
Reported: 2023-03-06 09:06 UTC by NISZ LibreOffice Team
Modified: 2023-03-27 09:42 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description NISZ LibreOffice Team 2023-03-06 09:06:10 UTC
Description:
When opening large text content (over a few megabytes) in Writer, the loading time takes minutes, and then it slows down so much that even the basic functions are unusable.

Steps to Reproduce:
1: Open the attachment in Writer.

Actual Results:
It loads the attachment very slowly and is then unusable.

Expected Results:
It loads the attachment quickly and you can work with it.


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: d7c609dbb1bd08865b43719d2fb7c316d30bcde5
CPU threads: 8; OS: Windows 10.0 Build 19044; UI render: Skia/Vulkan; VCL: win
Locale: hu-HU (hu_HU); UI: hu-HU
Calc: CL threaded
Comment 1 NISZ LibreOffice Team 2023-03-06 09:17:14 UTC
Unfortunately the test file is too big for bugzilla (76 Mb)
Therefore, create your own text document using the following code snippet.:

$ seq 10000000 | tr '\n' ' ' ' >numbers.txt
$ soffice numbers.txt

The problem detail is unchanged except for the attachment.
Comment 2 László Németh 2023-03-06 09:29:43 UTC
Regression from commit 745898eb2af2686ffbdfdc0e44984db67b172a59
"tdf#70423 Remove txtimport break in 10k chars line"
Comment 3 Commit Notification 2023-03-06 09:39:15 UTC
László Németh committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/13e34393e4564ef67d990c6dbe1991a0a6b288dd

tdf#154000 tdf#70423 sw: fix crash/freezing with huge text files

It will be available in 7.6.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 4 László Németh 2023-03-06 09:41:53 UTC
Commit description:

tdf#154000 tdf#70423 sw: fix crash/freezing with huge text files

It was not possible to load or edit text files with very long
lines any more, because removed wrapping of the lines resulted
freezing and crash.

This reverts commit 745898eb2af2686ffbdfdc0e44984db67b172a59
"tdf#70423 Remove txtimport break in 10k chars line",
keeping only its unit test.

Fix also tdf#70423 by increasing the wrap limit from 10000
to 250000 characters, which still permit to load e.g. 50 MB
character or longer text lines, and to edit 5 MB or longer
text lines without crash or freezing.

Details: trying to load a relatively short 76 MB character
length text line shows a non-linear slowing down during the
load, resulting program crash after freezing 10 minutes.

Now this file is opened within seconds again, allowing to modify,
select and copy of the text before the full load of the document
(with linear speed). Loading a much shorter 5 MB character
length text line resulted an unusably slow editing previously:
waiting half minutes for changing, selecting or copying text
parts.

Manual test

Create a text file with a 76 MB character long line, and
open it:

$ seq 10000000 | tr '\n' ' '  >numbers.txt
$ soffice numbers.txt

Note: the reverted commit had also a paragraph limit exceeded
error using unlimited paragraph length, because that is limited
in 4 GiB characters since version 4.3, see tdf#30668 and commit ba27366f3d6bc6b209ecd5c5cb79a9ee5315316a "Resolves: #i17171#
Writer paragraph cannot be longer than 65534 characters".
Comment 5 NISZ LibreOffice Team 2023-03-27 09:42:13 UTC
VERIFIED IN:
Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 67bb7f71b785d3d831ffaa47262b6cbd84e71c42
CPU threads: 8; OS: Windows 10.0 Build 19044; UI render: Skia/Vulkan; VCL: win
Locale: hu-HU (hu_HU); UI: hu-HU
Calc: CL threaded