Bug 164033 - Crash in: SwNodeIndex::SwNodeIndex(SwNode *)
Summary: Crash in: SwNodeIndex::SwNodeIndex(SwNode *)
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
24.2.3.2 release
Hardware: All All
: highest critical
Assignee: Not Assigned
URL:
Whiteboard: target:25.8.0 target:25.2.4
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Crash
  Show dependency treegraph
 
Reported: 2024-11-24 21:52 UTC by loic_dupont
Modified: 2025-05-02 18:18 UTC (History)
4 users (show)

See Also:
Crash report or crash signature: ["SwNodeIndex::SwNodeIndex(SwNode *)"]


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description loic_dupont 2024-11-24 21:52:34 UTC
This bug was filed from the crash reporting server and is br-cfa26367-4d24-4c4f-b8d5-f6583a8eb4df.
=========================================

I used the build in "add a page number + total page number on the left" module in the menu. Then tried it again, but centered. Then, I had BOTH, so I reverted with CTRL+Z more than once in a fast pace. ...It didn't like it. 

I will begin by updating to last version, but I give you the crash report if it can help.

Version :
Version: 24.2.3.2 (X86_64) / LibreOffice Community
Build ID: 433d9c2ded56988e8a90e6b2e771ee4e6a5ab2ba
CPU threads: 24; OS: Windows 10.0 Build 22631; UI render: Skia/Vulkan; VCL: win
Locale: fr-FR (fr_FR); UI: fr-FR
Calc: CL threaded
Comment 1 m_a_riosv 2024-11-26 04:18:43 UTC
Please test in safe mode, Menu/Help/Restart in Safe Mode
Comment 2 Xisco Faulí 2025-04-24 08:46:10 UTC
Steps to reproduce it:
1. Open Writer
2. Insert - Page Number
3. Select "Include page total"
4. Click Ok
5. Undo

-> Crash
Comment 3 Xisco Faulí 2025-04-24 09:26:28 UTC
Regression introduced by:

commit 98f766004e29ea35eef6fcf3a4c28696b95f6c90	[log]
author	Justin Luth <justin.luth@collabora.com>	Mon May 01 10:57:25 2023 -0400
committer	Justin Luth <jluth@mail.com>	Wed May 03 03:09:34 2023 +0200
tree f107fce893b9dc2095da9a7322249fd6b7c8d583
parent 98726695af0e3a673618d16b981818155d43bc0c [diff]

tdf#86630 sw page number wizard: try avoid copying bookmarks

Bisected with: linux-64-7.6
Comment 4 Justin L 2025-05-01 23:52:52 UTC
This is fixed in 24.2.7 and 24.8.2 by patches for very similar sounding bug 161705.  I forgot that I didn't apply "tdf#161741 tdf#161705 pgnum wizard: avoid undo crash (sledgehammer)" to master. It would "solve" this crash report.

Clearly SwPageDesc is very buggy relating to undo/redo, especially when combined with bookmarks. Probably we just need to apply the sledgehammer to master after all...
Comment 5 Commit Notification 2025-05-02 13:09:10 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

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

tdf#164033 tdf#161741 tdf#161705 pgnum wizard: avoid undo crash (sledgehammer)

It will be available in 25.8.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 6 Xisco Faulí 2025-05-02 13:33:23 UTC
I think this can be closed now.
@Justin, thanks for your comment in comment 4
Comment 7 Commit Notification 2025-05-02 18:18:55 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "libreoffice-25-2":

https://git.libreoffice.org/core/commit/260a77ad9b04dd53712ebc061dffa4c1b77a88b1

tdf#164033 tdf#161741 tdf#161705 pgnum wizard: avoid undo crash (sledgehammer)

It will be available in 25.2.4.

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.