PixInsight Forum (historical)
PixInsight => Bug Reports => Topic started by: David Serrano on 2007 July 05 04:06:04
-
Hi there,
I've found a bug by which cancelling a running process on a preview causes the preview to end up in the wrong state.
This is how to reproduce it:
- Open an image.
- Take a preview of it.
- Select the preview.
- Apply a process to it, for instance, a CurvesTransform with a curve that changes the preview in an obvious manner. I inverted the image.
- Undo the preview.
- Apply another process to the preview. Better if it's one which will take more than 3 seconds to complete because we will need time to...
- ... cancel this second process.
Observed behaviour:
Just after cancelling, my preview returned to the inverted state just as if I pressed "Redo preview" after undoing. Also noteworthy is the fact that the button "Undo/Redo preview" didn't change accordingly and it remained with the "Redo" icon and tooltip. Clicking it, the preview reverted to the original state and the button didn't change (so now the preview state and this button were coherent). Further Undo/Redo cycles work as expected.
Expected behaviour:
I didn't expect the image to change at all.
-
Update: the same happens if, instead of manually cancelling the second process, an error occurs.
-
Yes, this is a bug.
Add one more to your personal account ;)
After some investigation (~8000 lines involved), the problem seems to be in the internal processing history structures of previews. I don't have it well identified though: the code is pretty complex and includes "regions" that were written a couple years ago, so this needs substantial work.
However, please note that this bug does not cause any structural corruption, and that the correct state of the preview is restored after an Undo/Redo Preview operation (you can verify this on the Processing History window). So this bug is a bit nasty, but it is harmless. I'll try to fix it completely in the next version.
Thank you for the bug hunting work ;)