Bug 145464 - Crash when opening Digital signatures dialog from infobar (GTK3)
Summary: Crash when opening Digital signatures dialog from infobar (GTK3)
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.1.0.3 release
Hardware: All All
: medium normal
Assignee: Caolán McNamara
URL:
Whiteboard: target:7.3.0 target:7.2.3
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2021-10-31 13:05 UTC by Gabor Kelemen (allotropia)
Modified: 2021-11-02 09:07 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:
Regression By:


Attachments
Example file signed with current master and several certs (27.95 KB, application/vnd.oasis.opendocument.text)
2021-10-31 13:05 UTC, Gabor Kelemen (allotropia)
Details
Backtrace of the crash on a recent master (26.28 KB, text/x-log)
2021-10-31 13:10 UTC, Gabor Kelemen (allotropia)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gabor Kelemen (allotropia) 2021-10-31 13:05:18 UTC
Created attachment 176039 [details]
Example file signed with current master and several certs

Writer crashes when two files with digital signatures is opened and the Show Signatures button is pressed on the infobar of the first opened file.

1. Open attachment 175991 [details] from bug 135604. The digital signatures infobar appears.
2. Open the attached file. The digital signatures infobar appears in this dialog as well.
3. Go back to the window of the first file and press the Show Signatures button on its infobar.
4, Crash, but only on GTK3 backend and not with gen/qt5/win.

Bibisected with linux-64-7.1 to:

https://git.libreoffice.org/core/+/af90b8089405d6f042207f5639e750f08798ae92

author	Caolán McNamara <caolanm@redhat.com>	Tue Sep 08 09:30:35 2020 +0100
committer	Caolán McNamara <caolanm@redhat.com>	Mon Sep 21 20:10:06 2020 +0200

weld infobars

Adding CC to: Caolán McNamara
Comment 1 Gabor Kelemen (allotropia) 2021-10-31 13:10:31 UTC
Created attachment 176040 [details]
Backtrace of the crash on a recent master
Comment 2 Caolán McNamara 2021-10-31 21:03:41 UTC
I think this is a focus thing.

For me to reproduce reliably, load the first document, press alt to active visible focus. Click the "show signatures" and then "close". The focus is visible in the "show signatures" button. Now load the other document. Then switch back to the first document and the "show signatures" button has visible focus. Click it and crash with null dispatcher.

I think the dispatcher is assigned when focus is given to the frame, but because focus is restored to the button the frame doesn't know it was given focus so the dispatcher remains null and then we get that crash
Comment 3 Caolán McNamara 2021-10-31 21:09:40 UTC
https://gerrit.libreoffice.org/c/core/+/124534 makes this case work for me
Comment 4 Commit Notification 2021-11-01 08:52:11 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/1e3cc6d8dfe95f9f4c37f583c3de582464159698

Resolves: tdf#145464 ensure the SfxViewFrame is activated

It will be available in 7.3.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 5 Commit Notification 2021-11-01 08:53:22 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

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

Related: tdf#145464 pass an explicit DocFrame for SID_SIGNATURE

It will be available in 7.3.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 Caolán McNamara 2021-11-01 08:53:57 UTC
done in trunk, backport to 7-2 in gerrit
Comment 7 Gabor Kelemen (allotropia) 2021-11-01 19:21:16 UTC
Verified in:

Version: 7.3.0.0.alpha1+ / LibreOffice Community
Build ID: 9948e9e736d005f1a5a5ad4955e55aefddc8ef54
CPU threads: 8; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: hu-HU (hu_HU.UTF-8); UI: en-US
Calc: threaded

No crash anymore, thanks for fixing this!
Comment 8 Commit Notification 2021-11-02 09:07:10 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-7-2":

https://git.libreoffice.org/core/commit/52af60e522517dec770fdcf484508db0f7f077df

Resolves: tdf#145464 ensure the SfxViewFrame is activated

It will be available in 7.2.3.

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.