GNOME Bugzilla – Bug 703806
GIMP crashes when scaling an image
Last modified: 2013-07-09 17:58:09 UTC
Created attachment 248629 [details] The image that makes When I scale the attached image at twice its current size, GIMP crashes. The stack shown in GDB is the following:
+ Trace 232209
Thanks for taking time to report this. Unfortunately we are not able to reproduce it. The first thing to do is to update your GIMP installation to 2.8.6 and report back if it still happens. It seems that GIMP crashes while making a preview, but we don't know what preview. So : - Did you set some user preferences related to preview ? You may provide your gimprc (usually ~/.gimp-2.8/gimprc) - What preview are available while you are doing the scale operation ? Channel dialog, layers dialog, undo list, ... Can you close them one by one and retry to see if one preview in particular is wrong ? Thanks !
I have now updated to GIMP 2.8.6 using Ubuntu's ppa:otto-kesselgulasch/gimp. The application still crashes in the same conditions. I do not remember to have set any preference related to preview. See my attached gimprc file to check. The application does not crach if the layers list is not visible (either closed or below another selected tab in the stack). So I have removed the layers until the scale operation does not crash to obtain the attached minimal.xcf.bz2 image. It contains a single layer group containing a layer with a mask. If I remove the layer group and keep only the layer, the application does not crash anymore.
Created attachment 248648 [details] A minimal test case
Created attachment 248649 [details] My gimprc file to check for preview properties
Created attachment 248650 [details] The state of the workspace when the application crashes
Crashes on Windows XP as well. I suspect it is not this particular image, but its structure. Some quick tests here crash for an new image structured like this (one layer group containing a layer with a mask) and the scale factors I tried (200%, 150%).
Created attachment 248746 [details] [review] quick hack The problem seems to be that during an image rescale, while spinning the main-loop, layer-groups preview generation starts before their layers are fully rescaled, so it tries to access tiles that are not yet there. This patch fixes the problem with the minimal test case attached above.
I would not call it a hack, that looks like just the right fix. Maybe it even fixes the preview bugs in master, where we thought we're seeing GEGL artifacts. Please push :)
This bug should be fixed in master and gimp-2-8: commit cc836e7c845b2e4035382cc2cc73064bced55dc5 Author: Massimo Valentini <mvalentini@src.gnome.org> Date: Tue Jul 9 19:41:52 2013 +0200 Bug 703806: GIMP crashes when scaling an image during an image rescale, while spinning the main-loop, layer-groups preview generation used to start before their layers were fully rescaled, so it tried to access tiles that were not yet there (cherry picked from commit 3cc923d5a50287b2a7ab77dce381aabab3e37418)