Basic: Option VbaSupport 1 Sub TestRedim4 Dim arr1, arr2(0) arr1=arr2 Redim arr2(0) Msgbox arr1(0) End Sub Error in string with Msgbox: Runtime error 9. "Index out of defined range". When trying to view the arr1 value through the Basic debugger (just before the Msgbox), the application crashes
This seems to describe two different problems: an unexpected result of accessing arr1 elements in code, and a crash doing that in IDE's watch. Let this be about the crash (more severe); please file another bug about unexpected operation of the array assignment (with description of the expected result). https://gerrit.libreoffice.org/c/core/+/100540
Reproduced in Version: 7.1.0.0.alpha0+ Build ID: 0de191e1d201d691c2196cf1aef412a98affb66f CPU threads: 4; OS: Linux 4.19; UI render: default; VCL: gtk3 Locale: en-US (en_US.UTF-8); UI: en-US Calc: threaded Steps to reproduce: 1. Open Writer 2. Tools - Macros - Edit Macros 3. Paste code from description 4. Set a breakpoint at line: Msgbox arr1(0) 5. Run code 6. Select arr1 and press F7 7. Expand Variable tree -> Crash
Mike Kaganski committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/b71815a8d49f95657ce8253434187827e63a5ade tdf#135639: check the return value of GetDim32 It will be available in 7.1.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Verified in Version: 7.1.0.0.alpha0+ Build ID: df37937018fe8e87dad5dd97689632044ba56de3 CPU threads: 4; OS: Linux 4.19; UI render: default; VCL: gtk3 Locale: en-US (en_US.UTF-8); UI: en-US Calc: threaded @Mike Kaganski, thanks for fixing this issue!!
Mike Kaganski committed a patch related to this issue. It has been pushed to "libreoffice-7-0": https://git.libreoffice.org/core/commit/bde75c036f34ce970a90991acde80f0d16007af6 tdf#135639: check the return value of GetDim32 It will be available in 7.0.1. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Mike Kaganski committed a patch related to this issue. It has been pushed to "libreoffice-6-4": https://git.libreoffice.org/core/commit/575f4ec1dcb0a2dbd80bfaf001a5fc3072cd11fa tdf#135639: check the return value of GetDim32 It will be available in 6.4.7. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.