Created attachment 188689 [details] ODT file containing a right to left header Description: While trying to edit the RTL header, clicking on the header sometimes leads to assertion failure. Steps to Reproduce: 1. Open the attached .odt file 2. Go to page 2 3. Click on the header Actual Results: Error message: "abort() has been called". Assertion failed: pPageBody && "presumably this is impossible", file C:/cygwin64/home/user/lode/dev/core/sw/source/core/layout/paintfrm.cxx, line 7086 Expected Results: No crash Reproducible: Always User Profile Reset: No Additional Info: This only happens in a debug build: Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 316215486b2fb255f4deea073e4d43671c4325c1 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 Please note that the rendering of the rtl (right to left) header and the text and image inside it is incorrect.
Created attachment 188690 [details] Backtrace Backtrace, created using Visual Studio 2022: swlo.dll!SwPageFrame::GetSubsidiaryLinesPolygons(const SwViewShell & rViewShell) Line 7082 at sw\source\core\layout\paintfrm.cxx(7082) swlo.dll!SwPageFrame::AddSubsidiaryLinesBounds(const SwViewShell & rViewShell, std::vector<tools::Rectangle,std::allocator<tools::Rectangle>> & rRects) Line 7132 at sw\source\core\layout\paintfrm.cxx(7132) swlo.dll!SwViewShell::InvalidatePageAndHFSubsidiaryLines() Line 140 at sw\source\core\view\viewsh.cxx(140) swlo.dll!SwViewShell::ToggleHeaderFooterEdit() Line 130 at sw\source\core\view\viewsh.cxx(130) swlo.dll!SwFEShell::ToggleHeaderFooterEdit() Line 1329 at sw\source\core\frmedt\fews.cxx(1329) swlo.dll!SwEditWin::MouseButtonDown(const MouseEvent & _rMEvt) Line 3017 at sw\source\uibase\docvw\edtwin.cxx(3017) 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 709 at vcl\source\window\winproc.cxx(709) vcllo.dll!ImplHandleSalMouseButtonDown(vcl::Window * pWindow, const SalMouseEvent * pEvent) Line 2340 at vcl\source\window\winproc.cxx(2340) vcllo.dll!ImplWindowFrameProc(vcl::Window * _pWindow, SalEvent nEvent, const void * pEvent) Line 2691 at vcl\source\window\winproc.cxx(2691) vcllo.dll!SalFrame::CallCallback(SalEvent nEvent, const void * pEvent) Line 310 at vcl\inc\salframe.hxx(310) vclplug_winlo.dll!ImplHandleMouseMsg(HWND__ * hWnd, unsigned int nMsg, unsigned __int64 wParam, __int64 lParam) Line 3292 at vcl\win\window\salframe.cxx(3292) vclplug_winlo.dll!SalFrameWndProc(HWND__ * hWnd, unsigned int nMsg, unsigned __int64 wParam, __int64 lParam, bool & rDef) Line 5688 at vcl\win\window\salframe.cxx(5688) vclplug_winlo.dll!SalFrameWndProcW(HWND__ * hWnd, unsigned int nMsg, unsigned __int64 wParam, __int64 lParam) Line 6043 at vcl\win\window\salframe.cxx(6043)
Created attachment 188739 [details] Minimal file that causes crash The structure of one of the headers (header4.xml) in the attachment is like this: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <w:hdr ...> <w:p ...> <w:pPr> <w:pStyle w:val="Header"/> <w:bidi w:val="0"/> </w:pPr> </w:p> </w:hdr> It contains an extra <w:bidi> tag compared to other headers.
Hossein committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/a99a63287f96290f5641a4216432f7b637402ea6 tdf#156560 Fix assertion failure editing RTL header It will be available in 24.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.