macOS unit tests leave zombie apps in Command-Tab list

I've been running my unit tests for a macOS app a lot. Every now and then it leaves a zombie running. I wouldn't care about the "Z" process in "ps ax" output, but it actually leaves an icon in the list of app icons that you see when you hit Command-Tab. These gradually accumulate and cannot be killed. It appears I need to restart my laptop to get rid of them. If anyone else has seen this and has a trick to get rid of them, please let me know.

Well, that’s annoying. I do not, alas, have any suggestions about how to get rid of these zombies )-: but I’d really appreciate you filing a bug about this.

Please post your bug number, just for the record.

It’s curious that this is not a more widely reported problem. I regularly run unit tests associated with various macOS app targets and I’ve not seen this. Do you know whether the problem tracks your tests or your Mac? If you run your tests on a completely separate machine (I use a VM for this sort of testing), does it exhibit the problem? Alternatively, if you create a new test project and run unit tests against that, does it exhibit the problem?

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Okay, thanks for the response. I've been waiting on filing a bug, to see if any patterns emerge that would allow me to create a reproducible case. I don't see a pattern yet, so maybe I'll just file something soon and let the feedback app collect its sysdiagnose or whatever it does. Your questions about the test project or a different Mac are difficult to answer at the moment. I'm traveling and only have one laptop. I may try a test project later, but it takes a long time for the zombies to appear. I have 2 now, after maybe a day or two of work.


I could be related to my laptop. It's as old as you can get and still run Catalina (a 2012 MacBook Pro), and I get a fair amount of annoying rainbow wheels throughout the day. I had a 2011 MacBook Pro that did the same thing, so I figured it was just the joys of aging hardware and fading OS support. Probably most developers have newer machines. 🙂

@rnikander, do you still see the issue?


I noticed a similar problem, and reported it in the Core OS section of the forums: https://forums.developer.apple.com/message/423193#423193

I haven't been dealing with it lately because I've been working on something else and not running those unit tests every day.

macOS unit tests leave zombie apps in Command-Tab list
 
 
Q