Skip to content

[Bug] Xcode 15 Crash #91

@julia0926

Description

@julia0926

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions