Closed elliottkember closed 2 months ago
@elliottkember did you find a solution? I'm facing a similar issue.
@ishangupta01 I think it ended up being an SVG with a huge embedded PNG inside it that caused the problem. Check your SVGs for image elements! Sometimes they sneak into the designs as embedded screenshots and not vectors, and "export as vector" will not warn you. I think my SVG was about 4,000px square and caused havoc.
So it was caused by memory shortage? Can we close this issue then? Or do you think there is something to be done on the library side about this?
Bug
Hello friends! I have a random crash when bringing the application to the foreground. It seems to be related to
[UIView setCenter]
.I can't replicate this in development with a debugger attached, and I can't figure out what SVGs I am trying to render that are causing this problem. I'm relying on TestFlight crashes from beta users, and I'm seeing this crash come through often.
The line that seems to be crashing is here: https://github.com/react-native-svg/react-native-svg/blob/develop/apple/Elements/RNSVGImage.m#L168
Environment info
Run
react-native info
in your terminal and copy the results here. Also, include the precise version number of this library that you are using in the projectReact native info output:
Library version: 12.1.0
Steps To Reproduce
Sadly I cannot reproduce this reliably, or in a dev build - I'm relying on TestFlight crash reports. The error seems to happen when the app is in the background, and is brought to the foreground.