Bug 154860 - !!br0ken!! appears in table cell with a mixture of track changes record + undo/redo
Summary: !!br0ken!! appears in table cell with a mixture of track changes record + und...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.6.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: haveBacktrace
Depends on:
Blocks: Track-Changes Crash-Assert
  Show dependency treegraph
 
Reported: 2023-04-17 13:07 UTC by Telesto
Modified: 2024-09-29 17:11 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
bt with debug symbols (8.01 KB, text/plain)
2023-04-17 15:48 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2023-04-17 13:07:02 UTC
Description:
!!br0ken!! appears in table cell with a mixture of track changes record + undo/redo

Steps to Reproduce:
1. Open Writer
2. Insert a 2x2 table
3. Edit -> Track Changes -> Record ON (Show ON)
4. Type 'A' in A1, Type 'B' in A2
5. Press Delete Row Button 2x
6. Press and hold CTRL+Z until everything is undone
7. Press CTRL+Y until everything is redone (empty table, with cursor in A1)
8. Type 'XXX' (text will be black, instead of track changes insert color)
9. Press tab
10. Press and hold CTRL+Z until everything is undone
11. Press CTRL+Y to redo everything

Actual Results:
!!br0ken!! (likely also a assert somewhere, but I'm using a non-debug build right now)

Expected Results:
Proper undo/redo


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: c4a58634753a84b09f20f7271d6525a6656522d3
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL threaded
Comment 1 Stéphane Guillou (stragu) 2023-04-17 15:41:37 UTC
Tried with a debug build from a few days ago. After these steps:

1. Open Writer
2. Insert a 2x2 table
3. Edit -> Track Changes -> Record ON (Show ON)
4. Type 'A' in A1, Type 'B' in A2
5. Press Delete Row Button 2x
6. Press and hold CTRL+Z until everything is undone
7. Press CTRL+Y until everything is redone

... I get the warnings:

warn:legacy.osl:77021:77021:sw/source/core/doc/DocumentRedlineManager.cxx:1327: Redline end: index after text
warn:legacy.osl:77021:77021:sw/source/core/edit/edattr.cxx:728: Index outside the range - endless loop!

After that, if I type in the cell A2, I get the crash with failed assertion:

soffice.bin: /home/tdf/lode/jenkins/workspace/lo_gerrit/tb/src_master/sal/rtl/strtmpl.hxx:1005: void rtl::str::newFromSubString(IMPL_RTL_STRINGDATA**, const IMPL_RTL_STRINGDATA*, sal_Int32, sal_Int32) [with IMPL_RTL_STRINGDATA = _rtl_uString; sal_Int32 = int]: Assertion `false' failed.

Alternatively, if I click in another cell instead of adding text, I get a different crash with failed assertion:

soffice.bin: /home/tdf/lode/jenkins/workspace/lo_gerrit/tb/src_master/include/rtl/ustring.hxx:2230: std::u16string_view rtl::OUString::subView(sal_Int32, sal_Int32) const: Assertion `count <= getLength() - beginIndex' failed.
Comment 2 Julien Nabet 2023-04-17 15:48:35 UTC
Created attachment 186732 [details]
bt with debug symbols

On pc Debian x86-64 with master sources updated today, I could reproduce this.
Comment 3 Stéphane Guillou (stragu) 2023-04-17 16:03:05 UTC
(In reply to Stéphane Guillou (stragu) from comment #1)
> Tried with a debug build from a few days ago.

Forgot the version details:

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

No crash if not debug.
Comment 4 Buovjaga 2024-09-29 17:11:28 UTC
No repro with 7.6 or master, even a debug build. Please retest.

Arch Linux 64-bit
Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 59fc2b5ca9678855feb30345761dad739b546edc
CPU threads: 8; OS: Linux 6.10; UI render: default; VCL: kf6 (cairo+wayland)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: CL threaded
Built on 27 September 2024