GNOME Bugzilla – Bug 681845
Cancel image export crashes or freezes gimp
Last modified: 2013-05-30 00:56:44 UTC
Created attachment 221142 [details] Error messages following crash Steps to reproduce : - Open a picture - File -> Export - rename the file (eg from tree.jpg -> tree2.jpg) - click export - click cancel - click cancel Gimp crashes or freezes Bug occurs if export is from jpg -> jpg and jpg -> png (I did not try other file formats) The new filename will be first in recently opened list.
Thanks for taking the time to report this bug. Without a stack trace from the crash it's very hard to determine what caused it. Can you get us a stack trace by starting GIMP under "gdb"? Please see http://live.gnome.org/GettingTraces (and the Details subpage) for more information on how to do so. Thanks in advance!
Created attachment 221246 [details] stack trace
I don't know if it is important to mention, my gimp 2.8 is installed from this ppa : http://ppa.launchpad.net/otto-kesselgulasch/gimp/ubuntu/ precise/main
The stacktrace misses any debugging symbols...
Created attachment 221472 [details] stack trace with debugging symbols
Created attachment 222721 [details] stack trace 2.8.2
I have seen this crash before, and it happend in GTK+. Does anyone remember the old bug?
Please paste the output of "gimp --version --verbose"
jonathan@Bill:~$ gimp --version --verbose GNU Image Manipulation Program version 2.8.2 git-describe: GIMP_2_8_0-194-ga42a02e using GEGL version 0.2.0 (compiled against version 0.2.0) using GLib version 2.32.3 (compiled against version 2.32.3) using GdkPixbuf version 2.26.1 (compiled against version 2.26.1) using GTK+ version 2.24.10 (compiled against version 2.24.10) using Pango version 1.30.0 (compiled against version 1.30.0) using Fontconfig version 2.8.0 (compiled against version 2.8.0) using Cairo version 1.10.2 (compiled against version 1.10.2)
I have the same version from the same source with the same version info and am unable to reproduce the bug. I am using a 64 bit system. I tested with a JPG that I opened and with a PDF from which I imported page 1. Attempted to reproduce by exporting each as both JPG and as PNG; canceled twice per instructions without incident, but do not understand the statement "The new filename will be first in recently opened list." My "Recently Used" pseudo-folder contains only other folders.
I don't know why you can not reproduce the bug. I am also running a 64 bit system. After Gimp crashes. When I reopen Gimp the first file under 'File -> Open Recent' is an inexistant file with the name of the file of which I cancelled the export.
Okay - I agree that 'File -> Open Recent' doesn't make sense. If the export doesn't complete the exported file name shouldn't appear in that list. I'm not sure that an Exported file name should _ever_ appear in that list, but that's not my call. Curiously, the filename doesn't appear in 'File -> Open Recent' unless you restart the GIMP. After hitting 'Cancel' twice I see only the file I opened; after restarting the app I see both. However, I still don't get a hang or a crash. If you rename your ~/.gimp-2.8 out of the way and restart GIMP does it still happen?
I just tried after renaming ~/.gimp-2.8, the crash still occurs (Is the instruction "rename the file (eg from tree.jpg -> tree2.jpg)" clear enough? It means give a new name to the file you want to export (in the Gimp Export image dialogue))
Here's what I'm doing, exactly: $ gdb gimp (gdb) run [...] File -> Open [Recently Used] -> "GRAB.jpg" (double-click) File -> Export Right Arrow, "999", <Enter> Cancel (Export Image as JPEG Dialog button) Cancel (Export Image Dialog button) (Move cursor to see coordinates change; click, drag-circle to paint with airbrush) File -> Export <End>, <Backspace>(x3), "png", <Enter> Cancel (Export Image as PNG Dialog button) Cancel (Export Image Dialog button) (Move cursor; paint) File -> Export <Home>, "zz" Click "Export" button, twice (once to clear name completion popup; once to click button) "Show Preview" checkbox clicked. "Advanced Options" Set Quality to 73. Cancel (Export Image as JPEG Dialog button) Cancel (Export Image Dialog button) Colors -> Invert. No problems here with this flow. The "File -> Open Recent" menu contains only the file I opened (GRAB.jpg). I did get a debug message from GIMP: (gimp:20806): Gimp-Display-CRITICAL **: gimp_display_shell_set_layer_style: assertion `GIMP_IS_LAYER (layer)' failed ... That came just at the end of the flow but I couldn't get it to happen again, so I restarted GIMP. File -> Open Recent now contains the aborted exports along with their 'broken' icons (if GIMP already knows the file can't be read, why bother displaying it?). I can reproduce the 'CRITICAL' warning by opening the file, going to "File -> Export", exporting as JPEG, turning on the preview and adjusting the Quality setting. In this case I get the warning twice. If I hit "Cancel" I get it a 3rd time but I can hit "Cancel" again and go back to the image and paint on it successfully. If I switch to Single-Window mode and repeat the Export procedure, things still appear to work fine.
Reproducing the same steps(in Single-Window mode) I get it crashing after this instruction Cancel "(Export Image Dialog button)"
If you don't mind digging deeper, I have two other suggestions. The first is to create a new user and see if the problem persists there. The second is to install the same OS and version of GIMP into a VirtualBox session and see if the problem exists there. Assuming that one of these two things works, it's then a matter of trying to figure out how the systems are different ... :-/
Wow! A new user works fine! I suppose I just need to migrate to a new user. Thank you
You should make a copy of your current GIMP user profile directory and keep it around for research. Then you can delete the original and have GIMP create a new one (but make sure that you got a copy, otherwise all user support staff on this planet will collectively hate you :) If this fixes the problem, then you can start to compare the two directories - i.e. the configuration files, the other contents (brushes, scripts, plug-ins, ...) and see if any of them causes the same problem if introduced to the new profile.
It's probably better to figure out where the crash is coming from, rather than just give up and use another account. When I run: $ strace -s 999 gimp | grep home | grep -v ENOENT | less ... and look at what GIMP is opening, I see: $HOME/.cache/gegl-0.2/swap $HOME/.local/share/gegl-0.2 $HOME/.gtkrc-2.0-kde4 $HOME/.kde//share/config/kdeglobals $HOME/.config/qtcurve/gtk-icons $HOME/.kde/share/config/gtkrc-2.0 $HOME/.gimp-2.8 $HOME/.local/share//mime/mime.cache $HOME/.fonts.conf $HOME/.fonts $HOME/.fontconfig $HOME/.local/share/recently-used.xbel $HOME/.gtk-bookmarks $HOME/.config/user-dirs.dirs $HOME/.config/gtk-2.0/gtkfilechooser.ini I left out access to X11 and PulseAudio files because that's plenty already. Basically, something in your home directory is causing the failure. We've already eliminated .gimp-2.8 when you renamed it; we just need to do the same thing with these other files/directories. Based on the weirdness in 'File -> Open Recent' I'd suspect it's that 'recently-used.xbel' file. Either rename that out of the way or copy it into the new profile, and then see if that fixes/introduces the problem. Once you've identified the troublesome file, uploading it here will let us troubleshoot further. I'm clearly using KDE with some KDE/GTK hybrid theme; your strace could differ considerably.
Created attachment 228067 [details] [review] Patch that might fix the problem Can you try the attached patch against gtk-2-24?
Comment on attachment 228067 [details] [review] Patch that might fix the problem This patch was incomplete and not even fixing the bug.
Fixed in gtk-2-24: commit 376fc4d712ab16b3770c79b55e00c1b8bc1efcfd Author: Michael Natterer <mitch@gimp.org> Date: Mon Nov 5 20:15:17 2012 +0100 gtk: clean up properly in GtkFileChooserEntry's dispose() to fix crashes Don't just unref the completion_store, call discard_completion_store() instead which also unsets it as the GtkEntryCompletion's model. Fixes bug 681845 and probably some others, because the situation in this bug is completely common. gtk/gtkfilechooserentry.c | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-)
I recently reinstalled my computer and did not think of saving all my home folder. I will not be able to find the faulty configuration file.
*** Bug 667012 has been marked as a duplicate of this bug. ***
*** Bug 665686 has been marked as a duplicate of this bug. ***