LibreOffice is Not Responding when doing massive Find and Replace ... or when doing other things. The Fix.

We recommend you bookmark this blog. Trying to find helpful information in forums usually just ends in making you frustrated and angry. This blog does not speculate or guess. If we post it, we've tried it and it works. If you don't want to read all the intro stuff, skip to the section in yellow below and heed those instructions only.

Scenario

I do a lot of conversions of public domain books from pdf to .odt formats. In doing so, I am working from .txt versions of the books to convert them to .odt versions. That process requires me to do a ton of clean-up to the .odt files, including massive Find and Replace tasks. For example, the file will be full of multiple repeating spaces between words, where there should be only one space. To accomplish that task, I search for (space, space) and replace it with (space). And herein lies the rub: when doing this in a 600-page document, there can be upwards of 100,000 replacements. Naturally, it takes a long time to do all those replacements, and, more importantly, this procedure leads to exceeding LibreOffice Writer's built-in "Undo" limits, which results in the following "Not Responding" pop-up screen.

Not responding

Now, when I was a novice at doing these book conversions, and being someone who is generally lacking in a great deal of patience, I used to spend a lot of time either clicking on the "wait" button, or, after dozens of those clicks, just went to the "Force Quit" button. But that did nothing but put me into a circular dilemma.

FIXES

Sections

My next "fix" (I hate "fixes"!!!) was to insert sections into my document, then run the Find and Replace process for each section. Normally those sections would amount to about 100 pages each, so as not to exceed the default Undo limitations in Writer. That is not a bad way to fix the problem, but I still I did not find it very satisfying.

Change the Number of Undo's

One of my other fixes was to go to the Advanced Options of Writer and change the Undo limit numbers. I won't elaborate on that, other than to say that it might or might not help to some extent, but otherwise it's a waste of time and effort.

Discovery: Offer to Turn Off the Undo Button

One day, I pondered "What would happen if I just did nothing for some period of time when the "Not Responding" box popped up?" Lo and behold, on one of those occasions, a box popped up with the offer to turn off the undo function for me. So I checked the "Yes" button. And waited. And waited.

Patience Pays Off

When I accepted the offer to turn off the "undo" function, the "Not Responding" box popped up again. But having learned that sometimes the only fix available requires patience—and realizing that a whole lot of Search and Find replacements were actually happening in the background—I simply waited. And voila! After about 45 seconds (on average) the Find and Replace function finished and the following box popped up. Note that there were 214,475 replacement instances! 

In Short:

Any time you are doing anything in LibreOffice Writer that requires a whole lot of stuff in the background, such as making hundreds, or hundreds of thousands of Find and Replace changes, it takes a whole bunch of time to make those changes, and that number of changes will exceed the default "undo" number built into Writer, thus invoking the dread "LibreOffice is Not Responding" message.

The Solution: Patience

As stated above, the best response is to wait. How long? That depends. Maybe 45 seconds, maybe a few minutes. Maybe you should go play some Solitaire while waiting, as a I frequently do, checking in every five minutes or so to see if the Find and Replace has finished. 

If Patience Does not Work?

But what happens on those rare occasions where patience does not work, or I simply cannot stand to wait any longer? In that case, I suggest you resort to the "Sections" fix mentioned above. It takes a while, but you can't have everything you want in life.

Addendum

I also found that adding additional memory to my computer (Ubuntu OS) seemed to help. I had only 8 mb of memory, upgraded to 16 mb. Hard to tell, but I think that helped some.






Comments

  1. Thank you very much for this tutorial. I got this from your post on the LibreOffice Users group.

    ReplyDelete

Post a Comment

Only comments that improve or disprove the contents of the posts on this blog will be approved. Opinions and speculations generally will not be approved. "Self-serving" links will not be approved. Product and advertising links will not be approved, but plain text recommendations might be approved. No form of vulgarity or cursing will be approved. No personal disparaging remarks will be approved. All comments become the property of this blog immediately upon the member's/reader's posting of the comment. All comments may be rejected or edited without recourse to or by the commenter. By posting, you agree to hold harmless this blog, its owner, editors, administrators and contributors, even if your post is approved as-is.

Popular posts from this blog

LibreOffice Freeze and Slowdown - "Memory" and "Undo" Settings

Creating an Epub file with a clickable TOC using Libreoffice and Google Docs

Inline Styles Have Arrived in LibreOffice 25.n