Problems with closing GTK print dialog
Categories
(Core :: Widget: Gtk, defect, P2)
Tracking
()
People
(Reporter: karlt, Unassigned, NeedInfo)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
Scenario A:
- Open two Firefox windows.
- From window 1, open a print dialog (Ctrl+P).
- From window 2, open another print dialog.
- Click "Cancel" in the dialog from step 2.
Expected: Dialog closes.
Actual: Dialog does not close until "Cancel" is also clicked on the second dialog.
Scenario B:
- Open two Firefox windows.
- From window 1, open a print dialog (Ctrl+P).
- From window 2, quit the application (Ctrl+Q).
Expected: Application quits.
Actual: Print dialog remains open.
Scenario B is what sometimes happens when the web-platform test /printing/print-microtask-after-navigate.html times out and nsAppStartup::Quit() is called during gtk_dialog_run() from nsPrintingPromptService::ShowPrintDialog(). "Hit MOZ_CRASH(Shutdown hanging before starting.)" is reported before the first failure of e.g. https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=275885234&repo=try&lineNumber=41908
Reporter | ||
Comment 1•5 years ago
|
||
The close on response closes the dialog even with another nested event loop
prevents nsIPrintDialogService::Show() from returning.
The changes here are similar to those made for nsFilePicker when pretending to
run the dialog synchronously.
https://hg.mozilla.org/mozilla-central/rev/d066131af975
This reorganization of code should be more suitable for a future asynchronous
behavior.
Reporter | ||
Comment 2•5 years ago
|
||
Updated•2 years ago
|
Comment 3•2 years ago
|
||
Hi :karlt, I was cleaning a bit the dependencies of bug 1358898 and I was wondering, if we still want this and if it is still a real dependency (Scenario B I assume). Note that we did some work on other modal dialogs to be canceled on shutdown (bug 1669836, bug 1669836, bug 1696397) to avoid them blocking the shutdown process.
Reporter | ||
Comment 4•2 years ago
|
||
Both Scenario A and Scenario B still reproduce, so we still want this.
I assume Scenario B is still a real dependency but print-microtask-after-navigate.html was removed in https://github.com/web-platform-tests/wpt/pull/23453/
Comment 5•2 days ago
|
||
The following patch is waiting for review from an inactive reviewer:
ID | Title | Author | Reviewer Status |
---|---|---|---|
D52942 | Bug 1596307 close print dialog on parent window close and on response r?jwatt | karlt | jwatt: Disabled |
:karlt, could you please find another reviewer or abandon the patch if it is no longer relevant?
For more information, please visit BugBot documentation.
Description
•