[Libreoffice-bugs] [Bug 139483] Find and Replace (with regular expression option) freezes when globally replace end of paragraph ($) with another character (##) in this case

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Sat Feb 27 12:41:15 UTC 2021


https://bugs.documentfoundation.org/show_bug.cgi?id=139483

--- Comment #4 from Andy Hird <ahird at overdrive.com> ---
I have been able to reproduce the crash with the following configuration. But
so far, only using the originally attached document.


LibreOffice version:    7.1.1.1
LibreOffice Build:      575c5867c4cc13d7ae78f9ce39a54a52ed38c769
Operating System:      Windows 10 (x64) Build 19042


Steps I’m taking (using the original sample document):

* Open Find/Replace and set it to Find '$' (with regular expressions) and set
it to Replace with any text.

* Using ‘Replace’ (instead of ‘Replace All’) to replace one at a time:  The
Find/Replace operation completes okay going through some of the document.
Sometimes there will be a delay and at others it will complete quickly. 

* When the 'end of paragraph' character in the heading is replaced on the first
page, the heading (not a header) is combined with the rest of the text on the
first page as a single paragraph. (This may or may not be relevant to causing
the actual problem.)

* When the 'end of paragraph' character in the HEADER on the second page is
replaced, something happens that causes text from first page to be ADDED to the
header.

* It’s at this point (if not sooner) that the program becomes unresponsive.


Observations:

1. To confirm from the original report, searching for and replacing the 'end of
paragraph' character (using regular expression $) is likely part of the
problem. That may be what is causing the Heading on the first page to merge
with the first paragraph.

2. The character put in its place does not appear to make a difference. I have
seen the crash with letters and numbers as well (‘apple’, ‘123’, etc.).

3. The first page heading is somehow tied to the header which is displayed on
ALL the other pages.

4. When text from the first page is added to the Header shown on every page,
that makes the document grow in size. I have seen it go from 26 to 96 pages.
(It might have grown more, but the program crashed.) So the problem may be more
likely with longer documents.

5. The document growing in size seems to be tied to the program crashing, but I
have seen it also become temporarily unresponsive for a moment when doing a
find/replace elsewhere in the document as well.


I have NOT been able to reproduce this on a brand-new document. So I am not
sure what configuration for the program or particular content in the original
document may be contributing to the problem.

But I can illustrate the problem on a revised version of the original document.
Effectively, I trimmed the document down to 2 pages and replaced the first
paragraph on the first page to just be the letter ‘A’ (see attached
‘Before.PNG’) to make it obvious which text is being added to the Header.

* After doing a Replace All, the paragraph of all ‘AAAA’s is added to the
Header, seen in the Header on Page 2 onward (see ‘After.PNG’ – I zoomed out so
multiple pages can be seen).

* The document grew from 2 to 9 pages.

* Even with just a 2-page document to start, the program did become
unresponsive.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20210227/776b2246/attachment-0001.htm>


More information about the Libreoffice-bugs mailing list