Bug 147505 - Assertion failed: (rSData.empty() || rSData[0].m_bRedlineMoved || (rSData[0].m_nRedlineCount == rDoc.getIDocumentRedlineAccess().GetRedlineTable().size())) and crash in non-debug eventually
Summary: Assertion failed: (rSData.empty() || rSData[0].m_bRedlineMoved || (rSData[0]....
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.4.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: wantBacktrace
Depends on:
Blocks: Crash-Assert
  Show dependency treegraph
 
Reported: 2022-02-18 08:48 UTC by Telesto
Modified: 2022-03-13 18:30 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
BT without symbols (13.50 KB, text/plain)
2022-02-18 08:48 UTC, Telesto
Details
Example file 2 (22.12 KB, application/vnd.oasis.opendocument.text)
2022-02-20 19:14 UTC, Telesto
Details
Screencast for example 2 (3.53 MB, video/mp4)
2022-02-20 19:15 UTC, Telesto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2022-02-18 08:48:33 UTC
Description:
Crash swlo!sw::MetaFieldManager::getDocumentProperties when deleting paragraphs with Track Changes Record on

Steps to Reproduce:
1. Open Writer
2. Tools -> AutoText -> Standard -> Insert Dummy Text
3. CTRL+A & CTRL+C
4. Paste couple of times.. say until 7 pages filled
5. Edit -> Track Changes -> isable show
6. Edit -> Track changees _> Enable Record changes 
6. Start deleting random text pieces

Tiny problem.. it doesn't appear to crash every reliably :-(. Got three crashes.. So pretty sure something is present, but i'm likely missing a variable

Actual Results:
Crash

Expected Results:
No crash


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.4.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 2bb10a827ac13d0caf009e8526ccd9f17dc71653
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL Jumbo
Comment 1 Telesto 2022-02-18 08:48:54 UTC
Created attachment 178368 [details]
BT without symbols
Comment 2 Telesto 2022-02-18 08:51:20 UTC
The backtrace here is exactly the same as bug 145929
Comment 3 Telesto 2022-02-20 19:14:37 UTC
Created attachment 178412 [details]
Example file 2
Comment 4 Telesto 2022-02-20 19:15:50 UTC
Created attachment 178414 [details]
Screencast for example 2
Comment 5 Telesto 2022-02-20 19:22:36 UTC
@Julien
I hope you don't mind I record the steps as a screencast (attachment 178414 [details] 
), instead of writing them down.
Comment 6 Julien Nabet 2022-02-22 18:58:40 UTC
Sorry, I don't have the patience to try to follow all the actions done on the screencast.
Comment 7 Telesto 2022-02-24 23:01:53 UTC
Assertion failed: (rSData.empty() || rSData[0].m_bRedlineMoved || (rSData[0].m_nRedlineCount == rDoc.getIDocumentRedlineAccess().GetRedlineTable().size())), function SetSaveData, file undobj.cxx, line 1487.
Process 72517 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = hit program assert
    frame #4: 0x0000000180995749 libswlo.dylib`SwUndo::SetSaveData(rDoc=0x000000016b9fb640, rSData=0x0000600000401720) at undobj.cxx:1486:5
   1483	#if OSL_DEBUG_LEVEL > 0
   1484	    // check redline count against count saved in RedlineSaveData object
   1485	    // except in the case of moved redlines
-> 1486	    assert(rSData.empty() || rSData[0].m_bRedlineMoved ||
   1487	           (rSData[0].m_nRedlineCount == rDoc.getIDocumentRedlineAccess().GetRedlineTable().size()));
   1488	            // "redline count not restored properly"
   1489	#endif
Target 0: (soffice) stopped.
Comment 8 Xisco Faulí 2022-03-09 11:46:07 UTC
(In reply to Telesto from comment #7)
> Assertion failed: (rSData.empty() || rSData[0].m_bRedlineMoved ||
> (rSData[0].m_nRedlineCount ==
> rDoc.getIDocumentRedlineAccess().GetRedlineTable().size())), function
> SetSaveData, file undobj.cxx, line 1487.
> Process 72517 stopped
> * thread #1, queue = 'com.apple.main-thread', stop reason = hit program
> assert
>     frame #4: 0x0000000180995749
> libswlo.dylib`SwUndo::SetSaveData(rDoc=0x000000016b9fb640,
> rSData=0x0000600000401720) at undobj.cxx:1486:5
>    1483	#if OSL_DEBUG_LEVEL > 0
>    1484	    // check redline count against count saved in RedlineSaveData
> object
>    1485	    // except in the case of moved redlines
> -> 1486	    assert(rSData.empty() || rSData[0].m_bRedlineMoved ||
>    1487	           (rSData[0].m_nRedlineCount ==
> rDoc.getIDocumentRedlineAccess().GetRedlineTable().size()));
>    1488	            // "redline count not restored properly"
>    1489	#endif
> Target 0: (soffice) stopped.

PRobably this got fixed by https://cgit.freedesktop.org/libreoffice/core/commit/?id=53560aa06462f1cf04d69acafed20da971bc5c27

@Telesto, please try with a recent daily build with the fix in place
Comment 9 Telesto 2022-03-13 18:30:10 UTC
Appears to be OK as far my testing goes
Version: 7.4.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 3ccc4c123f5e78e0204d11abeab2d1a74278ca3e
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL