Created attachment 189667 [details] Sample document with a macro to trigger the crash Steps to reproduce 1) in "Tools" -> "Options" -> "LibreOffice(Dev)" -> "Security", set macro security level to "Medium" (or lower) so the document macro is executed 2) open attached sample document "Keypress2.odb" (based on attachment 177721 [details] from tdf#146933), allow macro execution 3) In the "Forms" tab, double-click on "TBL" 4) click in the first table cell to focus that one 5) press Tab key to switch focus to second column -> LibreOffice crashes (triggered by the macro that is executed when the 2nd column gets focused) Note: It does not crash when using the gtk3 VCL plugin on Linux (in which case another code path using native Gtk widgets is used). Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 6f60670877208612b5ea320b3677480ef6508abb CPU threads: 12; OS: Linux 6.4; UI render: default; VCL: kf5 (cairo+xcb) Locale: en-GB (en_GB.UTF-8); UI: en-US Calc: threaded
This is with a debug build. Actually, an assertion is triggered: soffice.bin: .../libreoffice/sal/rtl/strtmpl.hxx:890: void rtl::str::newFromSubString(rtl_tString**, const rtl_tString*, sal_Int32, sal_Int32) [with rtl_tString = _rtl_uString; sal_Int32 = int]: Assertion `false' failed.
Pending Gerrit change: https://gerrit.libreoffice.org/c/core/+/157017
Michael Weghorn committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/489985a6fbba71f74ea343c4162d599eacb9c7d0 tdf#157304 Use normalized selection indices as string indices It will be available in 24.2.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.
Michael Weghorn committed a patch related to this issue. It has been pushed to "libreoffice-7-6": https://git.libreoffice.org/core/commit/59a1402455bd03a9839df9133306974a354b6367 tdf#157304 Use normalized selection indices as string indices It will be available in 7.6.2. 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.