officecfg,stoc: allow running JVM UNO components out-of-process

Desktop / LibreOffice - Michael Stahl [] - 13 May 2022 14:33 UTC

The problem is that 32-bit Win32 applications have very little VM, and soffice.bin can run out, so try to move the JVM to a separate process (uno.bin) and connect to it via pipe.

Add a new config to enable this: "org.openoffice.Office.Java/VirtualMachine/RunUnoComponentsOutOfProcess"

If enabled, ServiceManager instantiates *all* JVM components out-of-process, by instantiating "" out-of-process.

To ensure that the remote connection is disconnected at shutdown (and thereby prevent crashes with remote calls during late shutdown), JavaComponentLoader is now a "single-instance" service; this change should be harmless for the default in-process configuration case.

Tested with these extensions: Wiki Publisher smoketest TestExtension.oxt odk CalcAddins.oxt Inspector.oxt ToDo.oxt

Also passed "make check" on Linux when enabled, if the variable URE_BIN_DIR is set properly for CppunitTest_services.

Change-Id: I76bf17a9512414b67dbd20daee25a6d29c05f9d9 Reviewed-on:

732fdafd9f7c officecfg,stoc: allow running JVM UNO components out-of-process
include/sal/log-areas.dox | 1 +
.../registry/schema/org/openoffice/Office/Java.xcs | 7 +
solenv/gbuild/ | 2 +-
stoc/source/javaloader/javaloader.component | 3 +-
stoc/source/javaloader/javaloader.cxx | 246 ++++++++++++++++++++-
5 files changed, 245 insertions(+), 14 deletions(-)


  • Share