Description: Updating table of contents in attachment 187817 [details] leads to crash. Steps to Reproduce: 1. Open the attachment 187817 [details] from tdf#155764 2. Go to page 7 of 15 (actually 4th page) 3. Right click, then choose "Update Index" 4. Press ctrl+z to undo 5. Again right click, then choose "Update Index" Actual Results: Assertion failure, showing a dialog box stating "abort() has been called". In the command line, one may see: Assertion failed: !m_pFirst && !m_pLast && "There are still indices registered", file C:/cygwin64/home/user/lode/dev/core/sw/source/core/bastyp/index.cxx, line 234 Expected Results: No crash. Reproducible: Always User Profile Reset: No Additional Info: Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: a225b4dbd46897903b217969da5f97f2660022c9 CPU threads: 20; OS: Windows 10.0 Build 22621; UI render: default; VCL: win Locale: en-US (en_DE); UI: en-US Calc: CL threaded
I couldn't reproduce on current build.
(In reply to MW from comment #1) > I couldn't reproduce on current build. This is a debug-only problem. You need a debug build to reproduce it. I have tested with the latest LO 24.2 dev master, and the problem is still there: Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 7db3c6b25a8c57beab7dae4e0e1497e7b06f3662 CPU threads: 20; OS: Windows 10.0 Build 22621; UI render: Skia/Vulkan; VCL: win Locale: en-US (en_DE); UI: en-US Calc: CL threaded
Backtrace using Visual Studio 2022: ucrtbased.dll!issue_debug_notification(const wchar_t * const message) Line 28 at minkernel\crts\ucrt\src\appcrt\internal\report_runtime_error.cpp(28) ucrtbased.dll!__acrt_report_runtime_error(const wchar_t * message) Line 154 at minkernel\crts\ucrt\src\appcrt\internal\report_runtime_error.cpp(154) ucrtbased.dll!abort() Line 61 at minkernel\crts\ucrt\src\appcrt\startup\abort.cpp(61) ucrtbased.dll!common_assert_to_stderr_direct(const wchar_t * const expression, const wchar_t * const file_name, const unsigned int line_number) Line 161 at minkernel\crts\ucrt\src\appcrt\startup\assert.cpp(161) ucrtbased.dll!common_assert_to_stderr<wchar_t>(const wchar_t * const expression, const wchar_t * const file_name, const unsigned int line_number) Line 179 at minkernel\crts\ucrt\src\appcrt\startup\assert.cpp(179) ucrtbased.dll!common_assert<wchar_t>(const wchar_t * const expression, const wchar_t * const file_name, const unsigned int line_number, void * const return_address) Line 420 at minkernel\crts\ucrt\src\appcrt\startup\assert.cpp(420) ucrtbased.dll!_wassert(const wchar_t * expression, const wchar_t * file_name, unsigned int line_number) Line 444 at minkernel\crts\ucrt\src\appcrt\startup\assert.cpp(444) swlo.dll!SwContentIndexReg::~SwContentIndexReg() Line 234 at C:\cygwin64\home\user\lode\dev\core\sw\source\core\bastyp\index.cxx(234) swlo.dll!SwContentNode::~SwContentNode() Line 1113 at C:\cygwin64\home\user\lode\dev\core\sw\source\core\docnode\node.cxx(1113) swlo.dll!SwTextNode::~SwTextNode() Line 275 at C:\cygwin64\home\user\lode\dev\core\sw\source\core\txtnode\ndtxt.cxx(275) [External Code] swlo.dll!SwNodes::RemoveNode(o3tl::strong_int<long,Tag_SwNodeOffset> nDelPos, o3tl::strong_int<long,Tag_SwNodeOffset> nSz, bool bDel) Line 2484 at C:\cygwin64\home\user\lode\dev\core\sw\source\core\docnode\nodes.cxx(2484) swlo.dll!SwNodes::Delete(const SwNode & rIndex, o3tl::strong_int<long,Tag_SwNodeOffset> nNodes) Line 1231 at C:\cygwin64\home\user\lode\dev\core\sw\source\core\docnode\nodes.cxx(1231) swlo.dll!SwNodes::Delete(const SwNodeIndex & rIndex, o3tl::strong_int<long,Tag_SwNodeOffset> nNodes) Line 1073 at C:\cygwin64\home\user\lode\dev\core\sw\source\core\docnode\nodes.cxx(1073) swlo.dll!SwUndoSaveSection::~SwUndoSaveSection() Line 1261 at C:\cygwin64\home\user\lode\dev\core\sw\source\core\undo\undobj.cxx(1261) [External Code] swlo.dll!o3tl::default_delete<SwUndoSaveSection>::operator()(SwUndoSaveSection * p) Line 46 at C:\cygwin64\home\user\lode\dev\core\include\o3tl\deleter.hxx(46) [External Code] swlo.dll!SwUndoUpdateIndex::~SwUndoUpdateIndex() Line 553 at C:\cygwin64\home\user\lode\dev\core\sw\source\core\undo\unsect.cxx(553) [External Code] swlo.dll!sw::UndoManager::EndUndo(const SwUndoId eUndoId, const SwRewriter * const pRewriter) Line 318 at C:\cygwin64\home\user\lode\dev\core\sw\source\core\undo\docundo.cxx(318) swlo.dll!SwEditShell::UpdateTableOf(const SwTOXBase & rTOX, const SfxItemSet * pSet) Line 186 at C:\cygwin64\home\user\lode\dev\core\sw\source\core\edit\edtox.cxx(186) swlo.dll!SwWrtShell::UpdateTableOf(const SwTOXBase & rTOX, const SfxItemSet * pSet) Line 337 at C:\cygwin64\home\user\lode\dev\core\sw\source\uibase\wrtsh\wrtsh2.cxx(337) swlo.dll!SwView::Execute(SfxRequest & rReq) Line 1290 at C:\cygwin64\home\user\lode\dev\core\sw\source\uibase\uiview\view2.cxx(1290) swlo.dll!SfxStubSwViewExecute(SfxShell * pShell, SfxRequest & rReq) Line 14811 at C:\cygwin64\home\user\lode\dev\core\workdir\SdiTarget\sw\sdi\swslots.hxx(14811) sfxlo.dll!SfxDispatcher::Call_Impl(SfxShell & rShell, const SfxSlot & rSlot, SfxRequest & rReq, bool bRecord) Line 257 at C:\cygwin64\home\user\lode\dev\core\sfx2\source\control\dispatch.cxx(257) sfxlo.dll!SfxDispatcher::Execute_(SfxShell & rShell, const SfxSlot & rSlot, SfxRequest & rReq, SfxCallMode eCallMode) Line 753 at C:\cygwin64\home\user\lode\dev\core\sfx2\source\control\dispatch.cxx(753) sfxlo.dll!SfxBindings::Execute_Impl(SfxRequest & aReq, const SfxSlot * pSlot, SfxShell * pShell) Line 1061 at C:\cygwin64\home\user\lode\dev\core\sfx2\source\control\bindings.cxx(1061) sfxlo.dll!SfxDispatchController_Impl::dispatch(const com::sun::star::util::URL & aURL, const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> & aArgs, const com::sun::star::uno::Reference<com::sun::star::frame::XDispatchResultListener> & rListener) Line 689 at C:\cygwin64\home\user\lode\dev\core\sfx2\source\control\unoctitm.cxx(689) sfxlo.dll!SfxOfficeDispatch::dispatch(const com::sun::star::util::URL & aURL, const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> & aArgs) Line 250 at C:\cygwin64\home\user\lode\dev\core\sfx2\source\control\unoctitm.cxx(250) fwklo.dll!framework::MenuBarManager::Select(Menu * pMenu) Line 802 at C:\cygwin64\home\user\lode\dev\core\framework\source\uielement\menubarmanager.cxx(802) fwklo.dll!framework::MenuBarManager::LinkStubSelect(void * instance, Menu * data) Line 766 at C:\cygwin64\home\user\lode\dev\core\framework\source\uielement\menubarmanager.cxx(766) vcllo.dll!Link<Menu *,bool>::Call(Menu * data) Line 111 at C:\cygwin64\home\user\lode\dev\core\include\tools\link.hxx(111) vcllo.dll!Menu::Select() Line 358 at C:\cygwin64\home\user\lode\dev\core\vcl\source\window\menu.cxx(358) vcllo.dll!PopupMenu::ImplFlushPendingSelect() Line 2786 at C:\cygwin64\home\user\lode\dev\core\vcl\source\window\menu.cxx(2786) vcllo.dll!PopupMenu::FinishRun(const VclPtr<MenuFloatingWindow> & pWin, const VclPtr<vcl::Window> & pParentWin, bool bRealExecute, bool bIsNativeMenu) Line 3014 at C:\cygwin64\home\user\lode\dev\core\vcl\source\window\menu.cxx(3014) vcllo.dll!PopupMenu::ImplExecute(const VclPtr<vcl::Window> & pParentWin, const tools::Rectangle & rRect, FloatWinPopupFlags nPopupModeFlags, Menu * pSFrom, bool bPreSelectFirst) Line 3028 at C:\cygwin64\home\user\lode\dev\core\vcl\source\window\menu.cxx(3028) vcllo.dll!PopupMenu::Execute(vcl::Window * pExecWindow, const tools::Rectangle & rRect, PopupMenuFlags nFlags) Line 2772 at C:\cygwin64\home\user\lode\dev\core\vcl\source\window\menu.cxx(2772) tklo.dll!VCLXMenu::execute(const com::sun::star::uno::Reference<com::sun::star::awt::XWindowPeer> & rxWindowPeer, const com::sun::star::awt::Rectangle & rPos, short nFlags) Line 484 at C:\cygwin64\home\user\lode\dev\core\toolkit\source\awt\vclxmenu.cxx(484) sfxlo.dll!SfxDispatcher::ExecutePopup(const rtl::OUString & rResName, vcl::Window * pWin, const Point * pPos) Line 1882 at C:\cygwin64\home\user\lode\dev\core\sfx2\source\control\dispatch.cxx(1882) sfxlo.dll!SfxDispatcher::ExecutePopup(vcl::Window * pWin, const Point * pPos) Line 1731 at C:\cygwin64\home\user\lode\dev\core\sfx2\source\control\dispatch.cxx(1731) swlo.dll!SwEditWin::Command(const CommandEvent & rCEvt) Line 5635 at C:\cygwin64\home\user\lode\dev\core\sw\source\uibase\docvw\edtwin.cxx(5635) vcllo.dll!ImplCallCommand(const VclPtr<vcl::Window> & pChild, CommandEventId nEvt, const void * pData, bool bMouse, const Point * pPos) Line 231 at C:\cygwin64\home\user\lode\dev\core\vcl\source\window\winproc.cxx(231) vcllo.dll!ImplHandleMouseEvent(const VclPtr<vcl::Window> & xWindow, NotifyEventType nSVEvent, bool bMouseLeave, __int64 nX, __int64 nY, unsigned __int64 nMsgTime, unsigned short nCode, MouseEventModifiers nMode) Line 799 at C:\cygwin64\home\user\lode\dev\core\vcl\source\window\winproc.cxx(799) vcllo.dll!ImplHandleSalMouseButtonDown(vcl::Window * pWindow, const SalMouseEvent * pEvent) Line 2340 at C:\cygwin64\home\user\lode\dev\core\vcl\source\window\winproc.cxx(2340) vcllo.dll!ImplWindowFrameProc(vcl::Window * _pWindow, SalEvent nEvent, const void * pEvent) Line 2691 at C:\cygwin64\home\user\lode\dev\core\vcl\source\window\winproc.cxx(2691) vcllo.dll!SalFrame::CallCallback(SalEvent nEvent, const void * pEvent) Line 309 at C:\cygwin64\home\user\lode\dev\core\vcl\inc\salframe.hxx(309) vclplug_winlo.dll!ImplHandleMouseMsg(HWND__ * hWnd, unsigned int nMsg, unsigned __int64 wParam, __int64 lParam) Line 3278 at C:\cygwin64\home\user\lode\dev\core\vcl\win\window\salframe.cxx(3278) vclplug_winlo.dll!SalFrameWndProc(HWND__ * hWnd, unsigned int nMsg, unsigned __int64 wParam, __int64 lParam, bool & rDef) Line 5671 at C:\cygwin64\home\user\lode\dev\core\vcl\win\window\salframe.cxx(5671) vclplug_winlo.dll!SalFrameWndProcW(HWND__ * hWnd, unsigned int nMsg, unsigned __int64 wParam, __int64 lParam) Line 6026 at C:\cygwin64\home\user\lode\dev\core\vcl\win\window\salframe.cxx(6026) [External Code] vclplug_winlo.dll!ImplSalDispatchMessage(const tagMSG * pMsg) Line 474 at C:\cygwin64\home\user\lode\dev\core\vcl\win\app\salinst.cxx(474) vclplug_winlo.dll!ImplSalYield(bool bWait, bool bHandleAllCurrentEvents) Line 505 at C:\cygwin64\home\user\lode\dev\core\vcl\win\app\salinst.cxx(505) vclplug_winlo.dll!WinSalInstance::DoYield(bool bWait, bool bHandleAllCurrentEvents) Line 580 at C:\cygwin64\home\user\lode\dev\core\vcl\win\app\salinst.cxx(580) vcllo.dll!ImplYield(bool i_bWait, bool i_bAllEvents) Line 352 at C:\cygwin64\home\user\lode\dev\core\vcl\source\app\svapp.cxx(352) vcllo.dll!Application::Yield() Line 437 at C:\cygwin64\home\user\lode\dev\core\vcl\source\app\svapp.cxx(437) vcllo.dll!Application::Execute() Line 330 at C:\cygwin64\home\user\lode\dev\core\vcl\source\app\svapp.cxx(330) sofficeapp.dll!desktop::Desktop::Main() Line 1592 at C:\cygwin64\home\user\lode\dev\core\desktop\source\app\app.cxx(1592) vcllo.dll!ImplSVMain() Line 204 at C:\cygwin64\home\user\lode\dev\core\vcl\source\app\svmain.cxx(204) vcllo.dll!SVMain() Line 237 at C:\cygwin64\home\user\lode\dev\core\vcl\source\app\svmain.cxx(237) sofficeapp.dll!soffice_main() Line 94 at C:\cygwin64\home\user\lode\dev\core\desktop\source\app\sofficemain.cxx(94) soffice.bin!sal_main() Line 51 at C:\cygwin64\home\user\lode\dev\core\desktop\source\app\main.c(51) soffice.bin!main(int argc, char * * argv) Line 49 at C:\cygwin64\home\user\lode\dev\core\desktop\source\app\main.c(49) [External Code]
Created attachment 188299 [details] Backtrace using Visual Studio 2022
Not reproducible in: Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: e26aeb882dd236adf19679d5df9b7ba5da1ed226 CPU threads: 4; OS: Linux 5.15; UI render: default; VCL: gtk3 Locale: en-GB (en_GB.UTF-8); UI: en-US Calc: threaded
Still reproducible with the latest LO 24.2 dev master: Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 5484657d2b1677b7e385ab6ef87ad64dcb9934e4 CPU threads: 20; OS: Windows 10.0 Build 22621; UI render: Skia/Vulkan; VCL: win Locale: en-US (en_DE); UI: en-US Calc: CL threaded Note that you have to right click on one of the TOC lines that fall outside the borders. Otherwise, it won't lead to assertion failure. Also, could you please test this on Windows?
Repro Arch Linux 64-bit, X11 Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: f5bcc34580d02f92af01963155f2d54776a5249b CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: kf5 (cairo+xcb) Locale: fi-FI (fi_FI.UTF-8); UI: en-US Calc: threaded Built on 12 September 2023