Skip to content
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

[Bug] Xcode 15 Crash #91

Open
julia0926 opened this issue Nov 17, 2023 · 1 comment
Open

[Bug] Xcode 15 Crash #91

julia0926 opened this issue Nov 17, 2023 · 1 comment

Comments

@julia0926
Copy link

julia0926 commented Nov 17, 2023

Hi, I'm developing an app using Drawsana.
I recently updated Xcode to 15 and when I run it on iOS 17, I get the error shown in the screenshot.
So I searched the forums and added the following code as a workaround, but it would be great if you could make it bug-free for the latest version.

Thanks !

Crash ScreenShot

스크린샷 2023-11-17 오전 9 51 57

Suggestion

  • Add code to avoid rendering images if size.width, size.height is less than 0 before calling UIGraphicsBeginImageContextWithOptions
if (size.width <= 0 && size.height <= 0) {
	return nil
}
UIGraphicsBeginImageContextWithOptions(size, false, scale)
스크린샷 2023-11-07 오전 11 25 29

Reference

@tuanbipa
Copy link

Thanks @julia0926 I had the same problem, thanks for your code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants