GNOME Bugzilla – Bug 615227
Undo while scaling layer freezes GIMP
Last modified: 2018-05-24 12:46:17 UTC
When trying to undo via the history dock while GIMP currently rescales a layer (or the whole image), GIMP freezes and can only be killed externally. The console shows a neverending stream of violated assertions: .... (gimp-2.7-git:6639): Gimp-Core-CRITICAL **: gimp_image_undo: assertion `private->pushing_undo_group == GIMP_UNDO_GROUP_NONE' failed (gimp-2.7-git:6639): Gimp-Core-CRITICAL **: gimp_image_undo: assertion `private->pushing_undo_group == GIMP_UNDO_GROUP_NONE' failed .... This bug happens both with 2.6.8 and a pretty recent git version (a few weeks old now). Steps to reproduce: 1. Open GIMP (from a console) 2. Create new image 3. Do something with the image (so as to have a possible undo step) 4. Make sure to have the history dock readily available 5. Resize the layer (best with a slower algorithm) to a decent size (something like 4000x3000 should be slow enough on most computers) 6. While the resizing is underway, click on the previous state in the history What should happen: Either of: a) Nothing, since the current operation is not finished yet. b) Cancel the scaling and return to the clicked state. What happens: GIMP freezes and displays an infinite message stream instead.
The undo history dialog should become insensitive while GIMP is busy.
This does not happen in actual git master anymore. I don't know what happened, cause i reproduce the bug few month ago. But i think this bug report could be close. On my gimp git master steps i choose will be run after the actual rescale process has finished. Greez
Oh indeed, I changed progress bar updating to not run the main loop any longer, so whatever new command entered won't be executed until after the currently processed command has finished and returns control to the main loop. I didn't even have that in mind, the progress fix was simply meant to be cosmetic :) Now I'm actually pondering to backport that to 2.6, setting milestone accordingly.
Oh damn, i don't know what i've done wrong, but now the problem still exist. Sry, for the wrong information Michael, ... i will have a look at this bug. Greez
The problem that we can change the history state while the image is in a working progress is another problem, but the preventing of ending in an endless loop is a simple programming error, as we don't test the return value of gimp_image_undo, which could end in an endless loop. As we see... so a simple patch would not solve the insensitivity of the history editor widget, but will solve this bug of ending in an endless loop. Patch will be uploaded...
Created attachment 180459 [details] [review] Patch for this endless loop bug.
The last hunk of the patch attached to the previous comment contains a typo: it exchanges a call to 'gimp_image_redo' with if (! gimp_image_undo
Created attachment 180638 [details] [review] Bug-615227-Undo-while-scaling-layer-freezes-GIMP
Thx Massimo, updated!
If the fix here is that simple, we should consider it for 2.8 at least.
Pushed the patch, this doesn't fully fix the bug tho: commit 43b6d6922c7abd5c1036a709d6fc1db7b68d02eb Author: Christian Krippendorf <Kontakt-Programming@CerebrosuS.de> Date: Fri Feb 11 08:28:43 2011 +0100 Bug 615227 - Undo while scaling layer freezes GIMP Don't run into an infinite loop when the undo editor is used while we're in the middle of an undo group. app/widgets/gimpundoeditor.c | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-)
Update bug status Windows Version: 8.1 x64 up-to-date GIMP Version: 2.8.14-x64 current Commands: > Open image > Draw some lines on it > Resize to 8000 px wide (proportional) > While resizing, clicked on History to previous stages Result: > Nothing happens as the operation (resizing) is not finished, no freeze state either, ending properly Status: can not reproduce
This does not look like a problem anymore both in 2.8 and master. Well at least I can't reproduce (on Linux). And comment 12 states the same for Windows. Should we close?
The freeze does not happen anymore in 2.8.14 here, but GIMP still raises the same assertion (although only once): (gimp:3216): Gimp-Core-CRITICAL **: gimp_image_undo: assertion 'private->pushing_undo_group == GIMP_UNDO_GROUP_NONE' failed The developers should decide whether this means that closing the bug is OK.
Oh ok. I could not reproduce this with GIMP 2.8.18, but maybe I did not follow the steps properly. I'll have a look later. In any case, no, if critical errors are raised, this bug should definitely not be closed.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gimp/issues/327.