Description: Hello! In Calc document I create new menu and menu item: Sub CreateMenu() Dim oDoc as Object, oMenu as Object GlobalScope.BasicLibraries.loadLibrary("ScriptForge") Set oDoc = CreateScriptService("Document") Set oMenu = oDoc.CreateMenu("MyMenu") oMenu.AddItem("Item 1", Script := "vnd.sun.star.script:Standard.Module1.Menu_Listener?language=Basic&location=document") oMenu.Dispose() End Sub When user clicks "Item 1" following event handler is launched: Sub Menu_Listener(args As String) ' don't finish before 5 s Wait(5000) End Sub Now, if user clicks "MyMenu" within 5 seconds, the document crashes (just after event handler finishes). Steps to Reproduce: 1. Create menu and menu item (using ScriptForge) 2. Create long lasting event handler and attache it to menu item created in step 1. 3. Click main menu created in stem 1. before event handler finishes. 4. Let the event handler to finish. 5. Entire document crashes. Actual Results: Document crashes. Expected Results: Document stays alive. Reproducible: Always User Profile Reset: No Additional Info: I was wondering how to disable menu at the beginning of the event handler and enable it just before it finishes, but I don't know how to do it. I would be nice if someone descibes how to do it.
Created attachment 199130 [details] Sample file to reproduce.
In "Steps to Reproduce" I forgot to write "Click menu item" after step 2.
Reproduced in Version: 25.8.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 7da1497aa462e2b719aa9b308a749caf7b9a19b1 CPU threads: 8; OS: Linux 6.1; UI render: default; VCL: x11 Locale: es-ES (es_ES.UTF-8); UI: en-US Calc: threaded
Also reproduced in Version: 24.2.0.0.alpha1+ (X86_64) / LibreOffice Community Build ID: 898d5d470e24a55556f2fb244fec24df33ba8855 CPU threads: 8; OS: Linux 6.1; UI render: default; VCL: x11 Locale: es-ES (es_ES.UTF-8); UI: en-US Calc: threaded
It did not crash for me in: Version: 24.8.4.2 (X86_64) Build ID: 480(Build:2) CPU threads: 12; OS: Linux 6.12; UI render: default; VCL: kf6 (cairo+wayland) Locale: pt-BR (en_US.UTF-8); UI: en-US Calc: threaded And it did not crash in Version: 25.8.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 862e86d187c53ab077b672997ca8d9623396b962 CPU threads: 12; OS: Linux 6.12; UI render: default; VCL: kf6 (cairo+wayland) Locale: en-US (en_US.UTF-8); UI: en-US Calc: CL threaded Maybe this bug is Windows-only? @JPL what's your opinion?
(In reply to Rafael Lima from comment #5) > > Maybe this bug is Windows-only? maybe you should read carefully Comments #3 and #4
Hi Rafael, I can reproduce it with GEN environment
I could not reproduce the issue in Version: 25.2.0.3 (X86_64) / LibreOffice Community Build ID: e1cf4a87eb02d755bce1a01209907ea5ddc8f069 CPU threads: 6; OS: Linux 6.8; UI render: default; VCL: kf5 (cairo+xcb) Locale: fr-BE (en_US.UTF-8); UI: en-US Calc: threaded (The Linux system is located in a VirtualBox Version 6.1.50_Ubuntu r161033 VM).
(In reply to Jean-Pierre Ledure from comment #8) > I could not reproduce the issue in Did you first disable Java -path explicitly and complete restart the soffice ??
Created attachment 199167 [details] Backtrace of the crash in gen (In reply to Werner Tietz from comment #6) > maybe you should read carefully Comments #3 and #4 So these are the steps I followed: 1) Click "Create menu" button 2) Click "My Menu" - "Item 1" 3) Quickly click "My Menu" - "Item 1" again before the 5 seconds I got no crash on kf6... I saw the message box twice. On gen it crashed after the second message box. Here's the backtrace.
(In reply to Werner Tietz from comment #9) > (In reply to Jean-Pierre Ledure from comment #8) > > I could not reproduce the issue in > > Did you first disable Java -path explicitly and complete restart the soffice > ?? please ignore my comment #9 … wrong topic