Steps to reproduce the crash - launch Writer - Menu "Insert" -> Header and Footer -> Header -> Default Style * enter "something" in the header * use the undo dropdown to undo everything, including "Header/footer changed" (in one step) - Redo => crash Notes: header or footer is irrelevant. The method of creating the header/footer is irrelevant (I used the in-header-area + button in testing). The ability to undo/redo the "Header/footer change" started in bibisect-linux-64-7.2 commit 910d9a081daf11ea53235d227c3dc9623942a824 commit 8d8486f43c1a8a51157bfc3e0b87090b05a9229e Author: Daniel Arato (NISZ) on Mon Feb 22 16:59:38 2021 +0100 tdf#46561 sw: fix lost undo stack setting header/footer At first, (at least for these particular steps) undo/redo worked. Then for a short time the undo cleared the redo list, until the crash started with bibisect-linux-64-7.2 commit 68d3f7ef5385a8c5717131fcd0f98e3fca9da825 commit 0cd000bb83719982c1fd2265ea040c82af5bf98e Author: Daniel Arato (NISZ) on Mon Apr 26 15:04:17 2021 +0200 tdf#141613 sw: avoid possible crash when undoing header creation We still need to call ClearRedo() because there is no mechanism in place to Redo a header/footer change.
I can confirm this bug. Problem is that the crash report indicated to be at https://crashreport.libreoffice.org/stats/crash_details/8a4c3af4-eaf7-43e3-840f-86e475f355b8 is not available! I am using this environment: - Version: 24.2.4.2 (X86_64) / LibreOffice Community Build ID: 51a6219feb6075d9a4c46691dcfe0cd9c4fff3c2 CPU threads: 16; OS: Windows 10.0 Build 22631; UI render: Skia/Raster; VCL: win Locale: en-CA (en_CA); UI: en-GB Calc: CL threaded
it's only happening when using the undo/redo buttons
On pc Debian x86-64 with master sources updated today, I don't reproduce this.
(In reply to Xisco Faulí from comment #2) > it's only happening when using the undo/redo buttons Perhaps - but only because that is the easiest way to undo multiple actions in one step. The "redo" step can be achieved via Ctrl+Y or the menu and still cause the crash. The key in reproducing is to undo both "typing: something" and "Header/footer change" in one step.
Created attachment 195034 [details] bt On pc Debian x86-64 with master sources updated today, I could reproduce this. I hadn't undone both actions in the same time. I also noticed this log on console when undoing both actions: warn:svl:529888:529888:svl/source/undo/undo.cxx:1084: SfxUndoManager::MarkTopUndoAction(): suspicious call!
I noticed that if I undo the last action only (the "something" type), I can redo this. But if I undo the last action, then the initial action (the header), I can't redo this.
See also https://bugs.documentfoundation.org/show_bug.cgi?id=152762
Justin Luth committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/0a9da9e43c53406c867fe95cdd5c7192ce08bcb6 tdf#161741 tdf#161705 undo: delay ClearRedo until Undo finishes It will be available in 25.2.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.
Justin Luth committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/86a5c48cdce4b8392ade2858d7835b48af8afc00 tdf#161741: LO crashed on redo of header changes: unit test It will be available in 25.2.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 8's patch should not be backported (unless an expert wants to take ownership of it). Changes to undo/redo code are fraught with unintended disaster.
Justin Luth committed a patch related to this issue. It has been pushed to "libreoffice-24-8": https://git.libreoffice.org/core/commit/ee0d856d921afc826ea8a48b82d489be7b45bc3d tdf#161741 tdf#161705 pgnum wizard: avoid undo crash (sledgehammer) It will be available in 24.8.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.
NOTE: The backport commits only handle the specific use of the page number wizard.
Justin Luth committed a patch related to this issue. It has been pushed to "libreoffice-24-2": https://git.libreoffice.org/core/commit/a438775c10f7098b0dd7ff3deaab10f1969fa566 tdf#161741 tdf#161705 pgnum wizard: avoid undo crash (sledgehammer) It will be available in 24.2.7. 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.
Justin Luth committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/09df48f87f04b0176593cb5f649ac3cd2244891e tdf#161741 undo nits: NeedsClearRedo is private + prioritize TopLevel It will be available in 25.2.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.