Drawsana icon indicating copy to clipboard operation
Drawsana copied to clipboard

[Bug] Xcode 15 Crash

Open julia0926 opened this issue 1 year ago • 1 comments

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

  • https://developer.apple.com/forums/thread/733326

julia0926 avatar Nov 17 '23 01:11 julia0926

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

tuanbipa avatar Jan 18 '24 10:01 tuanbipa