-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
-[RNSVGRenderable renderLayerTo:rect:] | Fatal Exception: CALayerInvalidGeometry | CALayer bounds contains NaN: [0 0; nan nan] #978
Comments
We also have the same crash, after upgrading from react-native-svg 5.x to 8.x: |
Have the same error on IOS 10 |
Repro needed. |
@jgcmarins @itchingpixels @dmydry Hey fellas, just reaching out to see if any of you had managed to figure this one out? We've been seeing this sporadically for users on iOS 13.3.1, but I'm struggling to be able to pinpoint this bug. The stack traces we've seen all point towards line 387 of RNSVGRenderable.m, but when place breakpoints there I never seem to be able to reproduce it. This is line 387 by the way: Cheers |
I also got this error on iPhone 11 Pro Max Simulator. |
@deansimcox Can't reproduce. just got it via crashlytics. |
I have a problem with That's all that I found for now. const AnimatedG = Animated.createAnimatedComponent(G);
<Svg>
<AnimatedG
style={{
transform: [
{perspective: 100},
{scale: panViewScale},
{translateX: panViewTranslateX},
{translateY: panViewTranslateY},
],
}}
>
<Rect width={50} height={50} fill="black" />
<AnimatedG>
</Svg> Update: So, it seems the crash happens when I use a interpolate method panViewTranslateY: Animated.add(this.translateY, this.translateYPinch).interpolate({
inputRange: [-this.contentMaxY, -this.contentMinY],
outputRange: [-this.contentMaxY, -this.contentMinY],
extrapolate: 'clamp',
}), |
@vomchik that's a pretty good lead - we've used the interpolate method in a few spots in our app too. |
In my case it was because I had some elements that were of 0 width or height (pretty sure the whole SVG was actually), or I was passing NaN as one of the numeric values accidentally. |
Had this issue been fixed? I have the same error and the version is 9.5.1. |
Any movement here? Using version Turns out my issue was with LogRocket. I opened a ticket there for it. |
Has anyone fixed this issue? I have the same error. |
Same issue with |
This PR adds missing checks whether SVG bounds size values are nan. This PR should fix [this](#978) old issue that still happens sometimes.
Hello,
I got this error:
Stack:
RN Version: 0.59.0
RN Svg Version: 9.3.3
iOS version: 12.1.4
Thanks for this awesome lib \o/
The text was updated successfully, but these errors were encountered: