Attached is an odt file containing 3 macros, Temp, Temp1 & Temp2. Temp calls Temp1 and Temp2. Temp1 and Temp2 contain nothing but cell movements via many variations dispatcher.executeDispatch(document, ".uno:GoToEndOfData" dispatcher.executeDispatch(document, ".uno:GoUp". etc. After loading the macros, please open any Calc file containg at least 2 sheets, and run macro Temp. My result is a HANG that occurs in Temp1 after a dispatcher.executeDispatch(document, ".uno:GoToEndofRow" After using Task Manager to close open office, the "End" key on the keyboard doesn't work. I have to reboot my computer.
Created attachment 187062 [details] Test Macros Forgot to add attachmnet.
Can you please test again in a version that is currently in development, 7.4 or 7.5? If the issue is still there, please attach an ODS file with the macros saved in it, so others can test more easily. Thank you!
I've installed Ver 7.5, and quickly checked it with my original macros. I got the "Hang" in the same location. When I ran the Temp ("Test") macro I did get something different: BASIC runtime error. Object variable not set. That messaged occurred after Temp1 was called on the first line of code. dispatcher.executeDispatch(document, ".uno:GoToEndOfData", "", 0, args2()) Now args2 is defined in Temp as : Dim args2(0) as new com.sun.star.beans.PropertyValue args2(0).Name = "Sel" args2(0).Value = false I've never had that happened before. The only thing I can think of is a change in the code, which I shall try to chase down.
[Automated Action] NeedInfo-To-Unconfirmed
Created attachment 187081 [details] example ODS with macro I've put the macro in this example document for easier testing. I also get the "Object variable not set" error in both 6.0 and 7.6, but unsure if this is a syntax error or something else.
I've down some more chasing dwon what's occuring. The "Hanging" is occurring on the Call of the second macro when it tries to execute dispatcher.executeDispatch(document, ".uno:GoToEndOfRow". I found the problem starts in the Call of the first macro after the execution of dispatcher.executeDispatch(document, ".uno:GoToEndOfRow" I stopped the execution after the first execution and found that although the macro doesn't "Hang", the "End" key on the keyboard was not working! Ergo the second execution is trying to do something that the keyboard can't even do. FYI, Ctrl + End still does work. I then have to reboot the computer to get the "End" key to work as it should. I have access to a Linux computer to see what happens with that OS but that will take some time. Regarding stephane.guillou@libreoffice.org comments I found I could eliminate that error by inserting dim document, dispatcher as object document = ThisComponent.CurrentController.Frame dispatcher = createUnoService("com.sun.star.frame.DispatchHelper") in the called macro. Note: I never had to do that before.
I just upgraded: Version: 7.5.3.2 (X86_64) / LibreOffice Community Build ID: 9f56dff12ba03b9acd7730a5a481eea045e468f3 CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win Locale: en-US (en_US); UI: en-US Calc: threaded BUG no longer exists!