Bug 153059 - CRASH: Clicking on the header/footer button after scrolling
Summary: CRASH: Clicking on the header/footer button after scrolling
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.4.4.2 release
Hardware: All All
: highest critical
Assignee: Caolán McNamara
URL:
Whiteboard: target:7.6.0 target:7.5.0 target:7.4.5
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Writer-Header-Footer Crash
  Show dependency treegraph
 
Reported: 2023-01-17 09:24 UTC by Xisco Faulí
Modified: 2023-01-24 10:37 UTC (History)
3 users (show)

See Also:
Crash report or crash signature: ["SwHeaderFooterWin::LinkStubClickHdl(void%20*,weld::Button%20&)"]


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Xisco Faulí 2023-01-17 09:24:43 UTC
Steps to reproduce:
1. Open attachment 178682 [details]from bug 147802
2. In the first page, click on the header -> The header button is displayed
3. Scroll down to a different page
4. Click on the header button

-> Crash

Reproduced in

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: b9411e587586750f36ba9009b5f1e29fe461d8b5
CPU threads: 8; OS: Linux 5.10; UI render: default; VCL: gtk3
Locale: de-DE (es_ES.UTF-8); UI: en-US
Calc: threaded
Comment 1 Xisco Faulí 2023-01-17 09:26:47 UTC
Another way to reproduce it:
1. Open a new writer document
2. Insert a page break
3. Go to page 1 and click on the header
4. Go to page 2 and click on the header button
-> Crash
Comment 2 Xisco Faulí 2023-01-17 09:31:10 UTC
regression introduced by:

author	Caolán McNamara <caolanm@redhat.com>	2022-11-15 16:02:06 +0000
committer	Caolán McNamara <caolanm@redhat.com>	2022-11-15 20:34:51 +0100
commit 701e8d06484fb8781e43017ccf4ac1a3d64ac9e8 (patch)
tree 34001a0f4fdf15168ca8d8ccd08e9435d91b7c93
parent 2550835bde036a2809d693d9633b8b736c035ecb (diff)
Resolves: tdf#147802 don't create a header/footer control for every page

Bisected with: bibisect-linux64-7.5

Adding Cc: to Caolán McNamara
Comment 3 Xisco Faulí 2023-01-17 09:32:56 UTC
I found this crash after checking https://crashreport.libreoffice.org/stats/version/7.4.4.2 and finding https://crashreport.libreoffice.org/stats/signature/SwHeaderFooterWin::LinkStubClickHdl(void%20*,weld::Button%20&) is the most reported crash in that version.
Increasing importance
Comment 4 Caolán McNamara 2023-01-17 10:22:31 UTC
Cursor is still on page one so when a header is added it jumps back to that page, so the widget on the now hidden page is removed, but the click handler hasn't completed so the follow up action to change it from a "plus" button to a dropdown menubutton is on a disposed widget
Comment 5 Commit Notification 2023-01-17 20:36:08 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-7-4":

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

Resolves: tdf#153059 after ChangeHeaderOrFooter the control can be disposed

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 6 Commit Notification 2023-01-17 20:36:11 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-7-5":

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

Resolves: tdf#153059 after ChangeHeaderOrFooter the control can be disposed

It will be available in 7.5.1.

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 7 Commit Notification 2023-01-17 21:05:16 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

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

Resolves: tdf#153059 after ChangeHeaderOrFooter the control can be disposed

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 8 Commit Notification 2023-01-18 10:50:37 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-7-5-0":

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

Resolves: tdf#153059 after ChangeHeaderOrFooter the control can be disposed

It will be available in 7.5.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 9 Xisco Faulí 2023-01-19 08:59:26 UTC
Verified in

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 17c68fad2aef917adfdd3d4d651da786e620699c
CPU threads: 8; OS: Linux 5.10; UI render: default; VCL: gtk3
Locale: de-DE (es_ES.UTF-8); UI: en-US
Calc: threaded

@Caolán, thanks for fixing this issue!!
Comment 10 Xisco Faulí 2023-01-24 10:36:21 UTC
7.4.5 was a hotfix release, updating target in status-whiteboard