All Posts by Date or last 15, 30, 90 or 180 days.

As an Amazon Associate I earn from qualifying purchases @AMAZON

Designed for the most demanding needs of photographers and videographers.
Connect and charge all of your devices through a single Thunderbolt or USB-C port.

More OS X Open-File Bugs: QuickLookSatellite, Apple Mail, Ghost Applications, Trash Will Not Empty

A few days ago, I wrote about a nasty bug in QuickLookSatellite that can bring the system to its knees, requiring a force kill of QuickLookSatellite or a logout or reboot. That page has now been updated with command line alternatives that make it instant to terminate the offending QuickLookSatellite processes.

Apple Mail fails to close files too

Apple Mail has bugs in failing to close open files as well: send an image in an email, then put the file in the trash. Even hours after the email has been sent, the file(s) may remain open, so the Trash cannot be emptied. Strangely, this did/does not happen when tested with 120 images in an email. So it’s a behavior that apparently depends on something.

Here is how to see open jpg files in Apple Mail (in Terminal). These two files are in the trash. Mail has long since sent the message, but it has failed to close the files, so attempting to empty the trash produces an error alert for every such open file—quite a nuisance over the course of the day. But in this case the solution is simple: quit Apple Mail and the files get closed. While only a nuisance since there is an easy workaround, it is yet more Apple Core Rot.

diglloydMP:DIGLLOYD lloyd$ lsof | grep Mail | grep jpg
Mail 23447 lloyd txt 885100 23720017 /Users/lloyd/.Trash/Sony28_135.jpg
Mail 23447 lloyd txt 889332 23720381 /Users/lloyd/.Trash/2-frame-f13.jpg

Ghost applications keeping files open

The case of “ghost applications” seems to be a feature, not a bug, that is, in the ghastly way Apple fails to consider side effects and implications that make the alleged benefits to some a bitter brew for others.

Chris K writes:

Not just files, but programs. I have noticed this problem for the last couple iterations of OS X. It seems all Apple programs themselves (Preview, Pages, etc.) remain “open” after the last file has closed, and the icon no longer appears in the dock.

When I try to empty the trash or do other functions, I first have to use the CMD+OPT+ESC to open the “Force Quit Applications” panel, force them shut. Perhaps the intention is to quickly hot load new files, making a computer feel zippy fast.

In reality, quite the opposite, a new time suck has been created by requiring my time. Not only a frustrating waste of time, but also a waste of CPU / RAM.

MPG: this seems to be a distinctly different case: applications that the user has quit, but remain open (vs open applications keeping open files long since not needed). However it’s possible some underlying lazy* garbage collection algorithm is responsible for both at some level.

MPG also regularly observes ghost applications in Activity Monitor and has seen these trash-emptying problems, particularly with Apple Preview—PDFs in the trash remain open long after quitting Preview.

A guess: ghost applications could be related the Power Nap feature (or some underlying facility that it requires). Since Power Nap is off on all MPG machines, that would not explain it—but that presumes Power Nap is not buggy like the rest of OS X.

* “Lazy” as used here is computer programming terminology, not a pejorative.

Power Nap in OS X Energy Saver Preferences
Is it responsible for ghost applications?

Arne E writes:

I can confirm that the still-open Mail sent attachment has been a problem for a long time. I remember having to deal with it on Yosemite and even Snow Leopard, and to deal with it is very easy:

diglloydMP:MPG lloyd$ rm -rf /Volumes/*/.Trashes/*/*

No sudo needed… it just sits in one of my BitBar plugins as "Force Empty Local Trash". No need to quit Mail; force empty works while Mail is still running.

MPG: Terminal is a useful tool indeed. Another way to do it for a few files is to type 'rm ' (without the quotes and with the following space), then drag any problem files into the terminal window, which will insert the file names with path. Press RETURN and they’re gone.

View all handpicked deals...

Seagate 22TB IronWolf Pro 7200 rpm SATA III 3.5" Internal NAS HDD (CMR)
$500 $400
SAVE $100

diglloyd.com | Terms of Use | PRIVACY POLICY
Contact | About Lloyd Chambers | Consulting | Photo Tours
Mailing Lists | RSS Feeds | X.com/diglloyd
Copyright © 2020 diglloyd Inc, all rights reserved.
Display info: __RETINA_INFO_STATUS__