[inx] min/max float values ignored with locale using comma as decimal separator
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Inkscape |
Fix Released
|
High
|
jazzynico |
Bug Description
Follow-up to Bug #442642 “Inkscape crashes on Effects: render: grid without default”
Reported on #inkscape irc channel:
Miraceti wrote:
> I have noticed a bug in 0.47 and 0.48. When running
> Extension-
> and/or vertical spaces = 0 which causes 100% CPU usage in
> apparently neverending loop.
> Well, experiencing problems with small values could be unpleasant
> but zero should not definitely be tried to render at all.
> Division by zero is much worse than just consuming a lot of memory.
> I guess, zero should be filtered out already on UI level.
The lower limit to '0.1' doesn't seem to be in effect with certain locale setting (LC_NUMERIC): a comma as decimal separator apparently allows to enter '0,0' into the dialog:
Reported on irc by Miraceti with
Linux jiri1 2.6.35-gentoo-r4 #1 Sat Sep 4 13:26:57 EEST 2010 i686 AMD Athlon(tm) XP 1800+ AuthenticAMD GNU/Linux
LC_NUMERIC=
gentoo package media-gfx/
Also confirmed by sanguivor (on irc) for the bzr version:
Locale is a mixture of en_DK.UTF-8 and fi_FI.UTF-8.
Reproduced with Inkscape 0.48+devel r9785 on OS X 10.5.8: If I change the language ($LANG) for the Inkscape process so that comma is used as decimal separator, the lower limit for x/y spacing (0.1) no longer applies.
tags: | added: i18n |
Changed in inkscape: | |
status: | Fix Committed → Fix Released |
The min/max values are defined in the extension definition file: bazaar. launchpad. net/~inkscape. dev/inkscape/ trunk/annotate/ head%3A/ src/extension/ internal/ grid.cpp# L194>
<http://
"<param name=\"xspacing\" gui-text=\"" N_("Horizontal Spacing:") "\" type=\"float\" min=\"0.1\" max=\"1000\ ">10.0< /param> \n" ">10.0< /param> \n"
"<param name=\"yspacing\" gui-text=\"" N_("Vertical Spacing:") "\" type=\"float\" min=\"0.1\" max=\"1000\
Ignoring the min/max float values depending on decimal separator is possibly a similar issue as reported in bug #571196.