jpegData(compressionQuality:) background crash on iOS18

Ever since the release of iOS18, we've been seeing a new crash related to calling jpegData(compressionQuality:). From reports, this isn't crashing during foreground usage of the app, but instead will prompt the user about a background app crash upon foregrounding. The stacks from crash reports show this crash is happening from a variety of callers, but all go through jpegData(compressionQuality:), down through [HDRImageConverter_Metal init] and end up in apthread_mutex_local call when it crashes.

Attached is a sample crash report from 18.2(22C5125e), but we've been seeing this since the first iOS18 release.

Did something change with around these calls in iOS18 that prohibits their use in the background?

jpegData(compressionQuality:) background crash on iOS18
 
 
Q