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 340073 - supernova filter preview disappears
supernova filter preview disappears
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: Plugins
git master
Other Windows
: Normal minor
: 2.2
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2006-04-29 00:33 UTC by Stephen
Modified: 2006-10-10 14:36 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
screenshot normal (147.72 KB, image/jpeg)
2006-04-29 04:22 UTC, Stephen
  Details
Preview disappeared (144.52 KB, image/jpeg)
2006-04-29 04:25 UTC, Stephen
  Details
Supernova fix (935 bytes, patch)
2006-10-08 10:26 UTC, Aurimas Juška
committed Details | Review
Supernova - fix-2-2 (703 bytes, patch)
2006-10-10 13:48 UTC, Aurimas Juška
committed Details | Review

Description Stephen 2006-04-29 00:33:03 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
Comment 1 Carol 2006-04-29 03:28:46 UTC
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?
Comment 2 Stephen 2006-04-29 04:00:25 UTC
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.
Comment 3 Stephen 2006-04-29 04:15:39 UTC
I will try to attach some screenshots.  One normal preview and one black preview.
Comment 4 Stephen 2006-04-29 04:22:32 UTC
Created attachment 64498 [details]
screenshot normal

Normal preview window
Comment 5 Stephen 2006-04-29 04:25:30 UTC
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.
Comment 6 Carol 2006-04-29 05:33:38 UTC
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.

Comment 7 Stephen 2006-04-29 06:05:34 UTC
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.
Comment 8 Carol 2006-04-29 07:05:28 UTC
Any information that you can provide like this will be very helpful.

Comment 9 Stephen 2006-04-29 14:38:45 UTC
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.
Comment 10 Stephen 2006-05-10 03:04:25 UTC
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.
Comment 11 Michael Schumacher 2006-09-04 11:48:47 UTC
This also happens in 2.2.13 on Windows. Adjusting version and confirming.
Comment 12 Aurimas Juška 2006-10-08 10:26:21 UTC
Created attachment 74268 [details] [review]
Supernova fix

It seems that some code performed integer division instead of floating point. Explicit cast fixes this bug.
Comment 13 Michael Schumacher 2006-10-08 19:30:27 UTC
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?
Comment 14 weskaggs 2006-10-09 17:44:00 UTC
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.
Comment 15 Aurimas Juška 2006-10-09 19:40:18 UTC
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.

Comment 16 Sven Neumann 2006-10-10 10:12:50 UTC
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.
Comment 17 Michael Schumacher 2006-10-10 10:30:35 UTC
In 2.2.13, the preview windows turn to all black when the radius is set to the minimum, 1. Reopening.
Comment 18 Aurimas Juška 2006-10-10 13:48:14 UTC
Created attachment 74404 [details] [review]
Supernova - fix-2-2

This should fix gimp-2-2 branch.
Comment 19 Sven Neumann 2006-10-10 14:36:00 UTC
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.