Save text from crashing Writer document

Hi everyone!

I just had a LibreOffice writer document crash after I tried to resize a table that contained text (left cell) and an image (right side) - probably because the resize also affected the page break besides the image size and table structure. When I try to recover the document, the app crashes again. When I discard the recovery and load the file normally, it crashes, too.

I have found a few threads with similar issues and tried the following things:

  • Check “Force rendering by Skia” in Options → LibreOffice → View
  • Uncheck “Use Anti-Aliasing” and “Use Skia for rendering” in the same menu
  • Delete ~\AppData\Roaming\LibreOffice

Nothing has helped so far, so I am afraid that my progress on the document is lost.

I have a backup of the document with most of the structure and images present, but I added many paragraphs. Is there any chance that I can save the plain text from the document if I can ignore all the rest?

I already tried opening the document with a normal text editor, but obviously the data structure is not human-readable…

OS name (a.parently Windows, but which one)? LO version? Is this an .odt file or a non-native format like .docx?

If your document is not confidential and < 3MB, attach it for analysis. If confidential, attach it to a private message (click on the icon left of my name, then button Message).

Windows 10
LibreOffice 7.6.4.1
The file is an .odt.

It is not highly confidential, but I would not like to share it publicly. I can send it to you via PM.

EDIT: I don’t have that button. Could it be because I am a new user and don’t have the permissions?

EDIT2: Yes, I need to earn Trust Level 1 first before I can send PMs. But that shouldn’t take too long.

All you need is an additional step, as LibreOffice uses .zip-archives
Copy your name.odt to name.zip
Open the .zip and search for contents.xml
xml is “human readable” but neither easy nor friendly…

The things you quoted may help to prevent LibreOffice crashing, but not to recover a corrupted file. (In some cases the removal of the LibreOffice-profile in %APPDATA% may help, but if your backups ate placed in this profile it will actually remove backups also… So better rename instead of remove.

1 Like

Your file freezes my LO 24.8.3.2 under Fedora 41, KDE Plasma desktop. So, I looked at its contents.


First observation: your document is plagued with direct formatting instead of styling. This puts considerable stress on Writer, aggravated by a long inconsistent editing history (Writer has a markup feature to ease comparing documents and versions, but this markup has an effect similar to direct formatting with the consequence of slicing the encoding in very short unique sequences even if the formatting ends up the same).

Second observation: you have huge images in the document. They come in 3 formats: JPEG, PNG and SVM. It appears the last one was created for Star Office and few programs can display them nowadays. Apparently Draw can and therefore Writer can use them. But you didn’t care to tailor the images for the final usage in your document: they are stored “as is” and you probably requested cropping and scaling in the Writer insertion dialog. This also puts a considerable stress on Writer, both in file size and processing when displaying. To avoid damaging the image and to allow for reverting to original version without loss, Writer does not modify the image; instead, it computes a “transfer function” to be applied to the image whenever it is needed. You should always preprocess pictures with a dedicated image manipulation program like GIMP to scale (pixel density) and resize (width and height) them before inserting. This way, byte volume is kept to ideal and transfer function is not needed. In particular, this would avoid the 2+ MB images.

Third observation: near the beginning of the document, you have rectangular Drawing Objects anchored to empty paragraphs and apparently positioned manually. Since your document freezes Writer, I can’t check how they are used. I suspect your intent is to create a border around title and author name plus a thick line. This is wrong. A border is a paragraph attribute and should be defined as such, either as direct formatting or through style definition. This also spares the pain to reposition the rectangle when you edit your text.

Fourth observation: you have 4 single-row tables. If I understand correctly your goal, the left cell contain text and the right cell images. You want to “isolate” the images from text. Creating a table for this is useless (remember that tables are “complex” objects to handle because every cell is an independent sub-document and if you add pictures=frames over it, you make it even more difficult to manage).

Frames (images) are always external to text and with proper wrap property will not interfere with text. So either you write your text like ordinary discourse and you let wrap mode create “holes” in text for images; or you modify paragraph right indent (in your case) to create white space for the images. An indent is a paragraph-specific extra margin added to the page one. You can specify properties of the frame associated with the image so that the image always keeps its relative position to the paragraph no matter how you edit the document. If the image is taller than you text, you can also request that no other text is flown aside the image if needed.


IMHO, the document could as well have been composed with a mechanical typewriter (direct formatting). It also erroneously uses sophisticated constructs (like tables or drawing objects) as workarounds for ignorance of simple built-in features (like borders).
I recommend you learn first how Writer works. Read the [Writer Guide](https://documentation.libreoffice.org/en/english-documentation/), particularly the chapters about styles.
Since your document is (presently?) small, the simplest solution is to start anew. Don't use Drawing Objects, nor tables: there are other more efficient ways. Prepare your images outside Writer to the exact dimensions and resolution for the final output (96 dpi for screen or Web; 300 dpi for print).

Thank you so much! That is exactly what I needed to restore the lost paragraphs!


@ajlittoz I appreciate the time you took for an extensive review of the document structure. I am definitely no “power user” of the LO suite, so I am not surprised that I did not always style my document the proper way.

I will definitely take the remarks regarding the general styling and image sizes to heart, although I find it a bit of a hassle that I need to determine the width and height of pictures in an external program (the reason my document crashed is that I wanted to make one of the images slightly smaller to make more room for the paragraph).

Regarding the use of tables for styling, I just used to do whatever works - in MS Office as well as in OpenOffice and LibreOffice - because I used to feel that available documentation is often lacking and it requires a disproportionate amount of time to get a deep understanding of how the software works. Obviously, it’s cleaner to define general styles and apply them to all pages rather than formatting each page individually, but often this kind of functionality makes it very hard to make a really minor change to the format so that you end up deciding if you invest half a day in deep-diving into the documentation, or you just do it “quick and dirty”.
Maybe I am out of touch and the software and documentation have improved in the last decade. AI has also helped me a lot with finding the information I am looking for. I will have a look. Just understand that to me, like to many people, these issues are just annoyances that keep me from doing my actual work…

By the way, why are my line breaks removed in my posts? Even double line breaks. Makes them very hard to read…

Basically the Discouse engine for this site is HTML compliant. HTML says that except in preformatted elements, any white space sequence (spaces or line breaks) is collapsed to a single character. Therefore, multiple linebreaks are reduced to a single one, leaving no space between paragraphs.

My trick to space paragraphs apart is to follow HTML standard: I add <br> at start of paragraph and this gives me a blank line.

And since you can add almost any HTML elements, you can <sup> for superscripts x2, <sub> for subscript an and many more LATEX, AAA. Unfortunately, you can’t pass style=… attributes.

To insert a literal < you must type &lt; to escape HTML tag recognition.

However, basic formatting here is done according to Markdown. This means that what you type is filtered out (notably to avoid XSS and other forms of attack) and explains why some HTML tags won’t work.

I disagree with “disproportionate amount of time”. The ultimate goal is not to get a deep understanding of the software. It is to get a decent understanding to achieve common tasks. Deep understanding is only necessary for people like me who create very complex and large documents and don’t want to wait hours while Writer reflows text.

Any introduction of a new tool requires reconsidering one’s habit. When you switch from nails to screws, do you drive screws with a hammer? When you drop your child bike for a car, do you start without driving lessons? Same with software. Writer is not Word even if the ultimate product, a book a letter or a paper, is the same.

On the contrary, with a neatly designed collection of styles, you separate look from contents (text). Then a change in text is done in the text itself and has no impact on formatting (unless you apply some style to your edit). A change is formatting is handled exclusively on style settings and it takes effect on all similar contexts (without the need to hunt for them).

The documentation is not perfect and does not emphasise enough the basic foundation on styles. Bruce Byfield’s Designing with LibreOffice is much better on this topic. The TDF documentation is oriented towards application driving, not document composition, shame.

What you need to avoid wasting half a day in searching fruitlessly the documentation is a basic understanding of the style concept. It is ubiquitous in Writer: page, frame, list, paragraph, character. Paragraph and character styles interact because a paragraph style defines a default character style. And you have the dreaded direct formatting (DF) which overrides everything. DF is the mechanical typewriter method where everything is manual and explicit (no automation). Unfortunately, Word has conditioned us into it because it only has a rudimentary notion for paragraph styles but nothing else.

DF urges you into the quick’n’dirty. And creates such a mess that tuning document formatting becomes an unmanageable nightmare.

I don’t pretend that mastering Writer is easy. It took me at least a decade to reach my skill level with nearly daily practice. And even now, I am still discovering better ways to do things I thought was optimal.

But Writer provides tremendously powerful tools and this partly bridges the gap with desktop publishing applications (DTP), except that those are generally page-oriented while Writer is flow-oriented. This latter remark is extremely important: pages do not exist until you need them. Therefore, it is pointless to hope for “my paragraph should go to page 5 and nowhere else”. If your document is structured as a set of pages, each with a specific role and exclusive contents, Writer is not the ideal tool (it can be used as a poor man’s DTP program but edits can potentially ruin the page structure).

That’s really weird. Why would they do that?
When I just add line breaks without a <br />, I don’t get any empty lines. When I put a <br /> into an empty line, the engine produces two empty lines. I have to put the <br /> at the end of the previous paragraph.

Also, the line breaks worked fine in the original post. It’s just in the responses that I have to use the tags… Really weird!

Yeah, that’s fair. I think it’s a frequent habit of people to just figure out software on their own and neglecting the documentation, because it works well enough most of the times. (And because software documentation is notoriously unpleasant to read.)

I get that, but I often feel that the overhead of setting up proper styles is not worth it for a document that you just create once and then probably never change again. (Obviously the overhead would not be that much if I knew what I was doing.) When you write a thesis it’s a different story (but I used LaTeX for that).

Thanks, I will check it out.

May I ask what you do for a living?