Problem description: - deleting words by pressing ctrl+backspace leads to an inconsistent result - undo this operation will crash LibreOffice Steps to reproduce: 1. Open a new Document in Writer 2. type in some spaces and then some text, eg. ' some text' 3. set the cursor to the beginning of the text, eg. ' |some text' 4. press crtl+backspace to delete the whole spaces ---- 5. press ctrl+z to undo this operation Current behavior: in 4.: Writer deletes more than nescessary ('me text') and sets the cursor to the end of the line in 5.: Writer crashes Expected behavior: in 4.: just deleting the spaces ('some text') in 5.: undo the operation in 4. Operating System: Windows 7 Version: 4.2.4.2 release
Created attachment 100227 [details] bt with symbols on 4.2 On pc Debian x86-64 with 4.2 sources updated today, I got a crash just when doing Ctrl-Space
I don't reproduce this with master sources (future 4.4.0) updated today but I reproduce the exact behavior with 4.2.4 LO Debian package.
Michael: it seems 4.3 is too much different from 4.2 for this part. For example for the bt I retrieved: in function lcl_CalcBreaks from sw/source/core/doc/docedt.cxx 1409 const sal_Int32 nStart(rPam.Start()->nContent.GetIndex()) nStart value is 0 in 4.3, -1 in 4.2 that's why I've got a segfault line 1416: 1414 for (sal_Int32 i = nStart; i < nEnd; ++i) 1415 { 1416 const sal_Unicode c(pTxtNode->GetTxt()[i]); After having checked this, I got another crash during Ctrl-backspace: #4 0x00002aaaaad19255 in rtl_uString_newFromSubString (ppThis=0x7fffffff3c78, pFrom=0x1e700d0, beginIndex=65535, count=5) at /home/julien/compile-libreoffice/libo_4_2/sal/rtl/strtmpl.cxx:1269 #5 0x00002aaac8459a59 in rtl::OUString::copy (this=0x1601718, beginIndex=65535, count=5) at /home/julien/compile-libreoffice/libo_4_2/include/rtl/ustring.hxx:1483 #6 0x00002aaac8b31fd3 in SwUndoDelete::SaveCntnt (this=0x1ac8940, pStt=0x7fffffff41d0, pEnd=0x7fffffff4198, pSttTxtNd=0x1601660, pEndTxtNd=0x1601660) at /home/julien/compile-libreoffice/libo_4_2/sw/source/core/undo/undel.cxx:364 #7 0x00002aaac8b30d7b in SwUndoDelete::SwUndoDelete (this=0x1ac8940, rPam=SwPaM = {...}, bFullPara=0 '\000', bCalledByTblCpy=0 '\000') at /home/julien/compile-libreoffice/libo_4_2/sw/source/core/undo/undel.cxx:159 #8 0x00002aaac85a7d9d in SwDoc::DeleteRangeImplImpl (this=0x15f2b00, rPam=SwPaM = {...}) at /home/julien/compile-libreoffice/libo_4_2/sw/source/core/doc/docedt.cxx:1655 #9 0x00002aaac85a7660 in SwDoc::DeleteRangeImpl (this=0x15f2b00, rPam=SwPaM = {...}) at /home/julien/compile-libreoffice/libo_4_2/sw/source/core/doc/docedt.cxx:1565 #10 0x00002aaac85a758c in SwDoc::DeleteAndJoinImpl (this=0x15f2b00, rPam=SwPaM = {...}, bForceJoinNext=false) at /home/julien/compile-libreoffice/libo_4_2/sw/source/core/doc/docedt.cxx:1545 #11 0x00002aaac85a6e75 in lcl_DoWithBreaks(SwDoc &, SwPaM &, struct {...}, bool) (rDoc=..., rPam=SwPaM = {...}, pFunc= (bool (SwDoc::*)(SwDoc * const, SwPaM &, bool)) 0x2aaac85a753e <SwDoc::DeleteAndJoinImpl(SwPaM&, bool)>, bForceJoinNext=false) at /home/julien/compile-libreoffice/libo_4_2/sw/source/core/doc/docedt.cxx:1438 #12 0x00002aaac85a8462 in SwDoc::DeleteAndJoin (this=0x15f2b00, rPam=SwPaM = {...}, bForceJoinNext=false) at /home/julien/compile-libreoffice/libo_4_2/sw/source/core/doc/docedt.cxx:1783 #13 0x00002aaac87a7c2b in SwEditShell::DeleteSel (this=0x169e790, rPam=SwPaM = {...}, pUndo=0x7fffffff45ff "") at /home/julien/compile-libreoffice/libo_4_2/sw/source/core/edit/eddel.cxx:98 Any idea?
4-2 definitely crashes, but 4-3 has this fixed and there isn't going to be another 4-2 release so we can close this now