Sub Main Print "Hello World!" End Sub This simple macro crashes LibreOffice 4.2 and master (dbgutil build). soffice.bin: /home/timar/libreoffice-4-2/include/rtl/ustring.hxx:421: sal_Unicode rtl::OUString::operator[](sal_Int32) const: Assertion `index >= 0 && static_cast<sal_uInt32>(index) < static_cast<sal_uInt32>(getLength())' failed.
On pc Debian x86-64 with master sources updated today, I can reproduce this.
https://gerrit.libreoffice.org/#/c/7474/
Created attachment 92244 [details] bt with symbols Here's the bt. I must say I don't understand the goal of this: 984 OUString s(aOut.copy(0, n1)); 985 aOut = aOut.copy(n1); 986 while (aOut[0] == '\n' || aOut[0] == '\r') 987 { 988 aOut = aOut.copy(1); 989 }
Andras Timar committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=99159a618fd1ea90a2bc8a72621c88a4cf26e6f5 fdo#73698 check for empty aOut The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.