Download it now!
Bug 73698 - Print "Hello World!" crash
Summary: Print "Hello World!" crash
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
4.2.0.2 rc
Hardware: Other All
: medium normal
Assignee: Andras Timar
URL:
Whiteboard: target:4.3.0
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-16 11:51 UTC by Andras Timar
Modified: 2014-01-17 12:57 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
bt with symbols (5.95 KB, text/plain)
2014-01-16 21:01 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andras Timar 2014-01-16 11:51:14 UTC
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.
Comment 1 Julien Nabet 2014-01-16 20:24:35 UTC
On pc Debian x86-64 with master sources updated today, I can reproduce this.
Comment 2 Andras Timar 2014-01-16 20:28:41 UTC
https://gerrit.libreoffice.org/#/c/7474/
Comment 3 Julien Nabet 2014-01-16 21:01:13 UTC
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         }
Comment 4 Commit Notification 2014-01-17 06:10:55 UTC
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.