GNOME Bugzilla – Bug 340073
supernova filter preview disappears
Last modified: 2006-10-10 14:36:00 UTC
Please describe the problem: In Filters/light effects/supernova, the preview of the image disappears when you move the Radius bar far enough to the left. It varies from image to image. I have it happen with .jpeg and .xcf, havn't tried others. I am not sure if this is normal or a bug. Steps to reproduce: 1. Open an image. 2. Go to Filters/Light Effect/SuperNova. 3. Select Preview, then slide Radius bar the full range. Actual results: Preview of image disappears as the Radius bar is moved to the left. Expected results: Preview image should always visible. Does this happen every time? Yes Other information: System info: Dell e1705 1.83 core Duo Windows xp Media Center Edition
Is it the preview of the image or the preview of the effect that disappears? I am looking at this with a fresh cvs gimp. When I move the radius slider back and forth, the preview of the effect remains at the last size until the slider stops. Using the gimp-2.3 zoomable previews causes the preview of the effect to disappear while it redraws the layer, and I expect this. Another question would be, does the preview return to its normal state once the slider stops and the image redrawing gets a chance to catch up?
The entire preview 'window' goes black. I can only see the crosshairs. The preview image does not return to the normal state until I manually slide the Radius bar to the right again. My picture reappears and everything in normal. The SuperNova plug-in, however, will still render properly in all cases when you press the OK button. Also, I just now got a GIMP Message while moving the Radius bar: Plug-In crashed: "nova.exe" The dying plug-In may have messed up Gimp's internal state. You may want to save your images and restart Gimp to be on the safe side.
I will try to attach some screenshots. One normal preview and one black preview.
Created attachment 64498 [details] screenshot normal Normal preview window
Created attachment 64499 [details] Preview disappeared Preview image goes black as the Radius bar is slid left. It stays black until slid to the right.
I am unable to reproduce this on linux with either a current gimp-2.3 or with debian unstable gimp-2.11. It looks like a Windows problem and unfortunately, being able to mark it in a sortable way has disappeared from this bug tracker.
Thanks for your help. I am new to GIMP. I did have GIMP 2.2.10 and I am sure it did not do this. I might try to re-install 2.2.10 and see if it indeed has this problem. Anyway, it is not a major problem. I do have Ubuntu 6.06 beta live cd with the GIMP. I will see if it does this.
Any information that you can provide like this will be very helpful.
I tried Ubuntu live CD with GIMP 2.2.10 and there was no problem with the SuperNova function. Everything worked perfectly. I can't find a Windows installer for version 2.2.10 to try and I had deleted it from my system when I upgraded to 2.2.11.
On Ubuntu flight 7 with 2.2.11 there was no problem. On my other computer with windows xp and 2.2.11, there was this problem. This problem seems to only be with GIMP 2.2.11 running on xp.
This also happens in 2.2.13 on Windows. Adjusting version and confirming.
Created attachment 74268 [details] [review] Supernova fix It seems that some code performed integer division instead of floating point. Explicit cast fixes this bug.
Yes, this fixes it. Unless the integer math was intentional here (maybe because it is faster) and changing it brakes something, we should apply it. Though I wonder why it did behave differently on other platforms - maybe something in GTK+ or GDK?
The patch in comment #12 is against HEAD, but the comments here indicate that HEAD does not have this problem, only 2.2.11-13. The reason HEAD doesn't have the problem, I think, is because it uses "zoom", which is of type gdouble. The 2.2 version does not have zoomable previews, so the patch won't apply against it. I think Aurimas has probably identified the problem correctly in comment #12, but the patch there can't be applied to the code that is broken.
I worked on 2.3.11 on windows where I could reproduce this bug. To my surprise, that expression still seems to be evaluated as int, which becomes zero in case of radius=1 (assuming image is larger than thumbnail). I retested on Current CVS ont Linux, and problem exists there too. Not so easy to spot on the screen, but clearly noticable in a debugger. Due to obvious similarities, I think 2.2.x must have identical changes made. The interesting part. Why does it behave differently on distinct platforms? Well (gdb says) on windows floating point division by zero evaluates to infinity, on linux 0. Needless to say, windows has visible problems.
There's probably a confusion with respect to version numbers here. Version 2.2 doesn't have zoomable previews, so it's most likely not affected by this problem at all. I have committed the fix to the HEAD branch. If there's really a problem in the 2.2 version, please reopen this bug report. 2006-10-10 Sven Neumann <sven@gimp.org> * plug-ins/common/nova.c: applied patch from Aurimas Juška that adds a missing cast which should fix bug #340073.
In 2.2.13, the preview windows turn to all black when the radius is set to the minimum, 1. Reopening.
Created attachment 74404 [details] [review] Supernova - fix-2-2 This should fix gimp-2-2 branch.
I had already done the very same change. Thanks nevertheless. 2006-10-10 Sven Neumann <sven@gimp.org> * plug-ins/common/nova.c: added a missing cast to fix bug #340073.