Phocus 4.1 Ultra HDR Export Bug: Memory Leak Can Cause System Crash
Phocus 4.1 leaks ~50 MB per Ultra HDR export, eventually crashing your system. Here's what causes it and how to work around it.
Table of Contents
So I'd been playing around with Phocus 4.1 since I discovered it was available, trying to figure out what they had fixed, but not noted in their release notes. There were some memory leakages in v4.0.1 which I'd already reported, which were now moot given the new version seemed to have remedied them.
Undaunted thought, with some creative testing, I managed to get Phocus 4.1 to consume 94 GB of memory before macOS decided enough was enough.
Up to that point it had been bravely paging out to the swap file, but obviously hit a tipping point. What was I doing to get it to do this? I'd found memory leak in the Ultra HDR export pipeline that accumulated with every image and never released, even after hours of idle time. I just kept doing UltraHDR exports until everything came to a complete stop.
If you're batch exporting Ultra HDR JPEGs in Phocus 4.1, or even just exporting Ultra HDR JPEGs at all, you need to know about this.
A note on support: This post represents my personal exploration and testing, not official technical support or guidance from Hasselblad. If you need assistance with your Hasselblad equipment, please contact Hasselblad directly: customersupport@hasselblad.com for global support, support.us@hasselblad.com for the Americas, or visit hasselblad.com/support for regional options.
How the Phocus 4.1 Memory Leak Works
Every Ultra HDR export leaks approximately 50-55 MB of memory. The Ultra HDR encoder allocates buffers for the conversion but never deallocates them. This memory wasn't released when the export completed, wasn't released during idle time, and wasn't released until I quit Phocus entirely.
Export 30 images? That's 1.5 GB gone. Export 500 images from a wedding shoot? You've leaked 25+ GB.
Discovering the Leak
I first noticed something was wrong after exporting a batch of 30 3FR files to Ultra HDR. Phocus was sitting at 12.5 GB (not unusual for modest editing in Phocus, as it turns out) but it stayed there long after the export finished. Ten minutes idle. An hour idle. No change.
So I pushed it: 471 more exports. Because why not, right!
The Numbers
Ultra HDR Exports | Memory Consumed | System Impact |
30 | ~12 GB | Normal operation |
100 | ~15 GB | Phocus now lagging |
471 | ~51 GB | Heavy swap usage |
942 | ~94 GB | System freeze |
The leak scaled linearly. Every export added to the pile, and nothing cleared it.
The Overnight Test
After hitting 51 GB, I left Phocus running overnight to see if it would eventually clean up. I monitored memory every hour for nine hours.
Result: zero bytes released. The footprint stayed locked at 51.2 GB from 9 PM to 6 AM. The leaked memory was permanent until quitting the application.
What Happened When Memory Ran Out
The next morning, just because I'm from an engineering background and like testing limits, I exported another batch starting from that bloated 51 GB baseline. At 94 GB, macOS threw up the "Your system has run out of application memory" dialog and paused every running application. Phocus was consuming 90x more memory than any other app on the system!
I'll be the first to admit that this is an unlikely edge case. Let's be honest, you'd need a lot of shots to get 942 HDR images you want to export as keepers. It was more about the principle, and curiosity about seeing just how far macOS would let it go.
Force-quitting Phocus was the only recovery option.
How Much RAM Does Phocus 4.1 Actually Need?
The Phocus 4.1 readme specifies 8 GB minimum RAM with 16 GB recommended. You don't need to be particularly good at mathematics to realize that in practice, these numbers are somewhat optimistic.
During my testing, I tracked memory usage through normal editing workflows - importing images, scrolling through thumbnails, clicking to generate previews, applying edits. Here's what I saw:
Activity | Memory Usage |
Phocus launch | ~875 MB |
After importing 467 images | 7.5 GB |
Click first image (preview) | 9.6 GB |
Click second image | 10.6 GB |
Normal editing workflow | 10-12 GB stable |
HNNR/HNCS operations | Up to 17.8 GB temporary peak |
The cache did seem to be working correctly - once it filled to what appeared to be a 10-12 GB working set, it stabilized there rather than growing unbounded. But that baseline was already above the stated 8 GB minimum.
On an 8 GB system
You'll likely hit swap the moment you start clicking through images. Basic operations will be sluggish. The "8 GB minimum" lets you install and launch Phocus, but not use it productively. And that's ignoring memory required by the OS, even if Phocus is the only app you have open.
On a 16 GB system
After macOS takes its share (kernel, system processes, wired memory that can't be swapped), you're left with roughly 12-13 GB for applications. With Phocus's 10-12 GB working set, you're already running at or near capacity during normal editing - before any Ultra HDR exports. macOS will manage this through memory compression and preemptive swapping, but you're operating with essentially zero margin. Any Ultra HDR exports will immediately add memory pressure.
If you're on 16 GB: Keep Activity Monitor open during Ultra HDR exports. Restart the moment you see memory pressure climb or compression ratios spike. Until Hasselblad patches this bug, 16 GB users are probably starting from a deficit.
My recommendation: 16 GB is the realistic minimum for Phocus 4.1. 24 GB or more is comfortable for larger image sets and HNNR/HNCS processing.
The Workaround
Until Hasselblad patches this, restart Phocus between Ultra HDR export batches.
Conservative limits before restart:
System RAM | Safe Ultra HDR Exports |
16 GB | 50-100 |
32 GB | 150-200 |
48 GB | 300-400 |
64 GB | 500-600 |
Monitor Activity Monitor during exports. When Phocus approaches 80% of your physical RAM, quit and relaunch before continuing.
Note: This leak only affects Ultra HDR exports. Standard JPEG and TIFF exports don't seem to exhibit this behavior.
Technical Details
For those interested: macOS profiling tools (leaks, heap) identified the culprit as uhdr_encoder_private objects creating ROOT CYCLE leaks (circular references that prevent deallocation). Each export spawned new encoder instances that were never cleaned up.
I've submitted a detailed bug report to Hasselblad with profiling data, overnight monitoring logs, and reproduction steps.
Summary
Phocus 4.1 has a critical memory leak in Ultra HDR export. Each image leaks ~50 MB permanently. Large batch exports will eventually crash your system. Restart Phocus between batches until a fix arrives.
Tested on Phocus 4.1, macOS Tahoe 26.2, Apple M4 Pro, 48 GB RAM. Test files: 467 3FR images from X2D II.
The Tech Behind the Frame Newsletter
Join the newsletter to receive the latest updates in your inbox.