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 652280 - Crashes if being quit while drag'n'dropped files are still being opened.
Crashes if being quit while drag'n'dropped files are still being opened.
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: General
2.6.11
Other All
: Normal normal
: 2.6
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2011-06-10 12:20 UTC by Nils Philippsen
Modified: 2015-11-29 13:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Backtrace from downstream Fedora bug (33.71 KB, text/plain)
2011-06-10 12:20 UTC, Nils Philippsen
Details

Description Nils Philippsen 2011-06-10 12:20:39 UTC
Created attachment 189615 [details]
Backtrace from downstream Fedora bug

This bug was originally opened at Fedora: https://bugzilla.redhat.com/show_bug.cgi?id=711952

What it boils down to is that if you drag and drop files to GIMP and then, while they are still loading, e.g. press Ctrl+Q to quit GIMP, it crashes in gimp_display_shell_drop_uri_list() because it tries to dereference shell->display->image when shell->display is already NULL because the shell is in the process of being torn down.
Comment 1 Nils Philippsen 2011-06-10 12:21:50 UTC
Could reproduce this in git master as well.
Comment 2 Nils Philippsen 2011-06-10 12:26:20 UTC
Well, not quite the same... in git master it crashes here:

--- 8< --- app/display/gimpdisplayshell-dnd.c:557 ---
          gimp_message (shell->display->gimp, G_OBJECT (shell->display),
                        GIMP_MESSAGE_ERROR,
                        _("Opening '%s' failed:\n\n%s"),
                        filename, error->message);
--- >8 ----------------------------------------------

Same root cause (shell->display being NULL), though.
Comment 3 Nils Philippsen 2011-06-10 19:32:22 UTC
Fixed in git master:

commit b1a2c736bf7e6c75ca1af4b4c3330172dddb269e
Author: Nils Philippsen <nils@redhat.com>
Date:   Fri Jun 10 18:06:02 2011 +0200

    app: guard against crash due to quitting while DND is processed
    
    In gimp_display_shell_drop_uri_list(), shell->display is dereferenced in
    some places without checking that it's still there. It can be set to
    NULL if the user quits the application while a drag and drop action is
    being processed and the main loop is iterated during execution of this
    function. (Bug #652280)

And in gimp-2-6:

commit eae4804e56dca692014d11dc1e0bf5053936e986
Author: Nils Philippsen <nils@redhat.com>
Date:   Fri Jun 10 18:06:02 2011 +0200

    app: guard against crash due to quitting while DND is processed
    
    In gimp_display_shell_drop_uri_list(), shell->display is dereferenced in
    some places without checking that it's still there. It can be set to
    NULL if the user quits the application while a drag and drop action is
    being processed and the main loop is iterated during execution of this
    function. (Bug #652280)
    (cherry picked from commit b1a2c736bf7e6c75ca1af4b4c3330172dddb269e)
    
    Conflicts:
    
        app/display/gimpdisplayshell-dnd.c