Bug Description
1. Summary
On Vega, SVG gradients render incorrectly when the system language uses a comma as its decimal separator. Fractional <Stop offset> values such as 0.5 appear to be read as 0, so a multi-stop gradient collapses to a single colour. The same app and code render correctly in locales that use a decimal dot.
Bug Severity
Select one that applies
- Impacts operation of app
- Blocks current development
- Improvement suggestion
- Issue with documentation (If selected, please share the doc link and describe the issue)
- Other
2. Steps to Reproduce
- Render the example SVG below in an app.
- Set the system locale to
en-US, force-stop and cold-start the app, and note the result. - Set the system locale to
de-DE(ores-ES), force-stop and cold-start the app, and compare. - To confirm the decimal separator is the trigger, repeat with
es-MX, a Spanish locale that uses a decimal dot.
I confirmed the active separator withI18nManager.getSystemLocale()and(1.5).toLocaleString(locale).
3. Observed Behavior
Explain what actually happened, noting any discrepancies or malfunctions.
System locale Decimal separator Result
en-US dot correct
es-MX dot correct
es-ES comma broken
de-DE comma broken
Sample (a), two stops at offset="0.5": in de-DE it renders as solid blue, as if both offsets were 0 and only the last stop's colour is painted.
Sample (b), stops at 0 and 1: unchanged in every locale.
Sample (c), plain fills: unchanged in every locale.
Real asset: a radial-gradient dome with 33 fractional stops turned into a flat pale-cyan shape in de-DE and es-ES.
Integer lengths: rescaling every cx, cy, r and strokeWidth to integers did not change anything, so lengths are not the problem.
4. Expected Behavior
Describe what you expected the SDK to do under normal operation.
Gradient stop offsets should render identically in every system locale. Sample (a) should show a hard red-to-blue split at 50% in de-DE, as it does in en-US.
4.a Possible Root Cause & Temporary Workaround
Fill out anything you have tried. If you don’t know, N/A is acceptable
the offsets reach the native service as a float array, and the JS side parses them locale-independently, so the problem appears to be in the OS SVG service (com.amazon.kepler.svg_2@ISVG_0). Locale-aware parsing of a fractional value there would explain why only comma-decimal locales fail. I can't see the native source, so this is an inference. Fractional stop opacities and element opacity may be affected too, but I haven't isolated that.
Temporary workaround: replace the gradient SVG with a PNG Image.
6. Environment
Please fill out the fields related to your bug below:
-
SDK Version: 0.23.8358
-
React Native Version: RN0.72
-
App State:
Foreground -
OS Information: Please ssh into the device via
vega exec vda shell(orkepler exec vda shellfor v0.21 and earlier) and copy the output fromcat /etc/os-releaseinto the answer section below. Note, if you don’t have a simulator running or device attached, the command will respond withvda: no devices/emulators foundNAME="OS" OE_VERSION="4.0.0" OS_MAJOR_VERSION="2" OS_MINOR_VERSION="0" RELEASE_ID="26" OS_VERSION="2.0" BRANCH_CODE="TV Ship" BUILD_DESC="OS 2.0 (TV Ship/515)" BUILD_FINGERPRINT="4.0.512374.0(3072cab629675a74)/515N:user/release-keys" BUILD_VARIANT="user" BUILD_TAGS="release-keys" BUILD_DATE="Fri Oct 02 22:31:28 UTC 2026" BUILD_TIMESTAMP="1790980288" VERSION_NUMBER="2602000051520"
7. Example Code Snippet / Screenshots / Screengrabs
Include any relevant code or component setup in React Native that can help reproduce the bug.
import { Svg, Defs, RadialGradient, Stop, Circle } from '@amazon-devices/react-native-svg';
export const GradientRepro = () => (
<Svg width={400} height={120} viewBox="0 0 400 120">
<Defs>
<RadialGradient id="hardSplit">
<Stop offset="0.5" stopColor="#FF0000" />
<Stop offset="0.5" stopColor="#0000FF" />
</RadialGradient>
<RadialGradient id="endsOnly">
<Stop offset="0" stopColor="#FF0000" />
<Stop offset="1" stopColor="#0000FF" />
</RadialGradient>
</Defs>
<Circle cx={60} cy={60} r={50} fill="url(#hardSplit)" />
<Circle cx={200} cy={60} r={50} fill="url(#endsOnly)" />
<Circle cx={340} cy={60} r={50} fill="#FF0000" />
</Svg>
);