Bug 159546 - Assert in debug build when typing in footnotes and undoing twice
Summary: Assert in debug build when typing in footnotes and undoing twice
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
24.8.0.0 alpha0+ Master
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Crash-Assert Undo-Redo
  Show dependency treegraph
 
Reported: 2024-02-04 00:22 UTC by Matt K
Modified: 2024-02-16 14:41 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Footnotes file (36.00 KB, application/msword)
2024-02-04 00:24 UTC, Matt K
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matt K 2024-02-04 00:22:17 UTC
Description:
Assert in debug build when typing in footnotes and undoing twice

This is a follow up to the comments in https://gerrit.libreoffice.org/c/core/+/162317.

Steps to Reproduce:
1. Open the attached file
2. Put cursor on footnote 43 and type a few characters
3. Put cursor on footnote 47 and type a few characters
4. Undo twice

Actual Results:
Assert fires

Expected Results:
No assert


Reproducible: Always


User Profile Reset: Yes

Additional Info:
Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 05889c7fd814187aec3d88c056ece0cc33736868
CPU threads: 16; OS: Windows 10.0 Build 22631; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded


Assert callstack:

        ucrtbased.dll!issue_debug_notification(const wchar_t * const message) Line 28	C++
 	ucrtbased.dll!__acrt_report_runtime_error(const wchar_t * message) Line 154	C++
 	ucrtbased.dll!abort() Line 61	C++
 	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 187	C++
 	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	C++
 	ucrtbased.dll!_wassert(const wchar_t * expression, const wchar_t * file_name, unsigned int line_number) Line 444	C++
 	vcllo.dll!o3tl::iterateCodePoints(std::basic_string_view<char16_t,std::char_traits<char16_t>> string, long * indexUtf16, long incrementCodePoints) Line 531	C++
>	vcllo.dll!getBiDiDirection(std::basic_string_view<char16_t,std::char_traits<char16_t>> text, long index, long len) Line 252	C++
 	vcllo.dll!makeGlyphsSubset(const SalLayoutGlyphs & source, const OutputDevice * outputDevice, std::basic_string_view<char16_t,std::char_traits<char16_t>> text, long index, long len) Line 281	C++
 	vcllo.dll!SalLayoutGlyphsCache::GetLayoutGlyphs(const VclPtr<OutputDevice const> & outputDevice, const rtl::OUString & text, long nIndex, long nLen, __int64 nLogicWidth, const vcl::text::TextLayoutCache * layoutCache) Line 403	C++
 	swlo.dll!GetTextArray(const OutputDevice & rDevice, const rtl::OUString & rStr, KernArray & rDXAry, long nIndex, long nLen, bool bCaret, const vcl::text::TextLayoutCache * layoutCache) Line 749	C++
 	swlo.dll!SwFntObj::GetTextSize(SwDrawTextInfo & rInf) Line 1635	C++
 	swlo.dll!SwSubFont::GetTextSize_(SwDrawTextInfo & rInf) Line 1022	C++
 	swlo.dll!SwFont::GetTextSize_(SwDrawTextInfo & rInf) Line 314	C++
 	swlo.dll!SwTextSizeInfo::GetTextSize() Line 428	C++
 	swlo.dll!SwTextPortion::GetTextSize(const SwTextSizeInfo & rInf) Line 544	C++
 	swlo.dll!SwTextCursor::GetCharRect_(SwRect * pOrig, o3tl::strong_int<long,Tag_TextFrameIndex> nOfst, SwCursorMoveState * pCMS) Line 943	C++
 	swlo.dll!SwTextCursor::GetCharRect(SwRect * pOrig, o3tl::strong_int<long,Tag_TextFrameIndex> nOfst, SwCursorMoveState * pCMS, const __int64 nMax) Line 1270	C++
 	swlo.dll!SwTextFrame::GetCharRect(SwRect & rOrig, const SwPosition & rPos, SwCursorMoveState * pCMS, bool bAllowFarAway) Line 285	C++
 	swlo.dll!SwCursorShell::UpdateCursor(unsigned short eFlags, bool bIdleEnd) Line 2271	C++
 	swlo.dll!SwCursorShell::EndAction(const bool bIdleEnd) Line 283	C++
 	swlo.dll!SwEditShell::EndAllAction() Line 102	C++
 	swlo.dll!SwWrtShell::Do(SwWrtShell::DoType eDoType, unsigned short nCnt, unsigned short nOffset) Line 60	C++
 	swlo.dll!SwBaseShell::ExecUndo(SfxRequest & rReq) Line 657	C++
Comment 1 Matt K 2024-02-04 00:24:32 UTC
Created attachment 192375 [details]
Footnotes file
Comment 2 Buovjaga 2024-02-16 14:41:15 UTC
Repro with debug build

Arch Linux 64-bit, X11
Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 3b04e74503ec6d07dc4befdb756e6abdc3de4e58
CPU threads: 8; OS: Linux 6.7; UI render: default; VCL: kf5 (cairo+xcb)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: threaded
Built on 16 February 2024