Is there a workaround for Writer's formula corruption?

I am working on writing lecture notes and i need extensive use of complex math formulas. Writer’s random formula corruption renders the software in a completely unusable state. This isn’t a new bug from what I understand (e.g. bug #99225) but since the bug has yet to be fixed, I’m wondering if there’s any workaround that can prevent or minimize the chances of it happening.

I am referring to the bug whereby formulas randomly vanish even when they aren’t edited. Some things I’ve tried:

  • Copying these objects when I suspect corruption. Doesn’t work, the copied formulas carry the corruption / are empty.
  • Killing the program & re-loading from last save. Doesn’t work, the corruption somehow makes it into the save file?
  • Disabling the auto-save feature. Doesn’t work, suggesting that the corruption isn’t caused by save errors.

This isn’t a new bug from what I understand

Don’t mind mentioning the bug #?

Done (bug #99225).

I can only tell you my observations, there is no guarantee that it works for you:

The default graphic settings in Tools > Options > Memory are not suitable for documents with lot of formulas. Writing a math document has often more than 20 formulas on one page, so that “Cache for inserted Objects” needs to be much larger. Try it with 1000. On the other hand you can reduce the “Memory per object”, if you have no images but only formulas in the document. Even with complex replacement image math formulas are likely smaller than 50KB.

You should test, whether it helps to increase the “Remove from memory after” time.

Do not use other applications parallel, so that LibreOffice gets as much RAM as possible, or get more RAM for your PC.

Besides that, all things, that force the formulas to be redrawn, will make the document more stable.

Always use “save as” when finished, to keep the last version, so that you can go back, if the new version becomes corrupt.

Possible workaround:

  1. Create a formula.
  2. Copy it to clipboard.
  3. Paste special as GDI metafile.