Back to LanguageTool Homepage - Privacy - Imprint

Out of Memory Error LT 4.7

Ich habe LibreOffice unter Windows 10 (alles 64-bit). Seit dem letzten Update von LanguageTool auf 4.7 ist es unverwendbar.
Es gibt einen Java OutOfMemory Error (Java heap space).

Auch Java ist 64-bit

An easy way to solve OutOfMemoryError in java is to increase the maximum heap size by using JVM options “-Xmx512M” or “-Xmx1G” etc.
Or use JVM parameter -XX:OnOutOfMemoryError= to run any command in an event of first OutOfMemoryError thrown by JVM. You can also generate heap dump on OutOfMemoryError by using -XX:+HeapDumpOnOutOfMemoryError and -XX:HeapDumpPath= to specify directory where heap dump needs to be created. With this much information its easy to diagnose any memory leak in Java.

Maybe. But how do I specify this in LibreOffice ?

@Fred.Kruse I wonder whether the cache used ever removes entries? In other words, if someone uses LibreOffice + LT for many hours, will this make the cache grow ever bigger?

Specifically, in Options -> LibreOffice -> Advanced , click Open Expert Configuration ; in the dialog, navigate to org.openoffice.Office.Common/Cache .

Thanks. I will try. Which of the many suboptions here ?

I am just on vacation. I’ll have a look when I am back.

@dnaber: I checked the code again. The cache shouldn’t grow.
The cache is organized by paragraphs. It is build by the first iteration of text. After change of one paragraph, the old cache for this paragraph is deleted and a new entry is created. After a reset initiated by the user the whole cache is deleted and build up new. If a document is closed the whole cache is deleted for the document.
I think the cache is not the cause of the out of memory error, but I will have it in mind and will have a look on it.

Thanks for checking.

The problem seems to depend on the Java version used by LO.

The problem is reproduceable with AdoptOpenJDK 13 on Windows 10
It does not occur with Oracle Java RTE 1.8.0_231

I tried several Java versions:
Oracle java 1.8, 13.0.1 -> no problem
openjdk13 -> no problem
AdoptOpenJDK 13.0.1-hotspot JVM -
> problem occurs
AdoptOpenJDK 13.0.1-Java9 (Eclipse) JVM --> no prblem