https://bugs.documentfoundation.org/show_bug.cgi?id=171313
Bug ID: 171313
Summary: Controlling LibreOffice using an external Python
script doesn't work under Windows 11 since LibreOffice
25.8 (LO crashes)
Product: LibreOffice
Version: 25.8.0.0 alpha0+
Hardware: x86-64 (AMD64)
OS: Windows (All)
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: LibreOffice
Assignee: [email protected]
Reporter: [email protected]
Description:
It crashes if I start it in listening mode, connect to it using an external
python script and send some commands.
Steps to Reproduce:
1. Start LibreOffice in listening mode, e.g. from powershell:
PS C:\Users\yuri> & 'C:\Program Files\LibreOffice\program\soffice.com'
"--accept=socket,host=localhost,port=2002;urp" --writer
and right away it prints:
```
Could not find platform independent libraries <prefix>
```
the first time it starts it prints:
```
Entity: line 1: parser error : Document is empty
^
Could not find platform independent libraries <prefix>
```
2. Start the following script:
```
import uno
local_ctx = uno.getComponentContext()
resolver = local_ctx.ServiceManager.createInstanceWithContext(
'com.sun.star.bridge.UnoUrlResolver', local_ctx)
ctx = resolver.resolve(
'uno:socket,host=localhost,port=2002;urp;StarOffice.ComponentContext')
desktop = ctx.ServiceManager.createInstance('com.sun.star.frame.Desktop')
doc = desktop.loadComponentFromURL('private:factory/swriter', '_blank', 0, ())
```
PS C:\Users\yuri> & 'C:\Program Files\LibreOffice\program\python.exe'
path\to\the\script.py
Actual Results:
The exact behavior varies, but sooner or later it crashes. Rather sooner.
Sometimes it crashes right away. Sometimes it hangs. Sometimes it crashes and
prints:
Traceback (most recent call last):
File "C:\Users\yuri\...\something.py", line 9, in <module>
doc = desktop.loadComponentFromURL('private:factory/swriter', '_blank', 0,
())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
com.sun.star.uno.RuntimeException: Binary URP bridge disposed during call
Expected Results:
It creates a new document and doesn't crash.
Reproducible: Always
User Profile Reset: No
Additional Info:
Version: 25.8.0.1 (X86_64)
Build ID: 127f2cf27c25aaac008a1045ebfed22015cb3064
CPU threads: 16; OS: Windows 11 X86_64 (build 26200); UI render: Skia/Vulkan;
VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded
--
You are receiving this mail because:
You are the assignee for the bug.