@beccadax @davedelong I think this is definitely a bug somewhere, probably in AppKit, maybe in the compiler. I can build Swift 6 code with no warnings that reliably crashes with EXC_BAD_ACCESS. Need to think of where to send the bug report.
https://gist.github.com/rnapier/afbc91266212eb667ea02e3945e91be8
@cocoaphony @beccadax @davedelong oof yeah, that's a weird change -- previously we had to fake its sendability with unchecked-sendable boxes and could see that something weird is going on.
But this API now is both more convenient to pass static images along that have already been fully loaded into memory, and oddly dangerous.
I recall @helge and @mattiem chiming in ~1y ago when I mused about this. CGImage sending was state of the art then 🤔
@cocoaphony I don’t think so. The bullet point I think(!) you’re quoting only talks about NSImage being Transferable and some other types being Sendable, doesn’t it? I can’t find any other relevant NSImage reference in that document.
“AppKit more fully integrates with Swift and SwiftUI with Sendable (NSColor, NSColorSpace, NSGradient, NSShadow, NSTouch) and Transferable (NSImage, NSColor, NSSound) types.”