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 629941 - GIMP doesn't exit properly when quitting while loading images
GIMP doesn't exit properly when quitting while loading images
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: General
2.6.10
Other All
: Normal normal
: 2.8
Assigned To: GIMP Bugs
GIMP Bugs
: 703578 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2010-09-17 17:18 UTC by Andrei I
Modified: 2013-07-04 19:44 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Andrei I 2010-09-17 17:18:48 UTC
Description of problem:
Gimp doesn't quit if ufraw-gimp is opened by it.


Version-Release number of selected component (if applicable):
gimp.x86_64 (2:2.6.10-1.fc13)
ufraw-gimp.x86_64 (0.16-2.fc13)


How reproducible:
always


Steps to Reproduce:
1. Open a NEF (nikon raw) image with GIMP. It will open GIMP and ufraw-gimp
plugin.
2. Quit GIMP from the UI, without closing ufraw-gimp.


Actual results:
GIMP disappears from the screen but... if you ever need to open the GIMP once again you'll have a surprise, because:

   [andrei@Q9650:~]$ gimp --verbose
   Another GIMP instance is already running.

as a consequence of:

   [andrei@Q9650:~]$ ps -ef | grep gimp
   andrei    4484  1700  4 02:54 ?        00:00:01 /usr/bin/gimp-2.6 /parcizvor.nef


Expected results:
When choosing from the UI to quit GIMP, it has to trully quit (not just the
UI)... even if it has a plugin like ufraw-gimp opened for working.

Additional info:
Works as expected if you manually close the ufraw first.
Comment 1 Andrei I 2010-11-17 09:57:51 UTC
Hello ! Anybody home ? :)
Comment 2 Nils Philippsen 2010-11-17 10:49:47 UTC
This is the same bug on Fedora: https://bugzilla.redhat.com/show_bug.cgi?id=633107

I can confirm the issue that the GIMP windows close, but the process stays
running. With a different type of raw image file, also opened by ufraw, then
closing GIMP (2.6.11), I get these error messages:

(gimp:20302): GLib-GObject-WARNING **: invalid uninstantiatable type
`-g-type-private--IFaceHolder' in cast to `GObject'

(gimp:20302): Gimp-Core-CRITICAL **: gimp_message_valist: assertion `handler ==
NULL || G_IS_OBJECT (handler)' failed

The xsane plugin (another external one) doesn't have this problem.

I could see the problem on the master branch as well (slightly different error messages, though).
Comment 3 Nils Philippsen 2010-11-17 16:53:38 UTC
I could see the same issue when pressing "Ctrl+Q" to quit GIMP while it was loading another image format (JPEG):

GIMP-Error: Execution error for procedure 'file-jpeg-load':
Procedure 'file-jpeg-load' returned no return values


(gimp:10595): GLib-GObject-WARNING **: invalid uninstantiatable type `(null)' in cast to `GObject'

(gimp:10595): Gimp-Core-CRITICAL **: gimp_message_valist: assertion `handler == NULL || G_IS_OBJECT (handler)' failed
Comment 4 Nils Philippsen 2011-06-01 09:17:50 UTC
I still see this issue on the current master branch.
Comment 5 Nils Philippsen 2011-06-01 09:21:59 UTC
One additional observation I made is that GIMP only fails to exit if the image file is supplied on the command line, i.e. the image is loaded immediately after (or while) GIMP is being loaded/initialized/whatever. If the image is loaded afterwards (File/Open), it manages to exit with different, seemingly less critical warnings:

nils@gibraltar:~> LD_LIBRARY_PATH=/home/nils/gimp-2.7/lib ~/gimp-2.7/bin/gimp-2.7 
This is a development version of GIMP.  Debug messages may appear here.

jpeg-load: found EXIF block (53672 bytes)
While parsing XMP metadata:
Error: No XMP packet found
plug-in 'file-jpeg' aborted before sending its procedure return values
plug-in 'ufraw-gimp' aborted before sending its procedure return values
GIMP-Error: Calling error for procedure 'file-jpeg-load':
Procedure 'file-jpeg-load' returned no return values

GIMP-Error: Opening '/home/nils/Pictures/2010-09-14-RH-Handies-Wilhelma/orig/DSC03781.JPG' failed:

Procedure 'file-ufraw-load' returned no return values


(gimp-2.7:22342): Gimp-Base-WARNING **: 2 tile managers leaked
unref tile manager 0x4230440 (4272 x 2848)
unref tile manager 0x4259e00 (4272 x 2848)
nils@gibraltar:~>
Comment 6 Nils Philippsen 2012-11-13 11:08:26 UTC
Reconfirmed with 2.8.2 and git master.
Comment 7 Michael Natterer 2013-07-04 18:59:18 UTC
*** Bug 703578 has been marked as a duplicate of this bug. ***
Comment 8 Michael Natterer 2013-07-04 19:44:06 UTC
Fixed in master and gimp-2-8:

commit 4e664a011d5b5142c65dd813ee3cb4a324e97ac6
Author: Massimo Valentini <mvalentini@src.gnome.org>
Date:   Thu Jul 4 21:36:40 2013 +0200

    Bug 629941 - GIMP doesn't exit properly when quitting while loading images
    
    GIMP's "exit" signal was emitted before the handler was connected.
    
    Don't start loading command line images or batch processing before
    app_exit_after_callback() is connected. Make sure we don't use
    dangling main loop pointers or try to stop a non-running main loop.
    
    (cherry picked from commit 09682d62ae675125e91d537c3ccbdd4571a0b28e)

 app/app.c | 53 ++++++++++++++++++++++++++++++++---------------------
 1 file changed, 32 insertions(+), 21 deletions(-)

commit dea99e516b6c796e423da579ea387997a13d4e13
Author: Massimo Valentini <mvalentini@src.gnome.org>
Date:   Thu Jul 4 21:05:25 2013 +0200

    app: file_open_from_command_line(): don't access a dangling display pointer
    
    Happens if GIMP is quit while the image is being loaded.
    
    (cherry picked from commit 6c62eb2238d2167ebe20ee02ad32ef733db475b1)

 app/file/file-open.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)