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 615227 - Undo while scaling layer freezes GIMP
Undo while scaling layer freezes GIMP
Status: RESOLVED OBSOLETE
Product: GIMP
Classification: Other
Component: General
2.6.8
Other All
: Normal critical
: 2.8
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2010-04-08 21:42 UTC by quazgar
Modified: 2018-05-24 12:46 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch for this endless loop bug. (1.85 KB, patch)
2011-02-09 12:32 UTC, bugreporting
none Details | Review
Bug-615227-Undo-while-scaling-layer-freezes-GIMP (1.67 KB, patch)
2011-02-11 07:33 UTC, bugreporting
committed Details | Review

Description quazgar 2010-04-08 21:42:15 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.
Comment 1 Sven Neumann 2010-04-11 12:45:00 UTC
The undo history dialog should become insensitive while GIMP is busy.
Comment 2 bugreporting 2011-02-07 15:42:11 UTC
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
Comment 3 Michael Natterer 2011-02-07 18:51:27 UTC
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.
Comment 4 bugreporting 2011-02-07 19:16:55 UTC
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
Comment 5 bugreporting 2011-02-09 12:30:28 UTC
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...
Comment 6 bugreporting 2011-02-09 12:32:17 UTC
Created attachment 180459 [details] [review]
Patch for this endless loop bug.
Comment 7 Massimo 2011-02-11 05:46:46 UTC
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
Comment 8 bugreporting 2011-02-11 07:33:04 UTC
Created attachment 180638 [details] [review]
Bug-615227-Undo-while-scaling-layer-freezes-GIMP
Comment 9 bugreporting 2011-02-11 07:34:16 UTC
Thx Massimo, 

updated!
Comment 10 Michael Natterer 2012-01-08 21:29:42 UTC
If the fix here is that simple, we should consider it for 2.8 at least.
Comment 11 Michael Natterer 2012-02-13 07:19:56 UTC
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(-)
Comment 12 franzrogar 2015-10-29 13:39:39 UTC
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
Comment 13 Jehan 2016-08-14 12:11:06 UTC
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?
Comment 14 quazgar 2016-08-14 12:45:13 UTC
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.
Comment 15 Jehan 2016-08-14 13:01:55 UTC
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.
Comment 16 GNOME Infrastructure Team 2018-05-24 12:46:17 UTC
-- 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.