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 145492 - user can quit while saving compressed xcf
user can quit while saving compressed xcf
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: User Interface
git master
Other All
: Normal major
: 2.4
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2004-07-06 07:06 UTC by Philip L
Modified: 2005-10-29 01:43 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Philip L 2004-07-06 07:06:31 UTC
During the process of saving an uncompressed xcf, the GUI is make inaccessible,
so you cannot quit before a file is finished saving. When you save a compressed
xcf (xcf.bz2, xcf.gz), the GUI is only inaccessible while saving the temporary
uncompressed xcf. Afterwards the save dialog is closed and it looks like a bzip2
process is created to compress the file, during which you can access the GUI
again. It is quite likely that one may quit during the compression process, as I
did, because it appears that GIMP has completed saving. I was able to rescue the
uncompressed xcf from the .gimp/tmp/ directory, but I doubt that most users
would realize this.

The save dialog should not close and the user should not be given access to the
GUI again until the compression process has completed.

(For the sake of completeness: I did compile with --enable-mp, but I don't know
if that would have any bearing here.)
Comment 1 Philip L 2004-07-06 07:41:06 UTC
Correction - the save dialog does not close until the compression process is
finished. However, as I said, the main GUI is accessible while compressing. 
Comment 2 Sven Neumann 2004-07-06 08:20:11 UTC
This is a longstanding and well-known problem and I doubt that there's an easy fix.
Comment 3 weskaggs 2005-03-21 21:39:40 UTC
How about not marking the image as clean until the save proc has returned?  Of
course that wouldn't prevent the user from destroying the image, but it would at
least give plenty of warning.  (I don't know what happened in 2.2, but in 2.3,
compressor does not return until the compression proc has finished.)
Comment 4 Sven Neumann 2005-03-21 22:32:19 UTC
That might be worth trying.
Comment 5 weskaggs 2005-03-22 17:58:33 UTC
The situation is a little more subtle than I thought.  As far as I can tell,
images are *already* never marked clean until saving is completed.  So, the only
case where it is possible to exit before saving is finished, without getting a
dirty-image warning, is when the image being saved is already clean.  It's not
easy to see how to handle this case without getting into hairy issues.  
Comment 6 Michael Natterer 2005-10-29 01:43:50 UTC
Fixed in CVS:

2005-10-29  Michael Natterer  <mitch@gimp.org>

	 Fix bug #145492:

	* app/actions/file-commands.c (file_save_cmd_callback)
	* app/dialogs/file-save-dialog.c (file_save_dialog_save_image):
	set the "file-quit" action insensitive while the image is being
	saved to prevent data loss.

	* app/widgets/gimptoolbox.c (gimp_toolbox_delete_event): activate
	the "file-quit" action instead of calling gimp_exit() directly so
	trying to close the toolbox while saving is impossible too.