GNOME Bugzilla – Bug 590463
Crop tool causes infinite loop, GIMP hangs, unsaved data lost
Last modified: 2009-08-01 16:28:09 UTC
Steps to reproduce: 1. Create a new image, say 100x100 pixels 2. Duplicate the background layer 3. Using the Move tool, move the new top layer up and to the left, so the layer x/y offsets are negative 4. Choose the Crop tool, select "Current layer only", deselect "Allow growing" 5. Using the mouse, select the entire moved top layer 6. In the toolbox dialog, click on the "Position: x" field and change its value, which is currently something negative, into a positive value 7. Press tab. This should update the position of the crop rectangle - and it does, but then the app gets into an infinite redraw loop. The crop rectangle keeps flickering as it is redrawn over and over again, and GIMP hangs at 100% CPU usage. :-( There goes my unsaved work, grr... Stack trace: No stack trace, as it's an infinite loop. Other information: In general, I noticed the Crop tool sometimes behaves strange with "Current layer only" - strictly speaking this should probably be a separate bug. The change in behaviour is that the maximum allowed layer size is fixed to the layer that was selected when you first dragged the mouse to create a crop rectangle. In contrast to earlier GIMP versions, switching to another layer later on will not change the maximum allowed layer size. I used to use this e.g. to expand the x position+size of one layer A to that of a larger layer B, as follows: If the layer A bbox is contained entirely within that of B, switch to A, create a full-size crop rectangle covering all of A, with "Allow growing" deselected. Next, switch to layer B and drag only the left+right border of the crop rectangle to the left+right border of B. Now switch back to A and perform the crop.
I can reproduce this with GIMP 2.6.4 on Windows XP SP3. Indeed, an infinite loop of drawing begins, and when you click anything GIMP get's stuck.
I am able to reproduce this on the gimp-2-6 branch if I revert http://git.gnome.org/cgit/gimp/commit/?id=88a483bd18475dcab7f4c3cc31c641e77422d996, otherwise I don't get the infinite loop. Let's close this bug report as a duplicate to the report that fixes the issue even though the symptoms of different. Thanks for the report anyway Richard. *** This bug has been marked as a duplicate of 567393 ***