Error when attempting Exports

Since updating to 7.3.1.3 yesterday (running Windows 10), “File > Export…” and “Export as PDF” result in the following error:

Error saving the document [filename removed for privacy]:
General Error.
General input/output error.

This is true using both Writer and Calc.

There’s a graph within a spreadsheet I’m working with, and when “Export as Image” is selected there is no dialog to save it. Absolutely nothing happens.

The Calc and Writer files themselves save just fine, into the same directory where I was attempting the exports.

Anyone else experiencing this, or have troubleshooting suggestions? I’ve tried uninstalling and re-installing LibreOffice, which had no effect.

Thanks in advance!

Turns out this was caused by updated options in the default system templates, although I have no idea why these issues began only after installing 7.3.1.3. They’ve been in place on my PC for a while over previous versions of LO, with never a problem.

Following a fresh install, the dates of these files are all currently 05/15/2021, so they haven’t been updated by the developers lately either.

So, why did I update these?

For example in Writer, setting default fonts via “Tools>Options”, Styles, or resetting my user profile has never worked for me. When new Writer files are created, they still revert back to “Liberation Serif”.

What’s has always worked is updating the LO default templates, as follows:

  • For folder:
    “C:\Program Files\LibreOffice”
    Change “Properties>Security” permissions for “Users” to “Full control”.

This allows the templates to be edited and saved.

  • Open the template for the desired LO program (for example soffice.odt for Writer), set the default fonts in the normal manner using “Tools>Options”, then save.

All are located in:
“C:\Program Files\LibreOffice\share\template\shellnew”

Once I remembered this was done in the past, not only did I uninstall/reinstall LO, but also manually deleted the following folders between those steps:

“C:\Program Files\LibreOffice”
“C:\Users[my user name]\AppData\Roaming\LibreOffice”

After that, all of the issues previously described disappeared.

As it stands, I’m now a bit hesitant to make these template changes, although I’ll experiment with that when I get the time.

But man, I’d surely love to know an easy way of setting default fonts for new files. It’s something that’s always driven me crazy. :confounded:

I think as a starting point, you should read General Installation Issues (Windows) - The Document Foundation Wiki and links from it, such as Controlled folder access.

You need to fix the problem, not try to make the symptoms go away.

Hmm… So, you’d consider the inability to retain default font settings for newly created files as a “symptom”, even after a clean install from scratch?

I’ve reviewed the page you mentioned before, with no help. If controlled folder access was the culprit (and it’s currently turned off anyway), I wouldn’t think I’d be able to successfully save the LO data files themselves into the same directory as I’m attempting to export into either.

From Writer, setting a font in Tools > Options > LibreOffice Writer > Basic Fonts (Western) > Default should mean all new Writer files have that font as default for Default Paragraph Style from which child styles such as Text Body derive many settings.

For other programs, and also works for Writer, you need to create a template and set it as Default. For example, in Calc, you would open a new spreadsheet, in the Sidebar, select Styles and at the top of the pane select Cell Styles. Right-click on Default, select Modify and in the Font tab set the desired font and OK. Then click File > Templates > Save as Template, in the dialogue window, enter a name for your template, e.g. MyDefault, select the category, e.g. My Templates, and tick the box Set as default template and click the button Save. To remove Default status click File > Templates > Manage Templates right-click your default template (has a green tick) and select Reset Default

If changing any settings in Tools > Options > … makes no difference then there is a problem with the installation, or you are opening in Safe Mode each time.

If you don’t get a Save As dialogue box when exporting an image then the is a problem with the installation.

I mentioned Controlled Folder Access because the symptoms seem to show that LO cannot write to the folder. The error below is typical of not being able to write to the file. If I export a file to PDF, look at it in a PDF viewer, then decide to make modifications and re-export it, I will get that error because it is still open in the PDF viewer so LO cannot write to the file.

Do you have another anti-virus program running?

BTW Deleting “C:\Users[my user name]\AppData\Roaming\LibreOffice” does reset your user profile, see LibreOffice user profile - The Document Foundation Wiki

Apologies in advance for this long post, but I wanted to be clear in addressing each section of what you’ve previously written…

From Writer, setting a font in Tools > Options > LibreOffice Writer > Basic Fonts (Western) > Default should mean all new Writer files have that font as default for Default Paragraph Style from which child styles such as Text Body derive many settings.

I think it should too, but it doesn’t. The default font options selected are only retained in the current Writer document, not new ones created within File Explorer (right click>New>OpenDocument text).

It’s been that way for as long as I can remember using LO on many different Windows computers, and the only workaround I’ve ever found in contained in my OP. I just performed that again, and low and behold I now get the default fonts I’ve set there when creating new documents. Curiously, after doing so following the re-install, the I/O error has also disappeared and exports complete normally.

As far as a possible problem with the installation, considering the preparation I did for a clean install, I can’t imagine what that might be. As I’ve noted, not only did I uninstall LO, but also manually deleted its only two associated directories that I’m aware of:
“C:\Program Files\LibreOffice”
“C:\Users[my user name]\AppData\Roaming\LibreOffice”

To reiterate, the exports then worked fine but the default font issue returned. Perhaps there’s additional steps I need to take prior to attempting a clean install which would address that (possibly removing registry entries, although I would hope those get cleaned up automatically when LO is uninstalled), but if so I don’t know what those steps may be.

Regarding Style templates, as I wrote in my OP I have the identical issue there as going the “Tools>Options” route. There’s no problem with modifying and saving the default template under a different name then setting that as such by ticking the checkbox, but new files still revert back to “Liberation Sans”. For LO to pick up my modified Style template, I have to manually load it via ““File>Templates>Manage Templates”, which actually creates another new file using my modified default font.

The error below is typical of not being able to write to the file. If I export a file to PDF, look at it in a PDF viewer, then decide to make modifications and re-export it, I will get that error because it is still open in the PDF viewer so LO cannot write to the file.

Neither target file (PDF or graph PNG) was open while I was attempting the exports. In fact, initially they didn’t even exist.

Do you have another anti-virus program running?

Nothing but Windows Defender, which I had tried disabling to correct the I/O issue with no effect.

BTW Deleting “C:\Users[my user name]\AppData\Roaming\LibreOffice” does reset your user profile, see LibreOffice user profile - The Document Foundation Wiki

Yes, naturally everything regarding LO application data is wiped out in doing so, which is part of what I did to prep for a clean install as documented above. When I need to reset my profile, I use the standard method of deleting or renaming only:
“C:\Users[my user name]\AppData\Roaming\LibreOffice\4\user"

Of course, that has the unfortunate effect of losing general LO customization. For example, after spending eons adding words to the dictionary they’re all lost, which is major PITA. I could save and restore “C:\Users\craig\AppData\Roaming\LibreOffice\4\user\wordbook\standard.dic”, but who knows if that’s also somehow been corrupted along with who knows what else in my user profile.

I’ve seen many posts which suggest resetting the user profile as a fix for various problems, but in my opinion that’s also a major problem in itself for the reason above.

I think if you always create new files from Explorer you will have problems with it not using default templates until tdf#90286, tdf#120141, tdf#122190 are all resolved.

Workaround Always create new files from within LibreOffice.
You can copy the path to the desired folder in Windows 10 by Shift+Right-click on the folder, selecting Copy as path and pasting that into the Save As dialogue box with a \ prior to the file name.

In my opinion, it’s a real hassle needing to open the base program just to create new files using any of LO components. This is especially true when I’m working with a lot of files in a given directory. That’s why the Explorer right-click options are present, since they’re much more convenient to use and don’t unnecessarily burn additional system resources.

As you’ve already stated, the problem needs to be fixed without using a workaround to make the symptoms go away. However, at the moment according to the Bugzilla records you’ve provided it’s definitely a bug which I’m powerless to do anything about.

Thanks for those links, but if they’re intended to fix the issue I’m not holding my breath as they were first reported between 4-7 years ago, and still remain open. If I’m going to use a workaround, I think the method in my OP is the way to go for now. At least it works, and if I run into this problem again I’ll know exactly how to resolve it.

Thanks for all the input!

You could try the LibreOffice dialogue boxes, you can save frequently used locations in the Places pane by navigating to folder then clicking the + as shown

To change click Tools > Options > LibreOffice > General and under Open/Save Dialogue boxes tick the box Use LibreOffice dialogue boxes

Thanks for the suggestion, but once again impractical and inconvenient as I’ve got LO data files in hundreds of directories.