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
Tools > Options > Writer > View: TC in margins enabled
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.
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.
@Heiko, Terrence: thanks for your bug report and analysis. It's still not perfect, but I'm working on the next steps.
Thanks for fixing the bug.
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
@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.
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!!