Download it now!
Bug 137684 - ChangesInMargin: Crash on Undo of characters deleted by pressing Delete
Summary: ChangesInMargin: Crash on Undo of characters deleted by pressing Delete
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: Not Assigned
URL:
Whiteboard: target:7.1.0
Keywords: haveBacktrace
Depends on:
Blocks: tracked-changes-in-margin 137503
  Show dependency treegraph
 
Reported: 2020-10-22 15:39 UTC by László Németh
Modified: 2020-11-20 21:18 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
backtrace from assertion (9.46 KB, text/plain)
2020-10-22 19:16 UTC, Terrence Enger
Details
backtrace from assertion, DocumentRedlineManager.cxx:246 (8.86 KB, text/plain)
2020-10-25 21:10 UTC, Terrence Enger
Details

Note You need to log in before you can comment on or make changes to this bug.
Description László Németh 2020-10-22 15:39:10 UTC
Switch on ChangesInMargin mode, delete a word using the key Delete, and try to use Undo on the deletion.
Comment 1 Terrence Enger 2020-10-22 19:16:38 UTC
Created attachment 166643 [details]
backtrace from assertion

The backtrace is from a local build of commit 5a342bde (2020-10-22),
built and running on debian-buster.

The assertion message is (rewrapped):

    soffice.bin:
        /home/terry/lo_hacking/git/libo6/sw/source/core/bastyp/bparr.cxx:84:
        BigPtrEntry* BigPtrArray::operator[](sal_uLong) const:
        Assertion `idx < m_nSize' failed.

I am adding keyword haveBacktrace.
Comment 2 Commit Notification 2020-10-24 12:27:30 UTC
László Németh committed a patch related to this issue.
It has been pushed to "master":

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

tdf#137684 sw ChangesInMargin: fix crash on Undo of characters

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 3 Terrence Enger 2020-10-25 21:10:03 UTC
Created attachment 166711 [details]
backtrace from assertion, DocumentRedlineManager.cxx:246

Alas, I still have a crash in a local build of commit 5219c6bd
(2020-10-24), built and running on debian-buster.


STR

Once:

(0) Tools > Options > "LibreOfficeDev Writer" > View > "Tracked
    deletions in margin" : checked

Test

(1) Run LO with command line options --norestore --nologo --writer

(2) Type "the quick brown".  Document has "The quick brown"; left
    margin is empty.

(3) Take menu options Edit > "Track Changes" > Record.  No visible
    result.

(4) Type "<bs><bs><bs><bs><bs>".  Document has "The quick "; left
    margin is still empty.

    This is not what I expect, but that is a different problem.

(5) Type "<ctrl>+Z".  Document has "The quick n"; the "n" is selected;
    left margin has in blue struckthrough "b".

(6) Type "<ctrl>+Z".  Document has "The quick n"; nothing is selected;
    left margin still blue struckthrough "b".

(7) Type "<ctrl>+Z".  Crash.


The terminal message, rewrapped:

    soffice.bin:
    /home/terry/lo_hacking/git/libo6/sw/source/core/doc/DocumentRedlineManager.cxx:246:
    void sw::UpdateFramesForRemoveDeleteRedline(SwDoc&, const SwPaM&):
    Assertion `pTableOrSectionNode' failed.
Comment 4 László Németh 2020-10-26 07:23:52 UTC
@Terence: thanks for your detailed bug report and analysis! Missing margin data and backspace crash are different bugs, and they will handled by the upcoming patches. I will be able to continue on only in the next month, but my plan is to finish these in December. Please, file the detected problems in different bug reports, this could speed up my work because that is based on a ticket system, or you can wait a few weeks for a better solution (because otherwise I must work on other smaller change tracking/Writer problems in parallel).
Comment 5 Terrence Enger 2020-10-26 15:11:27 UTC
I have submitted follow-on bug reports:
  - bug 137771 for the contents of the left margin and the document
    area
  - bug 137772 for the failed assertion
Comment 6 NISZ LibreOffice Team 2020-11-09 13:05:36 UTC
Verified in:

Version: 7.1.0.0.alpha1+ (x64)
Build ID: d3cee4f3839e22754e167e89d25acd6ccacf0b6e
CPU threads: 4; OS: Windows 10.0 Build 17134; UI render: Skia/Raster; VCL: win
Locale: hu-HU (hu_HU); UI: hu-HU
Calc: threaded
Comment 7 Commit Notification 2020-11-20 21:18:34 UTC
László Németh committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/37fb6b5faa56c68c5d4dc61ee2eaafc828bf9939

tdf#137684 sw ChangesInMargin: fix Undo of characters

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.