Download it now!
Bug 131147 - Assert: Undoing deletion ( don't store redline ExtraData during Undo )
Summary: Assert: Undoing deletion ( don't store redline ExtraData during Undo )
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.4.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: László Németh
URL:
Whiteboard: target:7.0.0 target:6.4.4
Keywords: bibisected, bisected, regression
: 130766 (view as bug list)
Depends on:
Blocks: Track-Changes Crash-Assert
  Show dependency treegraph
 
Reported: 2020-03-05 10:01 UTC by Xisco Faulí
Modified: 2020-04-22 10:54 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Xisco Faulí 2020-03-05 10:01:06 UTC
This is a follow-up bug of bug 130680

Steps to reproduce:
1. Open attachment 81619 [details] from bug 66302
2. Select all
3. Cut/Delete -> it crashes before bug 130680 fix
4. Undo

-> Assert ( see https://bugs.documentfoundation.org/show_bug.cgi?id=130680#c5 )

sw/source/core/undo/undobj.cxx:1450: static void SwUndo::SetSaveData(SwDoc&, SwRedlineSaveDatas&): Assertion `rSData.empty() || (rSData[0].nRedlineCount == rDoc.getIDocumentRedlineAccess().GetRedlineTable().size())' failed.

the one delete redline that is inserted on 
  <SwPaM> = SwPaM = {
    point = SwPosition (node 2497, offset 65),
    mark = SwPosition (node 528, offset 138)
  }, 

is split into 560 separate redlines by questionable code added in commit dc9a0b124272a6dc0a8d875d51b6f882e60a8a04 "tdf#127101 Change tracking: reject format at paragraph join" - of course you're supposed to get the same situation after Undo as initially...

The assert was also caught by the unittest added in https://git.libreoffice.org/core/commit/e4208eb2c067afe77eb85699b9951d4a5df599f3. so it's commented out for the time being
Comment 1 Xisco Faulí 2020-03-05 10:03:25 UTC
Regression introduced by:

author	László Németh <nemeth@numbertext.org>	2019-08-07 11:25:13 +0200
committer	László Németh <nemeth@numbertext.org>	2019-08-23 11:25:14 +0200
commit	dc9a0b124272a6dc0a8d875d51b6f882e60a8a04 (patch)
tree	8c689b2428210fb3bb58f0793aa2c67ac7049ce8
parent	58c9b9802ca7cbd6e6b11dda3e905742c1e4fb3c (diff)
tdf#127101 Change tracking: reject format at paragraph join

Adding Cc: to László Németh
Comment 2 NISZ LibreOffice Team 2020-04-06 12:05:15 UTC
*** Bug 130766 has been marked as a duplicate of this bug. ***
Comment 3 Commit Notification 2020-04-20 14:43:22 UTC
László Németh committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/66b39ca79b36da8d5e151deab17a0fb7690eebe6

tdf#131147 don't store redline ExtraData during Undo

It will be available in 7.0.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.
Comment 4 László Németh 2020-04-20 14:45:52 UTC
    tdf#131147 don't store redline ExtraData during Undo
    
    to avoid of unwanted redline changes and assertion.
    
    Breaking redlines and storing extra data (formatting
    changes) need only for change tracking during editing,
    not in an ongoing Undo process.
    
    Regression from commit dc9a0b124272a6dc0a8d875d51b6f882e60a8a04
    (tdf#127101 Change tracking: reject format at paragraph join).
Comment 5 Xisco Faulí 2020-04-21 15:59:58 UTC
Test passes now. setting to VERIFIED

@László, thanks for fixing this issue!!
Comment 6 Commit Notification 2020-04-22 10:52:00 UTC
László Németh committed a patch related to this issue.
It has been pushed to "libreoffice-6-4":

https://git.libreoffice.org/core/commit/12080e7a219777b650d396ea4f5e8a489c8b4b8d

tdf#131147 don't store redline ExtraData during Undo

It will be available in 6.4.4.

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.