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 703806 - GIMP crashes when scaling an image
GIMP crashes when scaling an image
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: General
2.8.6
Other All
: Normal normal
: 2.8
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2013-07-08 17:22 UTC by julien.jorge
Modified: 2013-07-09 17:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
The image that makes (95.07 KB, application/x-bzip)
2013-07-08 17:22 UTC, julien.jorge
  Details
A minimal test case (95.07 KB, application/x-bzip)
2013-07-08 18:48 UTC, julien.jorge
  Details
My gimprc file to check for preview properties (830 bytes, application/octet-stream)
2013-07-08 18:48 UTC, julien.jorge
  Details
The state of the workspace when the application crashes (142.76 KB, image/png)
2013-07-08 18:50 UTC, julien.jorge
  Details
quick hack (1.46 KB, patch)
2013-07-09 16:24 UTC, Massimo
none Details | Review

Description julien.jorge 2013-07-08 17:22:24 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:

  • #0 tile_ewidth
  • #1 ??
  • #2 ??
  • #3 pixel_regions_process_parallel
  • #4 combine_regions
  • #5 gimp_layer_project_region
  • #6 gimp_projection_construct
  • #7 ??
  • #8 tile_manager_get
  • #9 tile_manager_read_pixel_data
  • #10 pixel_region_get_row
  • #11 subsample_region
  • #12 ??
  • #13 gimp_drawable_get_sub_preview
  • #14 ??
  • #15 gimp_drawable_get_preview
  • #16 gimp_viewable_get_new_preview
  • #17 ??
  • #18 ??
  • #19 gimp_view_renderer_draw

Comment 1 Téo Mazars 2013-07-08 18:06:58 UTC
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 !
Comment 2 julien.jorge 2013-07-08 18:47:38 UTC
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.
Comment 3 julien.jorge 2013-07-08 18:48:15 UTC
Created attachment 248648 [details]
A minimal test case
Comment 4 julien.jorge 2013-07-08 18:48:58 UTC
Created attachment 248649 [details]
My gimprc file to check for preview properties
Comment 5 julien.jorge 2013-07-08 18:50:11 UTC
Created attachment 248650 [details]
The state of the workspace when the application crashes
Comment 6 Michael Schumacher 2013-07-09 11:37:19 UTC
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%).
Comment 7 Massimo 2013-07-09 16:24:30 UTC
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.
Comment 8 Michael Natterer 2013-07-09 16:50:55 UTC
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 :)
Comment 9 Massimo 2013-07-09 17:58:09 UTC
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)