Bug 153323 - Assertion `(nLen == TextFrameIndex(COMPLETE_STRING)) ? (nIdx.get() < rText.getLength()) : (nIdx + nLen).get() <= rText.getLength()' failed
Summary: Assertion `(nLen == TextFrameIndex(COMPLETE_STRING)) ? (nIdx.get() < rText.ge...
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.6.0.0 alpha0+
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: haveBacktrace
Depends on:
Blocks: Crash-Assert
  Show dependency treegraph
 
Reported: 2023-02-02 12:20 UTC by Buovjaga
Modified: 2024-02-12 07:15 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
GDB trace of crash (39.55 KB, text/plain)
2023-02-02 12:20 UTC, Buovjaga
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Buovjaga 2023-02-02 12:20:44 UTC
Created attachment 185063 [details]
GDB trace of crash

1. Open attachment 179678 [details] with a debug build
2. CTRL+A
3. Change the font to something else from the toolbar
4. Edit -> track changes -> Manage
5. Press ALT+R to reject changes one by one

After a bunch of rejections (~8), it will crash (kf5, gtk3, gen).

sw/source/core/inc/drawfont.hxx:123: SwDrawTextInfo::SwDrawTextInfo(const SwViewShell *, OutputDevice &, const SwScriptInfo *, const rtl::OUString &, const TextFrameIndex, const TextFrameIndex, sal_uInt16, bool, const vcl::text::TextLayoutCache *const): Assertion `(nLen == TextFrameIndex(COMPLETE_STRING)) ? (nIdx.get() < rText.getLength()) : (nIdx + nLen).get() <= rText.getLength()' failed.

Arch Linux 64-bit, X11
Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 4c6c317e1743166ee772ab03413f0fa59c59f859
CPU threads: 8; OS: Linux 6.1; UI render: default; VCL: kf5 (cairo+xcb)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: threaded
Built on 2 February 2023
Comment 1 Stéphane Guillou (stragu) 2023-02-02 13:02:02 UTC
Could not reproduce in a build from 23rd of January:

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 5cd3a8ec6d36a389eb0be4d59f4570e3bda92dc5
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

Nor with a build from today:

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: b2bd60b8c1937502857e12b0eea42323fd2353c8
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

Nor with gen VCL. On Ubuntu 20.04 with GNOME 3.36.8 with Wayland.

Am I missing something?
Comment 2 Buovjaga 2023-02-02 13:11:21 UTC
(In reply to Stéphane Guillou (stragu) from comment #1)
> Could not reproduce in a build from 23rd of January:
> 
> Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
> Build ID: 5cd3a8ec6d36a389eb0be4d59f4570e3bda92dc5
> CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
> Locale: en-AU (en_AU.UTF-8); UI: en-US
> Calc: threaded
> 
> Nor with a build from today:
> 
> Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
> Build ID: b2bd60b8c1937502857e12b0eea42323fd2353c8
> CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
> Locale: en-AU (en_AU.UTF-8); UI: en-US
> Calc: threaded
> 
> Nor with gen VCL. On Ubuntu 20.04 with GNOME 3.36.8 with Wayland.
> 
> Am I missing something?

Are they your own builds, built with --enable-debug or --enable-dbgutil?
Comment 3 Stéphane Guillou (stragu) 2023-02-02 13:21:07 UTC
(In reply to Buovjaga from comment #2)
> Are they your own builds, built with --enable-debug or --enable-dbgutil?

Older one is a debug build, newer one is not, both from https://dev-builds.libreoffice.org/daily/master/current.html
I thought the crash would still happen with the non-debug one.
Comment 4 Telesto 2023-02-02 21:20:22 UTC
No assert either, but i'm using an old build (7 weeks ago)
Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 102846d45cb9660805e209b6954c7b8d707b8288
CPU threads: 8; OS: Mac OS X 12.3.1; UI render: Skia/Raster; VCL: osx
Locale: nl-NL (nl_NL.UTF-8); UI: en-US
Calc: threaded
Comment 5 Aron Budea 2023-02-03 09:57:57 UTC
No assertion failure here with a debug build of LO 7.6.0.0.alpha0+ (a834bbad8295cba0ca88a91a524aad48640271ec) / Ubuntu.
Comment 6 Buovjaga 2023-02-03 12:31:31 UTC
Áron, Stéphane: try pressing and holding Alt-R
Comment 7 Aron Budea 2023-02-03 13:03:45 UTC
Still no crash, tried both with gtk3 and gen. Btw, in gtk3 case I first have to select the first entry, it isn't preselected, and Alt+R does nothing.
Comment 8 Telesto 2023-02-03 23:14:36 UTC
(In reply to Buovjaga from comment #2)
Incremental builds on macOS tend to produce spurious asserts (and other quirkiness) once in a while (at least for me). A make clean build might solve the problem
Comment 9 Buovjaga 2023-02-04 09:57:46 UTC
(In reply to Telesto from comment #8)
> (In reply to Buovjaga from comment #2)
> Incremental builds on macOS tend to produce spurious asserts (and other
> quirkiness) once in a while (at least for me). A make clean build might
> solve the problem

The motherhugger is still doing it after make clean...
Comment 10 Dieter 2024-02-08 09:28:24 UTC
Buovyaga, do you still get the crash with actual master?
=> NEDINFO
Comment 11 Buovjaga 2024-02-12 07:15:08 UTC
I can't make it crash anymore

Arch Linux 64-bit, X11
Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 4253acd5300c526b062fc5b5f109e93e6e9d08df
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 31 January 2024