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 771816 - GParted never exits if the main window is closed before the initial device load completes
GParted never exits if the main window is closed before the initial device lo...
Status: RESOLVED FIXED
Product: gparted
Classification: Other
Component: application
GIT HEAD
Other Linux
: Normal normal
: ---
Assigned To: Mike Fleetwood
gparted maintainers alias
Depends on:
Blocks:
 
 
Reported: 2016-09-22 08:49 UTC by Mike Fleetwood
Modified: 2016-10-19 16:23 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Make gpartedbin exit when closed before the initial load completes (v1) (3.49 KB, patch)
2016-09-22 09:29 UTC, Mike Fleetwood
none Details | Review
Make GParted exit when closed before the initial load completes (v2) (3.53 KB, patch)
2016-09-23 10:55 UTC, Mike Fleetwood
none Details | Review
Fix slighly messed up comment (1.35 KB, patch)
2016-10-10 19:35 UTC, Mike Fleetwood
none Details | Review

Description Mike Fleetwood 2016-09-22 08:49:33 UTC
If the GParted main window is closed before the initial device load
completed gpartedbin never exits.  The main window closes but the
process sits there idle forever.  Subsequently running gparted reports
this error:
    # gparted
    The process gpartedbin is already running.
    Only one gpartedbin process is permitted.

If the user is running GParted from a desktop menu they will never see
this error so they will never know why GParted won't start any more.
Comment 1 Mike Fleetwood 2016-09-22 09:29:13 UTC
Created attachment 336065 [details] [review]
Make gpartedbin exit when closed before the initial load completes (v1)

Hi Curtis,

I've been wondering how to fix this for several years now.  Finally
found the solution.

We should probably also kill any running set_devices_thread so GParted
can exit immediately when the main window is closed.  However I'll leave
that for another time.

Thanks,
Mike
Comment 2 Mike Fleetwood 2016-09-23 10:55:16 UTC
Created attachment 336154 [details] [review]
Make GParted exit when closed before the initial load completes (v2)

Hi Curtis,

Here's patch v2.  Only trivial changes:
1) Minor code comment update.
2) Remove underscore from the start of function name
   _initial_device_refresh().  Using underscore was a pattern used in
   PipeCapture.h, but when there were two functions with the same name.
   Not the case this time.

Thanks,
Mike
Comment 3 Curtis Gedak 2016-10-05 19:00:28 UTC
Hi Mike,

Good investigative work on this gpartedbin non-exiting issue.

My testing with patch v2 from comment #2 has gone well.  I
successfully tested on kubuntu 16.04 and found no regressions on the
following distros:

debian    7
fedora   23
openSUSE 42.1
ubuntu   14.04

Patch v2 has been committed to the git repository for inclusion in the
next release of GParted.

The relevant git commit can be viewed at the following link:

Make GParted exit when closed before the initial load completes (#771816)
https://git.gnome.org/browse/gparted/commit/?id=7ea22f1190eb22fb50ca6829be1d6b30ace2fb46


Curtis
Comment 4 Mike Fleetwood 2016-10-10 19:35:46 UTC
Created attachment 337348 [details] [review]
Fix slighly messed up comment

Hi Curtis,

Here's a fix for the slightly messed up comment I made in the patch v2
above :-(.

Thanks,
Mike
Comment 5 Curtis Gedak 2016-10-10 20:10:48 UTC
Update comment patch from comment #4 applied to the git master.  :-)

The relevant git commit can be viewed at the following link:

Fix slightly messed up comment in Win_GParted::on_show() (#771816)
https://git.gnome.org/browse/gparted/commit/?id=6bacd6ae4d210f3c5eb11f473ec163d20f0e8cdb
Comment 6 Curtis Gedak 2016-10-19 16:23:45 UTC
This enhancement was included in the GParted 0.27.0 release on October 19, 2016.