Description: Since upgrade to LO 7.6 macros where I use CopyToRange started to break the code. Same code works well on Win/Lin versions 7.5 and less. So simple code to copy A8 to A6:A7 would result in such crash Steps to Reproduce: 1.fillup some values to A1:D6 2.make macro Sub 3.add statement myDoc.CopyToRange("sh1.A6", "sh1.A3:A5") Actual Results: SF library crash Error: Location: SFDocuments.Calc.CopyToRange/1086 Invalid procedure call THE EXECUTION IS CANCELLED Expected Results: Cell A3:A5 should be filled with value/formula from A6, as it does in versions prior 7.6 Reproducible: Always User Profile Reset: No Additional Info: Version: 7.6.3.1 (X86_64) Build ID: 60(Build:1) CPU threads: 16; OS: Linux 6.6; UI render: default; VCL: gtk3 Locale: en-IE (en_US.UTF-8); UI: en-US Calc: CL threaded
Thank you for reporting the bug. Please attach a sample document, as this makes it easier for us to verify the bug. I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' once the requested document is provided. (Please note that the attachment will be public, remove any sensitive information before attaching it. See https://wiki.documentfoundation.org/QA/FAQ#How_can_I_eliminate_confidential_data_from_a_sample_document.3F for help on how to do so.)
Created attachment 191266 [details] Sampe Calc file that shows an error when running macro Run macro to see the error.
On pc Debian x86-64 with master sources updated today, I don't reproduce this. When running the macro, I got a popup indicating "A6 = 6" then another popup indicating "You are pasting data into cells that already contain data. Do you really want to overwrite the existing data?" I tried by clicking "Yes" and another time by clicking "No", execution isn't cancelled.
Confirmed on windows 10 x64 with Version: 7.6.3.2 (X86_64) / LibreOffice Community Build ID: 29d686fea9f6705b262d369fede658f824154cc0 CPU threads: 12; OS: Windows 10.0 Build 19045; UI render: Skia/Vulkan; VCL: win Calc: CL threaded After running the macro it shows "A6 = 6" and then it shows Error 5 "The ScriptForge library has crashed. The reason is unknown. Maybe a bug that could be reported on https://bugs.documentfoundation.org/ More details : Location : SFDocuments.Calc.CopyToRange/1086 Invalid procedure call. THE EXECUTION IS CANCELLED."
(In reply to MM from comment #4) > Confirmed on windows 10 x64 with Version: 7.6.3.2 (X86_64) / LibreOffice > Community > Build ID: 29d686fea9f6705b262d369fede658f824154cc0 > CPU threads: 12; OS: Windows 10.0 Build 19045; UI render: Skia/Vulkan; VCL: > win > Calc: CL threaded > > > After running the macro it shows "A6 = 6" and then it shows > > Error 5 > > "The ScriptForge library has crashed. The reason is unknown. > Maybe a bug that could be reported on > https://bugs.documentfoundation.org/ > > More details : > > Location : SFDocuments.Calc.CopyToRange/1086 > Invalid procedure call. > > > THE EXECUTION IS CANCELLED." You are probably using LO prior to 7.6, as I get same response on 7.5.5, but 7.6.3 gives an error
(In reply to Julien Nabet from comment #3) > On pc Debian x86-64 with master sources updated today, I don't reproduce > this. > > When running the macro, I got a popup indicating "A6 = 6" > then another popup indicating "You are pasting data into cells that already > contain data. Do you really want to overwrite the existing data?" > I tried by clicking "Yes" and another time by clicking "No", execution isn't > cancelled. You are probably using LO prior to 7.6, as I get same response on 7.5.5, but 7.6.3 gives an error like I described
(In reply to DZ from comment #5) > (In reply to MM from comment #4) > > Confirmed on windows 10 x64 with Version: 7.6.3.2 (X86_64) / LibreOffice > > Community > > Build ID: 29d686fea9f6705b262d369fede658f824154cc0 > > CPU threads: 12; OS: Windows 10.0 Build 19045; UI render: Skia/Vulkan; VCL: > > win > > Calc: CL threaded > > > > > > After running the macro it shows "A6 = 6" and then it shows > > > > Error 5 > > > > "The ScriptForge library has crashed. The reason is unknown. > > Maybe a bug that could be reported on > > https://bugs.documentfoundation.org/ > > > > More details : > > > > Location : SFDocuments.Calc.CopyToRange/1086 > > Invalid procedure call. > > > > > > THE EXECUTION IS CANCELLED." > > You are probably using LO prior to 7.6, as I get same response on 7.5.5, but > 7.6.3 gives an error Sorry that reply was meant to previous comment. I get same result as you do on 7.6.3 Fedora 39
(In reply to DZ from comment #7) > > Sorry that reply was meant to previous comment. I get same result as you do > on 7.6.3 Fedora 39 I'm on master sources so dev version (future 24.2)
(In reply to Julien Nabet from comment #8) > (In reply to DZ from comment #7) > > > Sorry that reply was meant to previous comment. I get same result as you do > > on 7.6.3 Fedora 39 > > I'm on master sources so dev version (future 24.2) That is strange then. It looks just a 7.6.xx versions affected. I was also checking if syntax has changed, but it seem identical text in help files for CopyToRange, so it's something to do with code. Anyways it would be good to have parameter (overwrite) so it does/(n't) ask confirmation to overwrite if values are present in the Range, just like it works with CopyToCell
Created attachment 191319 [details] Code pointer This works in master, but it fails in 7.6. The problem seems to be a typo in SF_Documents.SF_Calc module, line 1086. @JPL can you take care of this? This only needs to be fixed in 7.6.
(In reply to Rafael Lima from comment #10) > Created attachment 191319 [details] > Code pointer > > This works in master, but it fails in 7.6. > > The problem seems to be a typo in SF_Documents.SF_Calc module, line 1086. > > @JPL can you take care of this? This only needs to be fixed in 7.6. Thank you Rafael, thanks to your comment, I saw the pb has been fixed with https://cgit.freedesktop.org/libreoffice/core/commit/?id=b16861f667673560cf57d28bdd16bb592e6e3c22 ScriptForge - (SF_Calc) fix typo in CopyToRange() method
Here's the cherry-pick waiting for review in 7.6 branch: https://gerrit.libreoffice.org/c/core/+/160472
https://gerrit.libreoffice.org/c/core/+/160472 I tried 7.6.4 with https://gerrit.libreoffice.org/c/core/+/160476 but it needs more approvals, not sure it will make it.