Created attachment 181876 [details] An XLSM with a VBA macro showing infinite recursion in LibreOffice Basic Running 'main' macro from the attachment produces this error: > BASIC runtime error. > '28' > Not enough stack memory. It runs OK in Excel, showing a message box with "1". The macro code there is this: Option VBASupport 1 Function NotRecursive() Set NotRecursive = New Collection NotRecursive.Add "Foo" End Function Sub main() Dim c Set c = NotRecursive MsgBox c.Count End Sub The infinite recursion happens on 'NotRecursive.Add "Foo"', where LibreOffice Basic tries to call the function again. Possibly this should only be fixed in VBASupport mode.
Confirm in Version: 7.5.0.0.alpha0+ (x64) / LibreOffice Community Build ID: bfca51d9035000e518e4938ceb145cb92cc17b1f CPU threads: 8; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win Locale: ru-RU (ru_RU); UI: ru-RU Calc: threaded
Also reproduced in Version: 6.4.0.0.alpha1+ Build ID: 9bc848cf0d301aa57eabcffa101a1cf87bad6470 CPU threads: 8; OS: Linux 5.10; UI render: default; VCL: gtk3; Locale: es-ES (es_ES.UTF-8); UI-Language: en-US Calc: threaded
Dear Mike Kaganski, To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year. There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present. If you have time, please do the following: Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/ If the bug is present, please leave a comment that includes the information from Help - About LibreOffice. If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice. Please DO NOT Update the version field Reply via email (please reply directly on the bug tracker) Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not appropriate in this case) If you want to do more to help you can test to see if your issue is a REGRESSION. To do so: 1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/ 2. Test your bug 3. Leave a comment with your results. 4a. If the bug was present with 3.3 - set version to 'inherited from OOo'; 4b. If the bug was not present in 3.3 - add 'regression' to keyword Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa Thank you for helping us make LibreOffice even better for everyone! Warm Regards, QA Team MassPing-UntouchedBug
Hallo it seems a bad idea to use the **same** symbol for **both** the Function and the Collection inside ;-) ``` Option VBASupport 1 Function NotRecursive() Set think_about_namespaces = New Collection think_about__namespaces.Add "Foo" NotRecursive = think_about_namespaces End Function Sub main() Dim c Set c = NotRecursive MsgBox c.Count End Sub ``` works with|without VBASupport!
(In reply to Werner Tietz from comment #4) Bugzilla issues are not requests to find workarounds (that exist, but they are on-topic on sites like ask.libreoffice.org). Bugs like this are to make sure that the program behaves as required (in this case, as needed to ensure that existing VBA macros work in VBA support mode).
(In reply to Mike Kaganski from comment #5) > (In reply to Werner Tietz from comment #4) > > Bugzilla issues are not requests to find workarounds (that exist, but they > are on-topic on sites like ask.libreoffice.org). Bugs like this are to make > sure that the program behaves as required (in this case, as needed to ensure > that existing VBA macros work in VBA support mode). maybe but IHMO: vba support yes! ... but trying to support bad ambiguous code, NO!
(In reply to Werner Tietz from comment #6) We support code not because it is good or bad, but because it should work. LibreOffice is not a tool to check code quality, and when something works in Excel / Word, users expect it to work in LibreOffice. Discussion of quality of code is again off-topic here. Please avoid.