Bug 137526 - Crash on undo with track changes enabled
Summary: Crash on undo with track changes enabled
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.1.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: László Németh
URL:
Whiteboard: target:7.1.0
Keywords: haveBacktrace
Depends on:
Blocks: tracked-changes-in-margin
  Show dependency treegraph
 
Reported: 2020-10-16 10:46 UTC by Heiko Tietze
Modified: 2021-01-01 06:00 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
backtrace from assertion (9.04 KB, text/plain)
2020-10-19 15:23 UTC, Terrence Enger
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Heiko Tietze 2020-10-16 10:46:49 UTC
Use latest master with patch from bug 34355, insert some dummy text, enable TC, delete a word, undo => crash

soffice.bin: /home/ht/Sources/libreoffice/sw/source/core/doc/DocumentRedlineManager.cxx:246: void sw::UpdateFramesForRemoveDeleteRedline(SwDoc &, const SwPaM &): Assertion `pTableOrSectionNode' failed

Version: 7.1.0.0.alpha0+
Build ID: 40d74f2def9e2255f2a7b85b3c30f76d0a0bd44e
CPU threads: 8; OS: Linux 5.8; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 1 Heiko Tietze 2020-10-16 10:47:50 UTC
Tools > Options > Writer > View: TC in margins enabled
Comment 2 Terrence Enger 2020-10-19 15:23:53 UTC
Created attachment 166515 [details]
backtrace from assertion

The backtrace is from a local build of commit 1e383097 (2020-10-17),
built and running of debian-buster.

I am setting status NEW and adding keyword haveBacktrace.
Comment 3 Commit Notification 2020-10-21 06:39:13 UTC
László Németh committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/62596e7f52492305b49dab70bdf81daf82b930a1

tdf#137526 sw ChangesInMargin: fix Undo of deleted words

It will be available in 7.1.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-10-21 06:40:40 UTC
@Heiko, Terrence: thanks for your bug report and analysis. It's still not perfect, but I'm working on the next steps.
Comment 5 Heiko Tietze 2020-10-21 08:30:00 UTC
Thanks for fixing the bug.
Comment 6 Heiko Tietze 2020-10-22 08:33:33 UTC
Not fully resolved: I delete some text with delete (one character by another). Undoing this crashes the application after the third operation (first inserts the last character, second places the cursor before this letter).

soffice.bin: /home/ht/Sources/libreoffice/sw/source/core/doc/DocumentRedlineManager.cxx:246: void sw::UpdateFramesForRemoveDeleteRedline(SwDoc &, const SwPaM &): Assertion `pTableOrSectionNode' failed.

Version: 7.1.0.0.alpha0+
Build ID: b16d11c9d85f60867f634f5049e38c1f62d8d412
CPU threads: 8; OS: Linux 5.9; UI render: default; VCL: kf5
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 7 László Németh 2020-10-22 16:11:50 UTC
@Heiko: thanks for checking and reporting the problem. I have filed an issue for the deleted character sequence (Bug 137684, crash fix: https://gerrit.libreoffice.org/c/core/+/104691), and close this reopened issue. I am still learning the Undo code, and I plan to fix the different problems under different issues/patches and associated unit tests for LO 7.1, which could help examination of the possible regressions later.
Comment 8 Xisco Faulí 2020-10-26 11:24:46 UTC
Verified in

Version: 7.1.0.0.alpha1+
Build ID: 0f0a5b63b19196f9463149a0a1991704c940efe2
CPU threads: 4; OS: Linux 5.7; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

@László Németh, thanks for fixing this issue!!