software-mansion / react-native-svg

SVG library for React Native, React Native Web, and plain React web projects.
MIT License
7.5k stars 1.13k forks source link

Float to Double conversion bug for Radius values on Android #2462

Closed gorkemogut closed 1 month ago

gorkemogut commented 1 month ago

Description

Start getting error on radius styling for objects on Android after updating package from 15.6.0 to 15.7.1.

When we set radius on a Svg object through styling like;

<Svg style={{
        width: 80,
        height: 80,
        borderRadius: 40
    }}></Svg>

Android crashes;

Screenshot 2024-09-20 at 09 16 25

Steps to reproduce

  1. Create object
  2. Give radius from styles on it
  3. Conversion warning and crashes

Snack or a link to a repository

https://github.com/software-mansion/react-native-svg/blob/main/apps/examples/index.tsx

SVG version

15.7.1

React Native version

0.75.3

Platforms

Android

JavaScript runtime

Hermes

Workflow

React Native

Architecture

Paper (Old Architecture)

Build type

Debug app & dev bundle

Device

Android emulator

Device model

Pixel 8 Pro API 34

Acknowledgements

Yes

github-actions[bot] commented 1 month ago

Hey! 👋

The issue doesn't seem to contain a minimal reproduction.

Could you provide a snack or a link to a GitHub repository under your username that reproduces the problem?

gorkemogut commented 1 month ago

Workaround: Using a View as wrapper and giving radius to the View

bahadiraraz commented 1 month ago

same issue

mkondurPPGT commented 1 month ago

same issue

BertLammers commented 1 month ago

Having the same issue after updating to react-native 0.75.3