Bug 159239 - Closing the app while running a macro is silently blocked
Summary: Closing the app while running a macro is silently blocked
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
24.8.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: BASIC-IDE
  Show dependency treegraph
 
Reported: 2024-01-17 10:46 UTC by Heiko Tietze
Modified: 2024-01-21 22:51 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Heiko Tietze 2024-01-17 10:46:10 UTC
Assuming you run a macro having the execution on halt at a breakpoint. In this state you cannot close the application, similar to when a modal dialog is open but the Exit command is not disabled. Clicking the window's X shows the reason but not when clicking Exit.
Comment 1 Rafael Lima 2024-01-21 22:51:28 UTC
So I tested the following from within the Basic IDE:

1) In the Basic IDE, I created a Sub and placed a breakpoint inside of it
2) I ran the macro and the breakpoint was reached
3) If I try to close the window via the X button, I get the message "The window cannot be closed while BASIC is running." (this is OK)
4) If I try to close the window via File - Exit, nothing happens and I do not get a message (a message should be shown as when the "X" button was clicked)

Then I ran the following test from within Calc (or any other LO application)

1) Open the Basic IDE and place a breakpoint in a Sub
2) From within Calc, run the macro (Tools - Macros - Run macro)
3) The breakpoint will be reached
4) If I click "X" in the Calc window, the window will close (I guess it shouldn't close, right?)
5) Then I went back to the Basic IDE and pressed the Stop button (to stop the running macro)
6) CRASH

Many things to fix here.

Tested with

Version: 7.6.4.1 (X86_64) / LibreOffice Community
Build ID: 60(Build:1)
CPU threads: 16; OS: Linux 6.5; UI render: default; VCL: kf5 (cairo+xcb)
Locale: pt-BR (pt_BR.UTF-8); UI: en-US
Ubuntu package version: 4:7.6.4-0ubuntu0.23.10.1
Calc: threaded

The exact same result happens in current master

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 7850a7deb59b890c73dfd52bd5aced6a538e6349
CPU threads: 16; OS: Linux 6.5; UI render: default; VCL: kf5 (cairo+xcb)
Locale: pt-BR (pt_BR.UTF-8); UI: en-US
Calc: CL threaded