Steps to reproduce: - Create a new Writer document - Format > Paragraph > Outline & List - Set "Outline level" to Level 1 - Press OK - Click on the green arrow to toggle outline folding - Press enter to trigger a crash --- Version: 25.2.3.2 (X86_64) / LibreOffice Community Build ID: 520(Build:2) CPU threads: 8; OS: Linux 6.12; UI render: default; VCL: gtk3 Locale: en-US (en_US.UTF-8); UI: en-US 25.2.3-3 Calc: threaded Arch Linux package: libreoffice-fresh 25.2.3-3
Created attachment 200949 [details] Try of mine on the bug
Tested on: Kali Linux Rolling 2025.1 LibreOffice: 25.2.2.2, 520(Build:2) CPU: intel CORE i5, 4th gen. Followed the exact steps: Created a new Writer document Set paragraph Outline Level to 1 Enabled outline folding using the arrow Pressed Enter Result: NOT REPRODUCIBLE — LibreOffice did not crash. It just showed the intended behavior.
Created attachment 200951 [details] sample doc Steps to reproduce: - Open the attachment - Press enter to trigger a crash Your screenshot shows text that was not specified in the steps to reproduce. You also seem to be testing with a slightly older version.
Sorry, what do you mean with the "green arrow"?
After you set the outline level and press OK, try hovering the mouse cursor over the first line of the document. That should reveal an arrow in the left margin that allows you to toggle outline folding. (The arrow is visible next to the "2" bullet in attachment #200949 [details], though it doesn't appear to be green on that system.) It's possible I manually enabled Outline Folding in the past. I see a checkbox for "Show outline-folding buttons" in the LibreOffice Writer > View options tab. If the initial steps do not work, hopefully you can just download attachment 200951 [details] and press enter to trigger the crash.
Thank you for the quick feedback, I could reproduce this on pc Debian x86-64 with master sources updated today. Here's the relevant part of bt: #5 0x00007f089a4a30c3 in std::__debug::vector<SwNode*, std::allocator<SwNode*> >::operator[] (this=0x5654dc8a3948, __n=1) at /usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/debug/vector:517 #6 0x00007f089a491ead in o3tl::sorted_vector<SwNode*, CompareSwOutlineNodes, o3tl::find_unique>::operator[] (this=0x5654dc8a3948, index=1) at include/o3tl/sorted_vector.hxx:198 #7 0x00007f089a482a46 in SwCursorShell::GotoOutline (this=0x5654d85356a0, nIdx=1) at /home/julien/lo/libreoffice/sw/source/core/crsr/crstrvl.cxx:1184 #8 0x00007f089be4b15a in SwWrtShell::GotoOutline (this=0x5654d85356a0, nIdx=1) at /home/julien/lo/libreoffice/sw/source/uibase/wrtsh/move.cxx:658 #9 0x00007f089be5ecd4 in lcl_FoldedOutlineNodeEndOfParaSplit (pThis=0x5654d85356a0) at /home/julien/lo/libreoffice/sw/source/uibase/wrtsh/wrtsh1.cxx:1348 #10 0x00007f089be5e4e1 in SwWrtShell::SplitNode (this=0x5654d85356a0, bAutoFormat=true) at /home/julien/lo/libreoffice/sw/source/uibase/wrtsh/wrtsh1.cxx:1386 #11 0x00007f089b99319e in SwEditWin::KeyInput (this=0x5654d8071e40, rKEvt=...) at /home/julien/lo/libreoffice/sw/source/uibase/docvw/edtwin.cxx:2810 #12 0x00007f08d62563e4 in ImplHandleKey (pWindow=0x5654d80cb520, nSVEvent=NotifyEventType::KEYINPUT, nKeyCode=1280, nCharCode=0, nRepeat=0, bForward=true) at /home/julien/lo/libreoffice/vcl/source/window/winproc.cxx:1209 #13 0x00007f08d625486a in ImplWindowFrameProc (_pWindow=0x5654d80cb520, nEvent=SalEvent::KeyInput, pEvent=0x7ffe8a004462) at /home/julien/lo/libreoffice/vcl/source/window/winproc.cxx:2722
searching a bit in gdb, at line 1347, Seek_Entry makes nPos = 1 but returns false because pNd hasn't been found. diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx index 3797ed4bcabe..63247b07bb53 100644 --- a/sw/source/uibase/wrtsh/wrtsh1.cxx +++ b/sw/source/uibase/wrtsh/wrtsh1.cxx @@ -1344,8 +1344,8 @@ static bool lcl_FoldedOutlineNodeEndOfParaSplit(SwWrtShell *pThis) SwTextNode* pNd = pDoc->GetNodes().MakeTextNode(*pEndNd, pTextNode->GetTextColl(), true); - (void) rOutlineNodes.Seek_Entry(pNd, &nPos); - pThis->GotoOutline(nPos); + if (rOutlineNodes.Seek_Entry(pNd, &nPos)) + pThis->GotoOutline(nPos); if (pDoc->GetIDocumentUndoRedo().DoesUndo()) { prevents LO from crashing but typing Enter makes nothing instead so don't think it's the right solution.
@Jim, since you added support for Outline View layout, I thought you might be interested in this issue
Jim Raykowski committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/fd9ae53e39f3219474461d1e8e3220d8efdfcecb tdf#166713 Fix crash in lcl_FoldedOutlineNodeEndOfParaSplit It will be available in 26.2.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Jim Raykowski committed a patch related to this issue. It has been pushed to "libreoffice-25-8": https://git.libreoffice.org/core/commit/5b9e275838ec1cd08f1c1755de545b4f7f34c7d1 tdf#166713 Fix crash in lcl_FoldedOutlineNodeEndOfParaSplit It will be available in 25.8.3. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Jim Raykowski committed a patch related to this issue. It has been pushed to "libreoffice-25-2": https://git.libreoffice.org/core/commit/c3912edc4c615b55f2051310c417e592ac3ce905 tdf#166713 Fix crash in lcl_FoldedOutlineNodeEndOfParaSplit It will be available in 25.2.7. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Xisco Fauli committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/b469f4d62ac11b9d548bc3bf2bfd4ff3490c014d tdf#166713: sw_uiwriter8: Add test It will be available in 26.2.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Jim Raykowski committed a patch related to this issue. It has been pushed to "libreoffice-25-8-2": https://git.libreoffice.org/core/commit/a334dba3957bdebbfcf940a3746bdb9db8b61805 tdf#166713 Fix crash in lcl_FoldedOutlineNodeEndOfParaSplit It will be available in 25.8.2. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.