Open Bug 1596307 Opened 5 years ago Updated 2 days ago

Problems with closing GTK print dialog

Categories

(Core :: Widget: Gtk, defect, P2)

Unspecified
Linux
defect

Tracking

()

People

(Reporter: karlt, Unassigned, NeedInfo)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Scenario A:

  1. Open two Firefox windows.
  2. From window 1, open a print dialog (Ctrl+P).
  3. From window 2, open another print dialog.
  4. 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:

  1. Open two Firefox windows.
  2. From window 1, open a print dialog (Ctrl+P).
  3. 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

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.

Blocks: 1599952
No longer blocks: 1565956
Severity: normal → S3

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.

Flags: needinfo?(karlt)

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/

Flags: needinfo?(karlt)

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.

Flags: needinfo?(karlt)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: