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 509608 - "Cool Metal": bumpmap plug-in fails
"Cool Metal": bumpmap plug-in fails
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: Plugins
git master
Other All
: Normal minor
: 2.4
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2008-01-15 11:42 UTC by Ulf-D. Ehlert
Modified: 2008-01-15 12:27 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Bugfix (1.75 KB, patch)
2008-01-15 11:43 UTC, Ulf-D. Ehlert
none Details | Review

Description Ulf-D. Ehlert 2008-01-15 11:42:12 UTC
When using the "Cool Metal" filter (or logo) with option "Effect size"
(or "Font size") less than 20, the call of the bumpmap plug-in fails
with error message "Floating point exception":

In the 'apply-cool-metal-logo-effect' routine, 'plug-in-bump-map' is
called with argument depth := size / 20. Obviously for depth < 1 the
passed integer value is 0, and then the bumpmap code
        "nz = (6 * 255) / bmvals.depth;"
causes a division by zero.

Note that there are more affected plug-ins:
    <Toolbox>/Xtns/Buttons/Round Button  (option "Bevel Width"),
    <Toolbox>/Xtns/Patterns/Swirl-Tile   (option "Depth"),
and any non-standard plug-in may be affected as well.
Comment 1 Ulf-D. Ehlert 2008-01-15 11:43:57 UTC
Created attachment 102893 [details] [review]
Bugfix
Comment 2 Sven Neumann 2008-01-15 12:27:47 UTC
Thanks a lot. I have applied this change to both branches:

2008-01-15  Sven Neumann  <sven@gimp.org>

	* plug-ins/common/bumpmap.c
	* plug-ins/script-fu/scripts/swirltile.scm: applied patch from
	Ulf-D. Ehlert that catches a potential division by zero in the
	Bumpmap plug-in and adjusts the range of the Depth parameter in
	the Swirl-Tile script (bug #509608).