Bug 146248 - Crash at undo header swlo!sw::XTextRangeToSwPaM+0x5f9:
Summary: Crash at undo header swlo!sw::XTextRangeToSwPaM+0x5f9:
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.2.0.0.alpha0+
Hardware: All All
: high major
Assignee: Not Assigned
URL:
Whiteboard: target:7.6.0 target:7.5.0.2 target:7.4.6
Keywords: bibisected, bisected, haveBacktrace, regression
Depends on:
Blocks:
 
Reported: 2021-12-15 20:52 UTC by Telesto
Modified: 2023-01-27 14:07 UTC (History)
6 users (show)

See Also:
Crash report or crash signature: ["sw::lcl_IsStartNodeInFormat"]


Attachments
DOCX File exported with 7.4 (627.73 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2021-12-15 20:53 UTC, Telesto
Details
BT without symbols (15.50 KB, text/plain)
2021-12-15 20:53 UTC, Telesto
Details
bt with debug symbols (13.97 KB, text/plain)
2021-12-16 17:20 UTC, Julien Nabet
Details
gdb bt (25.35 KB, text/plain)
2022-11-15 19:12 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2021-12-15 20:52:43 UTC
Description:
Crash at undo header

Steps to Reproduce:
1. Open attachment 163692 [details]
2. Save as DOCX
3. File Reload
4. Delete header of page 1
5. CTRL+Z -> Crash

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: 7e5af164b7d293dd410710bed411e1ca64bbecf7
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
Comment 1 Telesto 2021-12-15 20:53:04 UTC
Created attachment 176954 [details]
DOCX File exported with 7.4
Comment 2 Telesto 2021-12-15 20:53:45 UTC
Created attachment 176955 [details]
BT without symbols
Comment 3 Telesto 2021-12-15 20:56:56 UTC
Undo not allowed in 7.1
Comment 4 Xisco Faulí 2021-12-16 09:20:06 UTC
No need to do steps 1 to 3, just by deleting the header and undoing it crashes

Version: 7.4.0.0.alpha0+ / LibreOffice Community
Build ID: b8b72fdbbba57c017fcc3bce09fe8da31826aa2a
CPU threads: 4; OS: Linux 5.10; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 5 Xisco Faulí 2021-12-16 09:28:57 UTC
Regression introduced by:

https://git.libreoffice.org/core/+/65e52cb61d74b0c71b45b63b2da131bc6b621104%5E!

commit 65e52cb61d74b0c71b45b63b2da131bc6b621104	[log]
author	Daniel Arato (NISZ) <arato.daniel@nisz.hu>	Mon Apr 26 15:04:17 2021 +0200
committer	László Németh <nemeth@numbertext.org>	Tue May 04 15:38:21 2021 +0200
tree 5bed16832369fe3d4c41c865a24db09b95bf2409
parent 7f0b5f8eb234d2e1cc40055b275799df503ea736 [diff]

tdf#141613 sw: fix crash at header/footer undo

Bisected with: bibisect-linux64-7.2

Adding Cc: to Daniel Arato
Comment 6 Julien Nabet 2021-12-16 17:20:29 UTC
Created attachment 176972 [details]
bt with debug symbols

On pc Debian x86-64 with master sources updated today, I could reproduce this.

I noticed this on console:
warn:legacy.osl:7839:7839:sw/source/core/unocore/unoobj2.cxx:1334: no parent text?
Comment 7 Roman Kuznetsov 2022-11-15 18:49:22 UTC
No crash in

Version: 7.5.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: ddb8a1a282aae74c1cee3a5e1f446abd0c00b116
CPU threads: 4; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win
Locale: ru-RU (ru_RU); UI: en-US
Calc: threaded

Closed as WFM, but

If someone could retest this himself it would be nice
Comment 8 Julien Nabet 2022-11-15 19:12:03 UTC
Created attachment 183612 [details]
gdb bt

On pc Debian x86-64 with master sources updated today + brand new LO profile, I could reproduce this.

I attached bt and all the console logs at the end of the file if it can help.
Comment 9 Julien Nabet 2022-11-15 19:17:43 UTC
BTW, the bt was retrieved with gtk3 rendering but I got a crash too with gen rendering so not gtk only.
Comment 10 László Németh 2023-01-09 20:24:29 UTC
Proposed fix: https://gerrit.libreoffice.org/c/core/+/145244
Comment 11 Commit Notification 2023-01-10 20:21:46 UTC
László Németh committed a patch related to this issue.
It has been pushed to "master":

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

tdf#146248 sw: fix crash at Undo of hiding page header/footer

It will be available in 7.6.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 12 László Németh 2023-01-10 22:16:49 UTC
@Telesto: many thanks for the bug report (and the newest one)!

@All: thanks for handling the issue!
Comment 13 BogdanB 2023-01-11 14:55:48 UTC
Crashing in 
Version: 7.5.0.1 (X86_64) / LibreOffice Community
Build ID: 77cd3d7ad4445740a0c6cf977992dafd8ebad8df
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: ro-RO (ro_RO); UI: en-US
Calc: threaded

NOT in 
Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: c68d06dfa1498f862923eaddf3e5d247650a53d5
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: ro-RO (ro_RO); UI: en-US
Calc: threaded
Comment 14 Commit Notification 2023-01-11 16:08:39 UTC
László Németh committed a patch related to this issue.
It has been pushed to "libreoffice-7-5":

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

tdf#146248 sw: fix crash at Undo of hiding page header/footer

It will be available in 7.5.0.2.

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 15 Commit Notification 2023-01-26 13:20:03 UTC
László Németh committed a patch related to this issue.
It has been pushed to "libreoffice-7-4":

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

tdf#146248 sw: fix crash at Undo of hiding page header/footer

It will be available in 7.4.5.

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 16 Commit Notification 2023-01-26 15:40:19 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

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

tdf#146248: sw: move UItest to CppUnittest

It will be available in 7.6.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 17 Xisco Faulí 2023-01-27 14:07:41 UTC
7.4.5 was a hotfix release, updating target in status-whiteboard