https://bugs.documentfoundation.org/show_bug.cgi?id=174392
Bug ID: 174392
Summary: [SDK Python] Python VBA may become unresponsive if
triggered multiple times from a button
Product: LibreOffice
Version: 27.2.0.0 alpha0+ master
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: sdk
Assignee: [email protected]
Reporter: [email protected]
Description:
Python VBA may become unresponsive if triggered multiple times from a button.
Steps to Reproduce:
1. Open sample Calc.
The sample file contains the following two Python code examples:
fill_selection: Code that utilizes a VBA service, which can cause issues.
fill_selection_DA: Equivalent code that utilizes a standard DataArray.
``` py
def fill_selection(*args):
ctx = XSCRIPTCONTEXT.getComponentContext()
app = ctx.getServiceManager().\
createInstanceWithContext("ooo.vba.excel.Application", ctx)
app.Selection.Value = "x"
def fill_selection_DA(*args):
rngs = XSCRIPTCONTEXT.getDocument().getCurrentSelection()
if rngs.supportsService('com.sun.star.sheet.SheetCellRange'):
rngs = (rngs,)
for rng in rngs:
rng.setDataArray(((('x',) * rng.Columns.Count),) * rng.Rows.Count)
```
2. Select cell range(s).
3. Push "Call_VBA_Python" Button for executing vba python code.
Actual Results:
4. In many cases, an "x" is initially inserted into the selected range as
expected.
However, repeated execution causes the application to become unresponsive.
Expected Results:
4. Repeated execution does not cause the application to become unresponsive.
Reproducible: Always
User Profile Reset: No
Additional Info:
Reproducible in
[2026-11-07]
Version: 27.2.0.0.alpha0+ (X86_64)
Build ID: 95c0712c2bba0ba27f5218b2ce61297fafa95714
CPU threads: 4; OS: Windows 11 X86_64 (build 26200); UI render: Skia/Raster;
VCL: win
Locale: ja-JP (ja_JP); UI: en-US
Calc: CL threaded
--
You are receiving this mail because:
You are the assignee for the bug.