Bug 170404 - Base file couldn't be closed when Macro editor has been opened (Crash of LO).
Summary: Base file couldn't be closed when Macro editor has been opened (Crash of LO).
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
26.2.0.0 alpha0+ master
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2026-01-20 15:38 UTC by Robert Großkopf
Modified: 2026-01-21 16:01 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Open Database, macros allowed. Close form, switch to macro editor, then close the Base file… (1.29 MB, application/vnd.oasis.opendocument.database)
2026-01-20 15:38 UTC, Robert Großkopf
Details
Open Base file, open macro editor, close Base file. (3.89 KB, application/vnd.oasis.opendocument.database)
2026-01-21 07:33 UTC, Robert Großkopf
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Großkopf 2026-01-20 15:38:26 UTC
Created attachment 205105 [details]
Open Database, macros allowed. Close form, switch to macro editor, then close the Base file…

Open the attached database file, macros enabled.
A form will appear. Close the form.
Start the macro editor.
Switch from macro editor to the Base file.
Close the Base file.

Base hangs, couldn't be closed.

There is one procedure set for the Base document when "View is going to be closed". It should only flush data. If I remove this procedure the buggy behavior doesn't happen.

This bug appears with
Version: 26.2.0.1 (X86_64)
Build ID: 334ecff79a5ea28464a392deab1041cf2e705201
CPU threads: 6; OS: Linux 6.4; UI render: default; VCL: kf5 (cairo+xcb)
Locale: de-DE (de_DE.UTF-8); UI: en-US
Calc: threaded

won't appear in 
Version: 25.8.4.2 (X86_64)
Build ID: 290daaa01b999472f0c7a3890eb6a550fd74c6df
CPU threads: 6; OS: Linux 6.4; UI render: default; VCL: kf5 (cairo+xcb)
Locale: de-DE (de_DE.UTF-8); UI: en-US
Calc: threaded

on the same machine.
Comment 1 Robert Großkopf 2026-01-21 07:31:29 UTC
Tested a little bit more.
When macro for "View is going to be closed" runs Base hangs.
It is the specific code of the following macro. Have put it in another database file without any content except one (empty) table.

Sub ViewClosing
	DIM oConnection AS OBJECT, oData AS OBJECT, oDatasource AS OBJECT
	oDatasource = thisDatabaseDocument.CurrentController
	IF NOT (oDatasource.isConnected()) THEN oDatasource.connect()
	oData = oDatasource.DataSource()
	oData.flush
End Sub

Note: Flushing of data for Firebird had been integrated since LO 25.8. Don't know the exact version. So the code won't be needed for current version, but Base shouldn't crash when executing in LO 26.2.
Comment 2 Robert Großkopf 2026-01-21 07:33:36 UTC
Created attachment 205111 [details]
Open Base file, open macro editor, close Base file.
Comment 3 raal 2026-01-21 16:01:34 UTC
No repro with Version: 26.8.0.0.alpha0+ (X86_64)
Build ID: 8fb5be18f8febe88f7d0b72e4b30efd41891feb7
CPU threads: 4; OS: Linux 6.8; UI render: default; VCL: gtk3
Locale: cs-CZ (cs_CZ.UTF-8); UI: en-US
Calc: threaded