Thanks for being a part of WWDC25!

How did we do? We’d love to know your thoughts on this year’s conference. Take the survey here

CIContext sporadically crashes on macOS 15.4/15.5, iOS 18.4/18.5

We have some rather old code that worked for many years, but recently started to crash sporadically here:

The crash looks like this:

or

Our code is called from many threads concurrently, but as said it worked without any issues until recently.

I've found the apparently same crash on iOS at this Reddit post: https://www.reddit.com/r/iOSProgramming/comments/1kle4h4/ios_185_doesnt_fix_cicontext_rendering_crash/

Recap: we believe it started on macOS 18.4 and is still on macOS 18.5. But maybe it was already on macOS 18.3. This matches the observation in the Reddit post well.

Should we create a feedback with sysdiagnose?

Thanks! :)

Hi,

I’ve encountered the exact same crash in my project when calling: CIContext().render(...)

Just like the original post, I'm getting: Thread 4: EXC_BAD_ACCESS (code=1, address=...)

What I’ve noticed is that the crash completely disappears when I uncheck "Debug Executable" in the scheme settings. With it disabled, the app runs smoothly without any EXC_BAD_ACCESS at that line.

This suggests the crash might be related to debug-mode memory checks or internal CIContext rendering behavior.

I’ve double-checked that the CVPixelBuffer, CIImage, and CGColorSpace are all valid before rendering.

Would appreciate any insights or explanations from Apple engineers or anyone who has managed to resolve this.

Thank you!

I've been noting a sporadic crash in my apps, with completely different code, but the exact same "hash_table" crash. None of my code is listed anywhere in the backtrace.

Has anyone filed a bug about this? If so, please post your bug number.

If you don’t have a bug report, please post a crash report. See Posting a Crash Report for advice on how to do that.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

We have created feedback FB17767223 now. Here we have attached two crash-reports, as well as a sysdiagnose and CI_PRINT_TREE PDFs... When the latter was enabled we didn't get the crash though.

Thanks :)

Hello,

I am experiencing a similar crash while developing my macos app.

I've found this post: https://www.nutrient.io/blog/dynamic-linking-crash-xcode-16/.

It recommends disabling Thread Performance Checker. It seems to have an effect, wonder if it's placebo or not.

My crash was kinda inconsistent. In my app I add overlays on videos using AVVideoCompositing, and I do [CIContext render:toCVPixelBuffer:]. On 30-second videos it was fine, but failed on longer ones.

I tried disabling Thread Performance Checker and I could successfully render 2 "long" videos in a row without a crash. I wonder if it's placebo effect or if Thread Performance Checker and libRPAC have known flaws that may cause crashing.

We have created feedback FB17767223

Thanks!

It recommends disabling Thread Performance Checker. It seems to have an effect, wonder if it's placebo or not.

Ah, interesting.

So, looking at the crash reports on the above-mentioned bug it seems that crash is coming out of libRPAC.dylib. That is associated with Xcode development [1], so it’s within the bounds of possibility that disabling Thread Performance Checker would help with this.

As to the bug itself, I don’t have any info to share as to when you might see a fix, other than my general advice to retest with new builds of the OS as we seed them.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

[1] Despite the fact that the library is part of the OS, not part of Xcode.

It’s better to reply as a reply, rather than in the comments; see Quinn’s Top Ten DevForums Tips for this and other titbits.

the reddit post it was mentioned they got a crash for some users though

Yeah, I saw that too. Honestly, I’m not sure what to make of it. I’m generally skeptical about reports coming from users |-: but, if do see a crash like this that doesn’t involve Xcode, I’d love to hear about it.

The thing to note here is that, in general [1], crashes within Xcode don’t generate a crash report, so any crash report that shows this is automatically interesting.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

[1] You can detach the debugger and that’ll generate a crash report.

Same here. It might have started with iOS 18.3 though.

I’m not sure what you’re trying to convey by this screenshot, but let me clarify what I said earlier:

if [you] do see a crash like this that doesn’t involve Xcode, I’d love to hear about it.

I was hoping you’d tell me about it and include a crash report, or the number of a bug to which you’ve attached a sysdiagnose log or a crash report.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

CIContext sporadically crashes on macOS 15.4/15.5, iOS 18.4/18.5
 
 
Q