Large Circular Selection Shrink freezes, becomes unresponsive with large values. Appears to hang process.
Environment/Versions
- GIMP version: 2.10.30, 2.10.28, 2.10.18, also 2.8.16
- Package:
- Operating System: Linux, Windows
Description of the bug
Attempting to shrink a very large circle can take an unacceptably long time. The Shrink Selection dialog becomes unresponsive, and any additional user interaction causes the operating system to prompt to kill the unresponsive process, which also kills GIMP and results in loss of unsaved work.
At first I thought this always resulted in GIMP becoming unrecoverable, requiring the process to be killed. But after further testing on multiple version and on different Operating Systems and versions, I discovered the process is actually still alive and running, but can take a very long time to complete: i.e. more than 5 minutes, with no feedback or progress meter.
Unfortunately, there is no way for a user to know that the process is still proceeding, and they will probably give up in a reasonable amount of time, usually less than 30 seconds. Plus, when the operating system prompts to kill the process repeatedly, it doesn't inspire confidence that the process might complete successfully many minutes later.
Barring including a progress meter, I think the user should be alerted that the action could take several minutes to complete.
One might be tempted to classify this as a "performance issue", but since it appears to result in a hung process and can result in loss of work, I would classify it as a bug.
Reproduction
Is the bug reproducible? Always
Reproduction steps:
- Create a large image: 6000px width, 9000px height, with Transparent background.
- Use the Ellipse tool: Fixed Aspect ratio: 1:1, create a perfect circle in over 2500px in radius, anywhere as long as it is completely within the bounds of the image / layer.
- Open the Select | Shrink dialog, enter a value of 2000 or more, but less than the radius of the selection circle. The checkbox can be in either state: "Selected areas continue outside the image"
- Press the OK button. It will appear depressed and will not recover. If you try to interact with the unresponsive dialog, the OS will report that it is unresponsive and offer to kill the process. This will result in loss of unsaved work.
…
Expected result:
The selection should be "shrunk" by the specified amount in a very short amount of time, less than 2 or 3 seconds.
Actual result:
I have reasonably good hardware, 8 cores, 32GB RAM, and shrinking a 5000 pixel diameter circle by 2000 pixels took between more than 5 minutes as a best case. GIMP 2.10.30 running on Ubuntu 22.04 PRERELEASE took over 15 minutes.
Also, if you let the operating system kill the Shrink Selection process, it kills GIMP as well.
Additional information
No additional information.