GNOME Bugzilla – Bug 559716
Changing crop size in Crop Tool Options can make UI unresponsive
Last modified: 2011-03-21 15:54:12 UTC
Steps to reproduce: 1. Position the crop tool in the image 2. Set the size of the tool in its settings dialog, choose a size bigger as the image or at least so big that it will jut out of the image 3. The tool flickers and Gimp doesn't respond anymore Stack trace: Other information:
Created attachment 122173 [details] a video showing the issue
I seem to be unable to adjust the settings to do this. Please provide exact steps in written form that allow others to reproduce the problem..
Oh right it seems like it is only happening when you have a small image. Try it this way (as seen in the video): 1. Scale down an image so that one side will be 60px (my example was 60x90 or so) 2. Now position the tool somewhere in the image, but not in the top left corner (not 0,0), maybe try (10,10) 3. Set the size of 60x60 in the settings dialog of the crop tool, it will start to flicker and Gimp will not respond anymore.
I'm still unable to reproduce this problem.
I can confirm this bug in GIMP 2.6.1. Steps to reproduce: 1. Create new image size 99x60 px 2. Change zoom level to 550% 3. Select "Crop tool" 4. Start selecting some area on the image with crop tool 5. In crop tool settings set the size 90x60 px
Oh right, I guess zooming is the important step... didn't thought about that.
I can reproduce. Not a crash in the technical sense though.
Created attachment 122223 [details] [review] crop-options-lock-ui-2008-11-08.patch The cause of this bug is a combination of sub-pixel representation of the crop rectangle, clamping of the entered height, integer-only entries in the tool options, and very intolerant checks in gimp_rectangle_tool_options_notify() for the height. It should be fine to loosen up the checks for x, y, width and height. I have not been able to reproduce the UI lockup with the patch applied even though it's rather easy without the patch applied. I will do some more testing before I commit.
Seems to work fine, committed to trunk (rev 27605) and gimp-2-6: 2008-11-10 Martin Nordholts <martinn@svn.gnome.org> Bug 559716 – Changing crop size in Crop Tool Options can make UI unresponsive * app/tools/gimprectangletool.c: Accept a broader range of x, y, width and height values from the tool options so we don't end up in an infinite signal emission loop.
This bug is still be present in Gimp 2.6.8 as shipped with Ubuntu 10.04. Steps to reproduce: - create an image (685x1024) - create a crop area smaller then the image with the mouse (520x406+88+108) - increase the width of the crop area in the dialog beyond the image size (5200x406) and hit tab - endless loop follows - if no endless loop follows, move the top/left corner of the crop area around with the mouse and then enter another size bigger then the image, might take a few tries to get into the endless loop
Ok :( Reopening then.
*** Bug 628788 has been marked as a duplicate of this bug. ***
*** Bug 635457 has been marked as a duplicate of this bug. ***
*** Bug 573860 has been marked as a duplicate of this bug. ***
Fixed in master: commit ec1108d62a671279779514c66dab15b0ca65c24b Author: Michael Natterer <mitch@gimp.org> Date: Mon Mar 21 14:38:26 2011 +0100 Bug 559716 - Changing crop size in Crop Tool Options can make UI unresponsive In gimp_rectangle_tool_update_options(), freeze()/thaw() notifications around setting setting x, y, width, height, so all values are up-to-date when "notify" is emitted. Also, only set the values that have actually changed so we don't process notifications when no change was done. app/tools/gimprectangletool.c | 43 ++++++++++++++++++++++++---------------- 1 files changed, 26 insertions(+), 17 deletions(-)
Created attachment 183941 [details] [review] Adjust mitch's fix slightly to be safer when dealing with floating-point numbers