alt-tab-macos icon indicating copy to clipboard operation
alt-tab-macos copied to clipboard

Bug: AltTab hangs on load with spinning beachball over "AltTab needs some permissions"

Open acehoss opened this issue 1 year ago • 9 comments

I applied a macOS update last night, and this morning, AltTab is hanging with a permissions screen. It sees it has Accessibility permission, but needs Screen Recording permission (though I checked and this permission is also already granted). AltTab was working fine before the restart to apply the update.

Image

AltTab not responding in Activity Monitor

Image

I notice that CleanShot is hanging as well after the update, I had to go mess with keyboard shortcuts to get this working. I suspect Apple changed something under the hood with permissions in this update.

AltTab permissions freeze spindump.txt

  • AltTab version: 7.19.1
  • macOS version: 15.3
  • Other relevant info:
    • AltTab launched at login and from Spotlight (after force quit with Activity Monitor)
    • external keyboard
    • single external monitor on MacBook Pro M3 in clamshell mode
    • running Aerospace

acehoss avatar Feb 07 '25 12:02 acehoss

Image

I tried removing the Screen Recording permission (using the - button at the bottom of the screen) and restarting AltTab. When it reopened, the system dialog appeared over AltTab's permission screen. I re-enabled the permission and! No, it didn't fix it. AltTab was back to hanging after re-applying the permission and restarting.

acehoss avatar Feb 07 '25 12:02 acehoss

Hi,

Thank you for sharing this issue

How was AltTab launched? Did you launch it, or is it launched at login by the OS? I'm asking because if you would open AltTab from Terminal.app for example, then Terminal needs the permissions, since it's the parent process; not AltTab.

Looking at the spindump, I think the app is stuck waiting on the OS call CGDisplayStream. It's possible that Apple introduced a regression on this API. There is little we can do if suddenly the API hangs instead of returning.

Thank you

lwouis avatar Feb 07 '25 14:02 lwouis

AltTab was initially launched at login. Then I killed it with Activity Monitor and relaunched it from Spotlight.

acehoss avatar Feb 07 '25 16:02 acehoss

I am on MacOS 15.1.1 and am experiencing something similar. AltTab frequently hangs. Yesterday I think it managed to hang my entire system (but that could have been something else).

Again not sure, but I think it may have begun when I started Digital Color Meter.app.

Image

I will run without that a while and see if the hangs stopp happening.

Some other symptoms are that the AltTab menu items take a long time to do their thing. Selecting About AltTab can leave the menu half transparent for several seconds before showing the info. An when I have experienced a hang glitch quitting AltTab gives me this:

Image

Even though it has the permissions:

Image Image

Let me know if I can help investigate this more on my machine in some way.

PEZ avatar Feb 13 '25 11:02 PEZ

I think it may have begun when I started Digital Color Meter.app.

Nope. I have it with or without Digital Color Meter.app running.

PEZ avatar Feb 13 '25 12:02 PEZ

Hi @PEZ,

Are you on the latest version? We fixed some hanging recently in a release. More performance improvements are coming soon also.

Regarding your last 3 screenshots, this is macOS behavior. MacOS nags users even when the permissions are given. For some users, they nag even more: #3973

Thank you

lwouis avatar Feb 13 '25 14:02 lwouis

I'm on 7.19.1 which should be latest. Just so it is not confused: it is not about performance. It is complete hangs, often with the infamous beachball (which I have not seen in years, until AltTab started like this).

I included the permission screenshots because maybe it was clues to what's going on. It is not nagging me at all, only happens when I restart AltTab because the hangs are too disruptive.

It is pretty new. Maybe a few days. I am pretty sure it didn't start happening as long ago as when 7.19.1 was released. Probably something else is new on my machine that triggers it, but I install stuff all the time so no clue. Started using VS Code Insiders a few days ago.

Anyway, if you think I can see something in some log or whatever, let me know. I am ready to spend some time on it. AltTab is dear to me.

PEZ avatar Feb 13 '25 15:02 PEZ

Thank you @PEZ It would help if you could spindump AltTab when you notice it hang. You could share the spindump here, and it may help us locate the root cause.

lwouis avatar Feb 13 '25 15:02 lwouis

It stopped happening, so I am no again suspecting Digital Color Meter a bit. May choose to start it to see if the problems return. 😄

PEZ avatar Feb 18 '25 18:02 PEZ