software-mansion / react-native-svg

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

Native crash in Android using svg with filter. #2529

Closed jimbofoo closed 1 week ago

jimbofoo commented 1 week ago

Description

On android <SvgUri> crashes in native code: 

Fatal Exception: java.lang.NullPointerException
Attempt to invoke virtual method 'int com.horcrux.svg.FilterProperties$FeBlendMode.ordinal()' on a null object reference
com.horcrux.svg.FeBlendView.applyFilter (FeBlendView.java:73)
com.horcrux.svg.FilterView.applyFilter (FilterView.java:98)
com.horcrux.svg.RenderableView.render (RenderableView.java:393)
com.horcrux.svg.GroupView.drawGroup (GroupView.java:135)
com.horcrux.svg.GroupView.draw (GroupView.java:91)
com.horcrux.svg.RenderableView.render (RenderableView.java:483)
com.horcrux.svg.GroupView.drawGroup (GroupView.java:135)
com.horcrux.svg.GroupView.draw (GroupView.java:91)
com.horcrux.svg.RenderableView.render (RenderableView.java:483)
com.horcrux.svg.SvgView.drawChildren (SvgView.java:335)
com.horcrux.svg.SvgView.drawOutput (SvgView.java:281)
com.horcrux.svg.SvgView.onDraw (SvgView.java:134)

Steps to reproduce

use SvgUri with the above svg as src: cb

<SvgUri
        uri={src}
        width={50}
        height={50}
      />

Snack or a link to a repository

-

SVG version

15.8.0

React Native version

0.76.1

Platforms

Android

JavaScript runtime

Hermes

Workflow

React Native

Architecture

Paper (Old Architecture)

Build type

None

Device

Real device

Device model

No response

Acknowledgements

Yes

github-actions[bot] commented 1 week 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?

github-actions[bot] commented 1 week ago

Hey! 👋

It looks like you've omitted a few important sections from the issue template.

Please complete Snack or a link to a repository section.