Bug 140757 - EDITING Crash when undoing accepting tracked deletions
Summary: EDITING Crash when undoing accepting tracked deletions
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.1.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:7.2.0
Keywords: bibisected, bisected, haveBacktrace, implementationError
Depends on:
Blocks: tracked-changes-in-margin
  Show dependency treegraph
 
Reported: 2021-03-02 11:18 UTC by NISZ LibreOffice Team
Modified: 2021-03-24 14:17 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file from Writer (19.91 KB, application/vnd.oasis.opendocument.text)
2021-03-02 11:18 UTC, NISZ LibreOffice Team
Details
bt with debug symbols (7.60 KB, text/plain)
2021-03-02 17:44 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description NISZ LibreOffice Team 2021-03-02 11:18:15 UTC
Created attachment 170177 [details]
Example file from Writer

Attached file contains some text. In deletions-on-margin mode deleting two words from two paragraphs, then accepting/rejecting all changes and undoing crashes Writer.

Steps to reproduce:
    1. Open attached file, it has some text and change tracking is enabled.
    2. Enable Options – Writer – View – Tracked deletions in margin
    3. Select a word in the first paragraph of the document and delete it
    4. Select another word in the second paragraph of the document and delete it (the problem does not happen if the two deletions are from the same paragraph!)
    5. Edit – Track Changes – Accept All or Reject All (happens with both commands)
    6. Undo

Actual results:
Crash.

Expected results:
No crash.

LibreOffice details:
Version: 7.2.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 6fb9f368c6824a8ff7bc5bc5cf66fc2df7d055b7
CPU threads: 4; OS: Windows 10.0 Build 18363; UI render: Skia/Raster; VCL: win
Locale: en-US (hu_HU); UI: en-GB
Calc: CL

Additional Information: 
Bibisected using bibisect-win64-7.1 to:
URL: https://cgit.freedesktop.org/libreoffice/core/commit/?id=1e383097aa929176bac33f46787e16d945a0a98b 

author	László Németh <nemeth@numbertext.org>	2020-10-14 15:29:08 +0200
committer	László Németh <nemeth@numbertext.org>	2020-10-15 15:11:12 +0200

tdf#34355 sw,offapi,officecfg: show track changes in margin

Adding CC to: László Németh
Comment 1 Julien Nabet 2021-03-02 17:44:14 UTC
Created attachment 170183 [details]
bt with debug symbols

On pc Debian x86-64 with master sources updated today + enable-dbgutil, I got an assertion but it'll crash with a non debug build I suppose considering this:
    157         assert(pTableOrSectionNode); // known pathology
    158         for (sal_uLong j = pTableOrSectionNode->GetIndex(); j <= pTableOrSectionNode->EndOfSectionIndex(); ++j)
Comment 2 Commit Notification 2021-03-24 14:10:56 UTC
László Németh committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/0fe7070c9f6c1b4d4e2da05099255fbed10ab50c

tdf#140757 sw ChangesInMargin: fix crash on Undo of Accept All

It will be available in 7.2.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 3 László Németh 2021-03-24 14:17:09 UTC
@Julien: thanks for the backtrace!