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
Crashing when running in Xcode15 beta 6 #637
Comments
The gradient view created is not visible。 @mvn-khoavo-dn I have also encountered the same problem. Has anyone solved it |
This is a big problem. I am experiencing the same problem with IOS 17. The app is in production and I think if people update to IOS 17 it will crash immediately👀 |
I believe this issue has already been fixed by @Caiopia in #626 - The patch will be part of the upcoming 3.0.0 release (currently in alpha, beta coming soon). It has also been cherry-picked to the 2.8 series: https://github.com/react-native-linear-gradient/react-native-linear-gradient/releases/tag/v2.8.3 |
After upgrading to 2.8 it works again. I think this issue can be closed |
I am still getting this error unfortunately. The problem could be because I am placing the linear gradient insdie of an animated view. |
xcode 15.0.1 have same problem in gradient text |
NOTE WARNING INFO There is also a short video for the solution: https://www.youtube.com/watch?v=psIBtbwMLQE |
Description
Crashing when running the app which is built by Xcode15 beta 6
Crash log
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'UIGraphicsBeginImageContext() failed to allocate CGBitampContext: size={390, 0}, scale=3.000000, bitmapInfo=0x2002. Use UIGraphicsImageRenderer to avoid this assert.' libc++abi: terminating due to uncaught exception of type NSException *** Assertion failure in void _UIGraphicsBeginImageContextWithOptions(CGSize, BOOL, CGFloat, BOOL)(), UIGraphics.m:410
Steps to reproduce
Running the app which is built by Xcode15 beta 6 on iOS 17.0 beta device or Simulator iOS 17.0
The application will be crashed immediately after opening.
Snack, code example, screenshot, or link to a repository
Recommend Solution
I just tried to fix it by replacing UIGraphicsBeginImageContextWithOptions(self.bounds.size, !hasAlpha, 0.0); by [[UIGraphicsImageRenderer alloc] initWithSize: self.bounds.size]; in BVLinearGradientLayer.m file like this screenshot and the app can run normally.
Another related issues from Apple's forum: Running in Xcode15beta crashed
Please check it and update the library as soon as possible. Thank you very much.
The text was updated successfully, but these errors were encountered: