Xcode13.4.1&Xcode15 crash bug

    let file = FileManager.groupPath.appendingPathComponent("test.pdf")
    UIGraphicsBeginPDFContextToFile(file.path, .zero, nil)
    UIGraphicsBeginPDFPageWithInfo(.init(x: 0, y: 0, width: 200, height: 200), nil)
        
    "😘".draw(in: .init(origin: .zero, size: .init(width: 10, height: 10)), withAttributes: [NSAttributedString.Key.font: UIFont.systemFont(ofSize: 14)])
        
    UIGraphicsEndPDFContext()

When I use the above code to draw emoji or images with transparent channels, there will be a crash in draw function!

There is no obvious reason why this should crash (except maybe the file being unable to be created?). In general if you are going to post about a crash, you should provide at least the back trace of the crash, if not the entire crash log (if one was generated) – as it stands all we can really do is guess as to the cause.

Hi, @Rincewind ! Here's a screenshot of the crash, along with information about the stack. It's very unfortunate that we didn't get any useful information out of it, and that this doesn't happen on Xcode 14.2 built projects.

I'm very sorry for the title mistake, it should be Xcode v14.3.1 and Xcode v15-RC.

Can you file a bug report about this?

Xcode13.4.1&Xcode15 crash bug
 
 
Q