After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 755082 - Boxes takes way too long to shut down
Boxes takes way too long to shut down
Status: RESOLVED FIXED
Product: gnome-boxes
Classification: Applications
Component: general
3.16.x
Other Linux
: Normal normal
: --
Assigned To: GNOME Boxes maintainer(s)
GNOME Boxes maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2015-09-15 19:18 UTC by Michael Catanzaro
Modified: 2016-09-20 08:15 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Michael Catanzaro 2015-09-15 19:18:41 UTC
When I close Boxes (using the close button in the header bar, or Quit from the app menu), the Boxes window often hangs for 20-30 seconds before it disappears. The window should instead disappear immediately, and whatever shutdown work is required should occur in the background.
Comment 1 Zeeshan Ali 2015-10-12 15:28:04 UTC
At first look, this seems like a gtk+ issue:

https://git.gnome.org/browse/gnome-boxes/tree/src/app.vala#n267

As you can see in that code, we first hide all top-level windows and then call quit *in idle* that calls shutdown, where we suspend all machines.
Comment 2 Zeeshan Ali 2015-10-12 16:18:33 UTC
Ok, I think I know what's going on. The gtk_window_hide() does not work sync and shutdown() seems to be called immediately after quit_app() returns, without getting into main loop. As part of shutdown, suspend_machines() is called and that uses a private GMainContext so we never get back to main_loop until that function returns. I'll see how I can fix this..
Comment 3 Zeeshan Ali 2015-10-12 16:34:10 UTC
commit: 9e68eb05414c782910b70f36b780edcb2a371273

    app: Ensure windows hidden before suspending machines