Shopify / Shopify/react-native-skia
Crash when painting empty color on a svg
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 8.6k
- Forks
- 647
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 35
Description
Description
I found a crash due to a 'bad' usage of the API.
when painting a svg with an undefined color.value
<BlendColor color={color} mode="srcIn" />
The app crash with error:
Missing one or more required properties color in the skBlendColorFilter component.
Version
1.3.13
Steps to reproduce
Following sample
<Group
transform={transform}
layer={
<Paint>
<BlendColor color={color} mode="srcIn" />
</Paint>
}
>
<ImageSVG svg={svg} />
</Group>
Snack, code example, screenshot, or link to a repository
I can do it if you want, but as it is a bad usage, I am not sure it will be investigated.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No file or test is named; start from the BlendColor component/API shown in the reproduction and run the supplied JSX case with an undefined color.value. Trace the missing-color error path and determine the intended handling for this invalid input. Done means the case no longer crashes unexpectedly or has clearly defined error behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react-native, typescript
- Domain
- computer-graphics, mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100