Bug 159377 - CRASH at undo at after pasting table in footer (swlo!SwFormatFootnote::SetNumStr+0x3e26:)
Summary: CRASH at undo at after pasting table in footer (swlo!SwFormatFootnote::SetNum...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
24.8.0.0 alpha0+
Hardware: All All
: medium critical
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, wantBacktrace
Depends on:
Blocks: Footnote-Endnote Undo-Redo Crash
  Show dependency treegraph
 
Reported: 2024-01-25 19:35 UTC by Telesto
Modified: 2024-07-23 14:52 UTC (History)
4 users (show)

See Also:
Crash report or crash signature: ["BigPtrArray::Index2Block"]


Attachments
Example file at step 3 (9.77 KB, application/vnd.oasis.opendocument.text)
2024-07-05 06:43 UTC, Buovjaga
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2024-01-25 19:35:09 UTC
Description:
CRASH at undo at some point after table in footer (swlo!SwFormatFootnote::SetNumStr+0x3e26:)

Steps to Reproduce:
1. Open Writer
2. Insert a table 2x2
3. Insert a footnote below the table
4. Select the table cells 
5. CTRL+X
6. Enter the footnote
7. Type 'X'
8. Press arrow left
9. CTRL+V
10. CTRL+Z (notice X position being off
11. CTRL+V
12. CTRL+Z (4x) -> Crash

Actual Results:
Crash

Expected Results:
No crash, ideally. 


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 566bb271b8fe5882f24fef230e06c2af4ea12b33
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 threaded
Comment 1 Stéphane Guillou (stragu) 2024-01-25 22:24:55 UTC
In 7.0 and 24.2.0.2, empty paragraphs are not inserted in the footnote and the crash occurs earlier, it only needs 2× Ctrl + Z at step 12 to crash. I get signature BigPtrArray::Index2Block : https://crashreport.libreoffice.org/stats/crash_details/677ff056-038d-4137-8ab5-8566556368cd and https://crashreport.libreoffice.org/stats/crash_details/7becba52-a8be-4467-8924-f92e5ddea4ed
Adding signature in field for that reason.

Repro as described in recent master build:

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: d0dcd87788910e3c9f67a2b68534019c05b77bad
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

Possibly since bug 159025 or bug 159023 were fixed, but can't check currently without an update to linux-64-24.8 bibisect repo.
Comment 2 gladys 2024-07-03 20:16:11 UTC
bibisection windows  version 7.6 seem to point to

commit: 06b34d9f4b7967e87cd53e0effd98bfacfee2bb9
Date: 	Wed Mar 29 12:32:27 2023
author: Caolán McNamara <caolanm@redhat.com>
message: crashtesting: Null-deref on export of forum-mso-en4-274729.xls to ods
Comment 3 Buovjaga 2024-07-05 06:38:25 UTC
(In reply to gladys from comment #2)
> bibisection windows  version 7.6 seem to point to
> 
> commit: 06b34d9f4b7967e87cd53e0effd98bfacfee2bb9
> Date: 	Wed Mar 29 12:32:27 2023
> author: Caolán McNamara <caolanm@redhat.com>
> message: crashtesting: Null-deref on export of forum-mso-en4-274729.xls to
> ods

This result is not correct, because this is already seen in the oldest of 7.0.

I suppose the request here is to bibisect when we started needing 4 undos at step 12.
Comment 4 Buovjaga 2024-07-05 06:43:48 UTC
Created attachment 195113 [details]
Example file at step 3

For me, it crashes after 3 undos with latest master.
Comment 5 Stéphane Guillou (stragu) 2024-07-23 03:55:33 UTC
Bibisected with linux-64-24.8 repo to first bad build [e36d74f0757b01156606c65766a2b2bfcd836afd] which is:

commit fcd4222d36e1864452163e5c94976eea353bbaf0
author	Michael Stahl 	Mon Mar 04 15:45:07 2024 +0100
committer	Michael Stahl 	Wed Mar 06 10:45:57 2024 +0100
sw: SelectAll of section with RES_PAGEDESC corner-case
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164401

Michael, could you please have a look?
Comment 6 licorne_enragee@yahoo.fr 2024-07-23 14:52:31 UTC
Hi, I encounter a similar problem on my document since latest update.

The document recovery save is also crashing when this happens.

Here's the crash report: https://crashreport.libreoffice.org/stats/crash_details/c740b877-c18f-426c-bfd3-19be4ab74985