Created attachment 127037 [details] gdb with backtrace from assertion STR (1) Start Writer from command line. Program opens document window "Untitled 1". (2) Type "asdf<Enter>". First line shows "Asdf" and caret is on second line. (3) Type "<up><Insert><End>". Status bar shows "Overwrite". (4) Type "<Enter><space>". Program crashes. I am setting bug status NEW. Note that the assertion can appear only in dbgutil builds.
On pc Debian x86-64 with master sources updated yesterday, I could reproduce this.
With this patch, it doesn't crash: diff --git a/sw/source/core/edit/acorrect.cxx b/sw/source/core/edit/acorrect.cxx index afc4d18..82cdd33 100644 --- a/sw/source/core/edit/acorrect.cxx +++ b/sw/source/core/edit/acorrect.cxx @@ -163,7 +163,7 @@ bool SwAutoCorrDoc::ReplaceRange( sal_Int32 nPos, sal_Int32 nSourceLength, const // text attributes with dummy characters must not be replaced! bool bDoReplace = true; - sal_Int32 const nLen = rText.getLength(); + sal_Int32 const nLen = pNd->GetText().getLength(); for ( sal_Int32 n = 0; n < nLen; ++n ) { sal_Unicode const Char = pNd->GetText()[n + nPos]; but don't know if it's the right fix.
I finally submitted the patch to review, see https://gerrit.libreoffice.org/28475 Let's see...
Badfully the patch makes unit tests fail. Certainly someone may help here.
The source line number is now 641. I am removing the line number from the summary.
was fixed by commit 76dc7897b0efb1104dea56fe65d0aececab4eca0 *** This bug has been marked as a duplicate of bug 105103 ***
I observe in daily Linux dbgutil bibisect repository version 2017-09-01 running on debian-stretch that the assertion is absent. I am setting status VERI FIXE. Thank you, Michael, for bringing this to my attention.