[Libreoffice-bugs] [Bug 121618] VIEWING: When the document displays !broken!! instead of the correct text, writer can lock up

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Fri May 24 04:26:47 UTC 2019


https://bugs.documentfoundation.org/show_bug.cgi?id=121618

--- Comment #11 from Luke Kendall <luke.kendall at gmail.com> ---
It might be related I suppose.
But I only run spell check very infrequently.
In my case I think it happened by simply changing a word in the text.

I have one strong suggestion, and that is to change all the occurrences of the
string !br0ken!! with a unique string across the source, at least !br0ken!!(1),
!br0ken!!(2) etc. so the place in the source can be pinpointed.

Also, looking at the sample source in 117155 around the assert, and thinking of
the problems that occurred for me after !br0ken!! appeared in my text, when not
in debug mode perhaps a warning panel should be raised to the user to warn them
to save the document and quit, and that the doc may have become corrupted?

Finally, regarding pinpoint the place in the code but also providing even more
detail, I suggest it would be worth the few extra bytes of code to change

if ( count < 0 || beginIndex < 0 || beginIndex + count > pFrom->length )
{
        assert(false); // fail fast at least in debug builds
        IMPL_RTL_STRINGNAME( newFromLiteral )( ppThis, "!!br0ken!!", 10, 0 );
        return;
}

to something like:

if ( count < 0 || beginIndex < 0 || beginIndex + count > pFrom->length )
{

        assert(false); // fail fast at least in debug builds
        IMPL_RTL_STRINGNAME( newFromLiteral )( ppThis, "!!br0ken!!", 10, 0 );
        return;
}

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20190524/3b15235a/attachment.html>


More information about the Libreoffice-bugs mailing list