Access2Base DoCmd.Quit() leaves LibreOffice in memory

Discussions about using 3rd party extension with OpenOffice.org
Post Reply
User avatar
echo8hink
Posts: 12
Joined: Wed Mar 02, 2016 7:59 pm

Access2Base DoCmd.Quit() leaves LibreOffice in memory

Post by echo8hink »

I have been using Access2Base in my macros to open and close forms. I recently discovered the "Quit()" action and have used it on a Main Menu form in LibreOffice Base. I use the option: Const acQuitPrompt = 0, and it appropriately gives the message box to save before exit and appears to work. However, when I check in the Windows task manager, there are two entries where it shows LibreOffice still in memory.

I am wondering if I missed cleaning something up before using the action of if it's something else. I have removed the action because those memory remnants seem to make LibreOffice unstable and increase the chances of it locking up in mid-app after using it.

-Dave
LibreOffice 5.4.5.1 on Linux Mint 18.3
User avatar
Villeroy
Volunteer
Posts: 31269
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Access2Base DoCmd.Quit() leaves LibreOffice in memory

Post by Villeroy »

Disable the "quick-starter".
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
User avatar
echo8hink
Posts: 12
Joined: Wed Mar 02, 2016 7:59 pm

Re: Access2Base DoCmd.Quit() leaves LibreOffice in memory

Post by echo8hink »

The Tools->Options->Memory LibreOffice Quickstarter is not enabled. Would it have anything to do with the DBClose() macro recommended call in Tools->Customize->Events?
LibreOffice 5.4.5.1 on Linux Mint 18.3
JPL
Volunteer
Posts: 130
Joined: Fri Mar 30, 2012 3:14 pm

Re: Access2Base DoCmd.Quit() leaves LibreOffice in memory

Post by JPL »

Could you please try

Code: Select all

RunCommand("Quit")
and report us the result ?

Thanks in advance.
JPL
Kubuntu 22.04 / LibO 7.5
Access2Base (LibO).
BaseDocumenter extension (LibO)
ScriptForge (LibO)
Documentation on https://help.libreoffice.org/latest/en- ... bPAR=BASIC
User avatar
echo8hink
Posts: 12
Joined: Wed Mar 02, 2016 7:59 pm

Re: Access2Base DoCmd.Quit() leaves LibreOffice in memory

Post by echo8hink »

I replaced the Quit(acQuitPrompt) with RunCommand("Quit") and it cleanly quits with no remnant of LO in memory (Yeah!) when I check with Windows Task Manager. However, when I open the database file it insists on recovering. I also tried closing the form first with mClose() and then quitting and got the same results. I am beginning to think a MsgBox telling the user to "Ctl-Q" may be the best option. It's so easy.

Would it make a difference if the macro was in "My Macros" and not in the .odb file? I may try that...
LibreOffice 5.4.5.1 on Linux Mint 18.3
User avatar
RoryOF
Moderator
Posts: 34586
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Access2Base DoCmd.Quit() leaves LibreOffice in memory

Post by RoryOF »

Try a delay between the close command and the exit LibreOffice command, to give time for the close to work.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
User avatar
echo8hink
Posts: 12
Joined: Wed Mar 02, 2016 7:59 pm

Re: Access2Base DoCmd.Quit() leaves LibreOffice in memory

Post by echo8hink »

Tried "Wait 2000". Clearly enough time to see form close and go away. Now LO doesn't close?
LibreOffice 5.4.5.1 on Linux Mint 18.3
User avatar
Villeroy
Volunteer
Posts: 31269
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Access2Base DoCmd.Quit() leaves LibreOffice in memory

Post by Villeroy »

Leave the application up and running. I don't know what the problem is but it could be a problem that you try to let a Basic program shut down its own environment.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
User avatar
echo8hink
Posts: 12
Joined: Wed Mar 02, 2016 7:59 pm

Re: Access2Base DoCmd.Quit() leaves LibreOffice in memory

Post by echo8hink »

I think, for now, I am going to leave it at closing the main menu switchboard form and then letting the user close the Office interface by whatever means is comfortable or usual for them. I thought I had found a way to use a macro action to simplify this, but it seems to be too problematic for now...

thanks all
-hink
LibreOffice 5.4.5.1 on Linux Mint 18.3
Post Reply