LibreOffice on Windows Server

Hello everyone. Can’t solve the problem in Java Web Application. The application has been in production for several years now, I only add new functionality if necessary. For the last half of the year, all that had to be done was to update the libraries. But starting from December last year, it began to “freeze” for clients.

The functionality of the application is to work with documents of various formats: uploading to the server, deleting a document, creating previews, and downloading files. When uploaded to the server, the files are converted to .pdf format. So, the application is running on Windows Server 2016 Standart 10.0.14393 Build 14393 x64-based PC and LibreOffice 6.4.x.x is also installed, WildFly 20.0.0 Final on which the application is launched.

The task was to upgrade LibreOffice 6 to 7. I read the release notes and did not find anything that would prevent me from upgrading the LibreOffice version. We installed version 7.1 (just in December), then the problems started.

The problem is that when loading a file in the .docx/.doc format, the file is not loaded correctly, the preview is “broken”, and the “unkillable” soffice.bin/.exe processes remain on the server in the Task Manager.

As it turned out later, clients use barcodes in documents (but for 4+ years), and I also go to the “File” property in LibreOffice and choose “Properties…”, so I find the checkbox for embed fonts is enabled. If this checkbox is removed, then everything works correctly on any version of LibreOffice. But with it, starting from version 6.4 inclusive and higher - the program “freezes” for 2 minutes. This is the timeout limit in jodconverter per process.

However, if I do the same manipulations on my local machine where Windows 10 is installed, then everything works fine for me, as well as on other local machines. The problem is only on Windows Server 2016, which we have for tests, as well as for clients.
What I tried on the server: I installed the old version of the Java application from 2020 year and LibreOffice 6.4 and 7.1 - it still doesn’t work. I took the latest version of the Java application, but LibreOffice 6.0 - 6.3 (inclusive) - and everything works. I also installed font with barcodes from a file - Free 3 of 9, it also did not help for LibreOffice 6.4 and higher.

Installing LibreOffice 6.0 also installed Microsoft Visual C++ Redistributable 2015 x64, I thought that was the problem. But after trying different combinations, I was not successful in solving the problem. At the moment, Microsoft Visual C ++ Redistributable 2015-2022 x64 and Microsoft Visual C ++ Redistributable 2017 x86 are installed on the server. Guided by this article.

Regarding Microsoft Visual C ++ Redistributable, I read an article that earlier, when installing LibreOffice, this package was also installed in a parallel process, but Microsoft changed the license to use the software or something like that, and then The Document Foundation stopped inserting into the LibreOffice installation file Microsoft Visual C++ Redistributable.

I want to note that the problem is not in the specification of files or barcodes since I created a completely empty document on the server, through LibreOffice, in the .docx / .doc format and put the font checkbox - it also “freezes”, and all the symptoms that I described above appear.

I came to the conclusion that the involvement of the Java application itself, fonts, or the .docx / .doc format in the error is unlikely, although not excluded.

Can you tell me the solution or where to look for the problem?

What you describe looks suspiciously related to tdf#124470, which I fixed in 7.1, 7.0 and 6.4. Of course, there could be a regression caused by the fix - please file a bug report with a sample file.

Sorry, but the first time I ask a question, I usually find the answer myself. Therefore, could you tell me exactly where to post the error report and in what form to describe everything, how did I ask the question here?

I can’t attach the file here, since it is over 4MB, despite the fact that it is completely empty, only the embed fonts checkbox is activated, which increases the size. You can create such a file on your local machine simply:

  1. Create a Writer file;
  2. Go to File - Properties… - Fonts;
  3. Activate the checkbox “Embed fonts in the document”;
  4. Save it as “.docx”.

Thanks for understanding.

Bug tracker submission form is at https://bugs.documentfoundation.org/ (also available as “New” link from the bug I mentioned above).

Please just describe the problem in the new issue there, attach the sample file, and provide exact soffice command line executed by your app on the server that results in the freeze. Please CC me there. Note that “create yourself” is not always helpful, even if you believe it’s easy: e.g., it could depend on the font set on your system, or used default template, which would be different on another’s system, so even in simplest case, it’s best to provide a sample which is known to show the problem to you.

Also you might want to provide call stack and/or minidump of the frozen soffice.bin process to the issue - see here.