Bug 130685 - CRASH: after pasting and undoing (change tracking involved)
Summary: CRASH: after pasting and undoing (change tracking involved)
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: Michael Stahl (allotropia)
URL:
Whiteboard: target:7.0.0 target:6.4.4
Keywords: bibisected, bisected, regression
: 130220 (view as bug list)
Depends on:
Blocks: Crash-BigPtrArray redlinehide-regressions
  Show dependency treegraph
 
Reported: 2020-02-15 12:58 UTC by Xisco Faulí
Modified: 2024-01-04 17:10 UTC (History)
5 users (show)

See Also:
Crash report or crash signature: ["BigPtrArray::Index2Block(unsigned long)"]


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Xisco Faulí 2020-02-15 12:58:36 UTC
Steps to reproduce:
1. Open attachment 116637 [details] from bug 92165
2. Select all
3. Cut
4. Paste x2
5. Undo x3

-> Crash

Reproduced in

Version: 7.0.0.0.alpha0+
Build ID: 54acab919e7c7c5d60fc697bda54278861ac250e
CPU threads: 4; OS: Linux 4.19; UI render: default; VCL: gtk3; 
Locale: en-US (en_US.UTF-8); UI-Language: en-US
Calc: threaded
Comment 1 Xisco Faulí 2020-02-15 13:01:52 UTC
The document started to crash at import time at https://cgit.freedesktop.org/libreoffice/core/commit/?id=4532845e22c10f252840887e55002307227b2390.
Later on, it import crash was fixed at https://cgit.freedesktop.org/libreoffice/core/commit/?id=f609eba8b979620dc8f1c4a47d710360f8aae9e6

Adding Cc: to Michael Stahl
Comment 2 Dieter 2020-02-16 06:30:00 UTC
I confirm it with

Version: 7.0.0.0.alpha0+ (x64)
Build ID: eeb2d19e77d6dc47c68e8ba0920a02cf64a1247b
CPU threads: 4; OS: Windows 10.0 Build 18363; UI render: default; VCL: win; 
Locale: de-DE (de_DE); UI-Language: en-GB
Calc: threaded
Comment 3 Commit Notification 2020-04-03 15:20:46 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/27aa4b16bf704d0246595750daf57b57ff2577b3

(related: tdf#130685) sw: fix ~SwIndexReg asserts from ...

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 Commit Notification 2020-04-03 15:22:20 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/166b5010b402a41b192b1659093a25acf9065fd9

tdf#130685 sw_redlinehide: fix copying to position following redline

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 5 Commit Notification 2020-04-03 15:22:29 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/520b0e1679d7a97aa3d91cfc95ca647339da7e84

(related: tdf#130685) sw_redlinehide: fix update of pLastNode/pParaPropsNode

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 6 Commit Notification 2020-04-03 15:22:39 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/58353884dc86bdb3c1464f8bbf8c3e131584b78a

(related: tdf#130685) sw: adapt definition of sw_redlinehide index 0

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 7 Michael Stahl (allotropia) 2020-04-03 15:36:02 UTC
there's still one problem left, which could well be the one originally reported.

on step 5 we get:

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

this is due to redline splitting code added in:

commit dc9a0b124272a6dc0a8d875d51b6f882e60a8a04
Author:     László Németh <nemeth@numbertext.org>
AuthorDate: Wed Aug 7 11:25:13 2019 +0200
Commit:     László Németh <nemeth@numbertext.org>
CommitDate: Fri Aug 23 11:25:14 2019 +0200

    tdf#127101 Change tracking: reject format at paragraph join
    
    Now "Reject tracked change" can restore the
    original format of the paragraphs of a tracked
    deletion during editing, storing the format change
    using SetExtraData() of SwRangeRedline.


i can spend some work time looking into that, although it doesn't look obvious...
Comment 8 Xisco Faulí 2020-04-03 16:30:34 UTC
Hi Michael,
is it the same as bug 131147 ?
Comment 9 Commit Notification 2020-04-04 22:24:36 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-6-4":

https://git.libreoffice.org/core/commit/c7c157c905b8b70aa3e426a6e4d2ba40963caf1a

(related: tdf#130685) sw: fix ~SwIndexReg asserts from ...

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.
Comment 10 Commit Notification 2020-04-04 22:24:44 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-6-4":

https://git.libreoffice.org/core/commit/f7aa951014c283bc629eaea14da2ca0d68f99431

tdf#130685 sw_redlinehide: fix copying to position following redline

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.
Comment 11 Commit Notification 2020-04-04 22:27:23 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-6-4":

https://git.libreoffice.org/core/commit/431dd62b7d1a4f8ca1a1833aa33c1f5f08a900a0

(related: tdf#130685) sw: adapt definition of sw_redlinehide index 0

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.
Comment 12 Commit Notification 2020-04-06 12:38:35 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-6-4":

https://git.libreoffice.org/core/commit/f8d0f77de20d6adf6f532d13003a96856a98f69b

(related: tdf#130685) sw_redlinehide: fix update of pLastNode/pParaPropsNode

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.
Comment 13 Commit Notification 2020-04-07 10:25:23 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/9977fbeed1461a8f5cfa8029c02e914c099f3230

tdf#130685: Add unittest

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 14 Michael Stahl (allotropia) 2020-04-22 10:54:19 UTC
the remaining problem appears to be fixed by:

commit 66b39ca79b36da8d5e151deab17a0fb7690eebe6
Author:     László Németh <nemeth@numbertext.org>
AuthorDate: Mon Apr 20 12:46:58 2020 +0200
Commit:     László Németh <nemeth@numbertext.org>
CommitDate: Mon Apr 20 16:42:08 2020 +0200

    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).
    
    Change-Id: Id78251bc14821cc82d8f3d34eec63ba7bac68df0
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92559


-> let's call this fixed
Comment 15 Dieter 2020-05-08 08:37:24 UTC
Verified with

Version: 7.0.0.0.alpha1+ (x64)
Build ID: 99c337d1d3831ce9d2c7dc1cbff713f4ac49d6ac
CPU threads: 4; OS: Windows 10.0 Build 18363; UI render: Skia/Raster; VCL: win; 
Locale: de-DE (de_DE); UI: en-GB
Calc: CL

Michael, thanks for fixing it!
Comment 16 Xisco Faulí 2020-06-19 09:13:04 UTC
*** Bug 130220 has been marked as a duplicate of this bug. ***