Open JulienPalard opened 5 days ago
I don't know how to reproduce this. Do your have more information?
BTW: I am working from Ubuntu 24.04
Here is the script I am running:
import logging
from ooodev.loader.inst.options import Options as LoOptions
from ooodev.loader.lo import Lo
from pathlib import Path
import tempfile
def b():
options = LoOptions(log_level=logging.DEBUG)
with tempfile.TemporaryDirectory() as tmpdirname:
tmpdir = Path(tmpdirname)
with Lo.Loader(
Lo.ConnectSocket(
headless=True,
extended_args=[
f"-env:UserInstallation={tmpdir.as_uri()}/user_profile",
f"-env:UNO_SHARED_PACKAGES_CACHE={tmpdir.as_uri()}/shared_packages_cache",
],
),
opt=options,
) as loader:
pass
b()
The env
args just tells LibreOffice to not load any user or shared extensions by setting their paths to a temp directory.
On the command Line I run:
PYTHONTRACEMALLOC=20 python repro.py
Entire Results are:
05/10/2024 12:42:15 - DEBUG - LoInst - Root: LoInst Init
05/10/2024 12:42:15 - DEBUG - LoInst - Root: LoInst created
05/10/2024 12:42:15 - DEBUG - LoInst - Root: load_office()
05/10/2024 12:42:15 - DEBUG - LoInst - Root: on_reset() Triggering RESET
05/10/2024 12:42:15 - DEBUG - LoInst - Root: on_reset() RESET Triggered. Current Doc is None
05/10/2024 12:42:15 - DEBUG - LoInst - Root: on_office_loading() Triggering OFFICE_LOADING
05/10/2024 12:42:15 - DEBUG - LoInst - Root: on_office_loading() Triggered OFFICE_LOADING.
05/10/2024 12:42:17 - DEBUG - LoInst - Root: on_office_loaded() Triggering OFFICE_LOADED
05/10/2024 12:42:17 - DEBUG - LoInst - Root: on_office_loaded() Triggered OFFICE_LOADED
05/10/2024 12:42:17 - DEBUG - LoInst - Root: load_office() Loaded Office
05/10/2024 12:42:17 - DEBUG - LoInst - Root: Closing Office
05/10/2024 12:42:17 - DEBUG - LoInst - Root: on_office_closing() Triggering OFFICE_CLOSING
05/10/2024 12:42:17 - DEBUG - LoInst - Root: on_office_closing() Triggered OFFICE_CLOSING
05/10/2024 12:42:17 - DEBUG - LoInst - Root: Office terminated
05/10/2024 12:42:17 - DEBUG - LoInst - Root: Office bridge has gone!!
05/10/2024 12:42:18 - DEBUG - LoInst - Root: on_office_closed() Triggering OFFICE_CLOSED
05/10/2024 12:42:18 - DEBUG - LoInst - Root: on_office_closed() Triggered OFFICE_CLOSED
05/10/2024 12:42:18 - DEBUG - LoInst - Root: on_reset() Triggering RESET
05/10/2024 12:42:18 - DEBUG - LoInst - Root: on_reset() RESET Triggered. Current Doc is None
Hmm... I noticed Warning: failed to launch javaldx - java may not function correctly
in our output. I wonder if this is related?
The next release has extra steps in place when closing. Most likely this will be resolved.
Forgot to say there's an export PYTHONDEVMODE=y
in my bashrc, this enables cpython to show this kind of warnings, maybe that's just what's missing?
sry
Warning: failed to launch javaldx - java may not function correctly
Seens this too, but I have no idea what this is :D Tried $ apt search javaldx
, found nothing (I'm running Debian here).
I have found the default version of Debian to be a bit problematic. When I tried to install APSO or LibrePythonista (the only two I tried) on a default installation of Debian they would not install. I notiecd the default Debian did not have LibreOffice Base installed. Also when I checked in LibreOffice Settings there was no Java installed.
I tried so many ways to install java on Debian for LibreOffice and had no luck. I figured the failed installs of APSO and Librepyhthonista in Debian were due to missing Java. I could not fix it so I installed a Flatpak version of LibreOffice and then it worked fine.
Version 0.47.19
has been released to day. I now monitors the subprocess that starts LibreOffice and shuts it down when the main thread stops.
Using ooo-dev-tools 0.47.18 (also on 0.47.17 and I don't remember for previous ones) I'm getting a
ResourceWarning
about un unkilled subprocess:with
repro.py
containing: