Description: I have written a macro to alter the borders of a text table and the margins of the first row of the text table. When running the macro the macro alters the first few text tables as expected but then crashes Libreoffice writer. Similar code that does each step separately does not crash. Of course I could be doing something not recommended in the macros but a crash is probably not a good thing. Steps to Reproduce: 1.Enable medium macro security 2. Open attached document and allow macros 3. Run macro ChangeTableBordersandMargins_Crash Actual Results: The first few tables are changed and Libreoffice writer crashes. Expected Results: I would have expected all the tables to have a new border and larger margins. Reproducible: Always User Profile Reset: No Additional Info: Version: 7.2.4.1 (x64) / LibreOffice Community Build ID: 27d75539669ac387bb498e35313b970b7fe9c4f9 CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win Locale: en-AU (en_AU); UI: en-GB Calc: threaded and Version :5.2.7.2 Build ID: 1:5.2.7-1+rpi1+deb9u11 CPU Threads: 1; OS Version: Linux 4.19; UI Render: default; VCL: gtk2; Local: en-AU (en_AU.UTF-8); Calc: group
Created attachment 178389 [details] A writer document with three macros containing several text tables
Confirm crash with Version: 7.4.0.0.alpha0+ / LibreOffice Community Build ID: 8942956e05f2208ffb666a2118f5db092c30ce6a CPU threads: 4; OS: Linux 5.11; UI render: default; VCL: gtk3 Locale: cs-CZ (cs_CZ.UTF-8); UI: en-US Calc: threaded Jumbo and Version 4.1.0.0.alpha0+ (Build ID: efca6f15609322f62a35619619a6d5fe5c9bd5a)
Inherited. Interesting it doesn't crash if macro is Event on Open Document.
lets make it not crash at least
Caolán McNamara committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/a7a008d055eecf540b5d20060754cc686508a895 tdf#147526 a macro case which results in a null Lower() result It will be available in 7.6.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.
doesn't crash for me after that. backport to 7-5 in gerrit
Caolán McNamara committed a patch related to this issue. It has been pushed to "libreoffice-7-5": https://git.libreoffice.org/core/commit/11990fdfae41255a1f1446d1d00f50838c5fcc83 tdf#147526 a macro case which results in a null Lower() result It will be available in 7.5.4. 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.
Tested in Libreoffice Writer Portable 7.5.4.2 and crash has been resolved and macro is working. Thanks..
Verified, based on comment 8 from reporter.