-
-
Notifications
You must be signed in to change notification settings - Fork 348
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AltTab closes on its own #704
Comments
When you restart the app, do you get the prompt to send a crash report? Did you press yes? If you didn't get the prompt, could you please manually upload the crash report(s) here in a zip? You can find then in Console.app in Crash Reports on the left sidebar. Please also note that Big Sur is not officially supported. By that i mean that it was never tested by me since i no longer update macOS versions in the first months of a new major release. Thank you! |
No, I do not get the option to send a crash report, and they do not appear in Console.app either. How strange - perhaps "crash" isn't the right term then, but the app does quit for no reason about 2-3 times a day. Sorry I couldn't be of more help, but do let me know if there's anything else I can do to help you debug this. I understand that there's no official support yet hopefully it will come soon as I really like the app :). Thanks and all the best! |
That's really weird. AltTab shouldn't stop without crashing. How is that possible? Maybe some permission issue, or a new feature of the OS similar to Sudden Termination, and not opt-in? Weird stuff. If you can, try to notice the patterns when it does it, like is it when you plug an external display, after waking from sleep, etc |
Looking back on it and doing a few experiments, it seems to do it when I turn on my 2 external displays in the morning (don't know if exactly then or sometime during the night). I haven't had the chance to use my macbook much without external displays. Also during periods of more intense activity, such as opening multiple (10+) browser tabs, running some rather CPU intensive code etc. So it might have something to do with some sort of automatic unused app cleanup, I guess. My free RAM never gets below 3 GB (i have 16). I'm new to macs, whats Sudden Termination and where can I check if it's active? I was able to reproduce it twice in the last 4 hours, but I still cannot do it on demand. A heavier workload seems to favor it, but I can't tell exactly. |
During the time when it's crashed, is Alt-Tab using CPU? You can check by going to activity monitor, or using an app like IStatMenus to see what apps are using how much CPU during that particular moment. Are you able to open the preferences panel from the menubar, or is the entire app crashed? I've had an issue where under enormous workload, like rendering a video file in Premiere Pro, or building a particularly heavy app in Android Studio, but it's always loaded after waiting 5 or so seconds, and almost never occurs when my CPU usage is below 90%. |
No, it's just completely gone, not responding to alt+tab, not showing up in the menubar or activity monitor. I restart it with cmd+space > altTab.app. The "heavier workloads" i mentioned don't get my CPU that high, I haven't noticed hangs like that. |
I have the same issue after updating to Big Sur. I open AltTab, use it normally and after a while it doesn't work anymore and the process does not show up in Activity Monitor, and I have to start it again. There is no crash log in Console.app either. |
Running AltTab through terminal (
It seems that it's always I cannot tell what was the last action it did because it runs well for several hours and I don't notice immediately when it crashes. |
Same issue here, crashes, no logs, i don't have chrome installed (use brave though) I've been running via terminal like @ibrahimabdo did and it crashed with the same message.
Seeing the log it seems to have crashed after returning from sleep. I had moonlight running before getting it to sleep so maybe the process that was looking for was a moonlight window (since it closes it when network goes down on sleep) |
Same here on Big Sur. Very annoying :< |
One way to make this issue less noticeable until is fixed is to run AltTab from terminal in a loop: This way, when it crashes it will start again. |
Thanks @ibrahimabdo for the creative workaround! I'm overwhelmed with work currently. I hope soon to be able to download BigSur in a VM, and start seeing what I get there. @PolCPP mentioned a potential cause with sleep/wake. Can anyone confirm if this plays a role or not? |
Hi guys, this might be related: I've noticed that since upgrading to macOS 11.x (now on 11.1), the app seems to always quit while the mac is sleeping overnight. I can't reproduce this with short sleeps during the day, but every morning I have to start the app again. No crash reports. It has also happened to me with Scroll Reverser, but there it happens only every couple of days. Maybe it's the OS that's "quitting" some apps for some arcane reason? |
It seems to be some change introduced by Big Sur that has to do with terminating apps silently. I haven't read any docs about Big Sur yet. If someone has a link to a migration guide that would highlight this breaking change for instance, please share it here and i'll read it 👍 |
I found this in the AppKit release notes:
It doesn't seem like it should impact, but maybe they did other changes to Sudden Termination or Automatic Termination. Maybe fixing this issue is as easy as forcing them to false in the info.plist? |
Interesting read. The complexity of all the different state an app can be in, coupled with poor documentation from Apple on those features, and importantly, on their evolution, makes it difficult to evaluate what's at play for people reporting issues in this ticket. I think I'll try setting this in the Info.plist: <key>NSSupportsAutomaticTermination</key>
<string>false</string> It's supposed to be Just to recap the state of AltTab regarding these OS features that may be a problem here:
|
I've been running that build it since you posted it and it seems stable, no crashes yet. Will keep it running a few days more just in case. Edit actually it's been running smoother too, not sure if related to that fix or some other commits applied since the last release Edit 2 i had it crash just now. So it took me a full day for it to crash.. |
I tested the local build too in the past 2 days and it is still crashing like before, unfortunately. So it's not that. In terminal it's the same error as before:
|
Apple as usual is not helping us much here with this error. Anyone managed to get clear reproduction steps? I got Big Sur running in a VM, so I could test AltTab there. Everything works nice for me. Many people here mentioned running the app through the Terminal. I tried it, and I had to add the 2 system permissions to Terminal.app. I assume people did that. Then it worked. I'm going to keep it running and see if I get the error. Some things you could do to help:
|
@zakroma @PolCPP @ibrahimabdo How are you running getting the error in the Terminal? When I run AltTab in the terminal the way you showed, it detached itself after a while. That is, the parent process stops being |
@lwouis I didn't do anything special in the terminal. Just opened it and ran the command. Even now, after days of running (and some automatically restarts) I can see the output there. To answer your questions from the previous message:
|
I got a potential hypothesis of what could be happening. Every 5s, the app checks the state of System Permissions (Accessibility and Screen Recording). The Screen Recording permission however, was introduced in 10.15, and there is no public API to check if it's granted or not. So I used a workaround. It's possible that this workaround fails in exotic scenarios, creating this situation where AltTab exits on his own without crashing. What's not explained in this hypothesis is why the code doesn't restart though, as this scenario is supposed to trigger a restart, not a simple quit. And when I stress test it manually many time by removing the permission as it's running, it successfully restarts. I made a local build which logs extra lines if the check every 5s fails. Could you guys try this build on your machine? Run it through the Terminal, so you see the logs. When it stops, please share the end of the logs here. Thanks! |
@lwouis I've run it this morning from xcode to see if i could catch something extra and it crashed pair of minutes ago, i'm pretty sure that error doesn't fire up when you run it from the terminal. It crashed just after those 4 lines without complaining
(This is unrelated to the Apple silicon thing, ran it on a 16 inch mbp) |
You have run what in XCode? The master branch? Could you try running the build i shared above? It has extra log lines. in your logs, i'm wondering what on Earth this is:
Also it would seem that it crashed after you focused AltTab preferences window and move it. Do you remember doing that? |
Yeah, it was master. I'm pretty sure that the settings window was closed but maybe i had it open on the background since i copied the settings to the new mac. Was writing some docs so i was switching between iterm, vs code, brave, and slack. Edit: I just set it to run. |
Added an extra one instead of editing so you get an email notification. It finally crashed. Does this give you any additional info?
|
@PolCPP wow very cool! It seems that this was indeed the issue in the end: the app mis-detecting that the Screen Recording permission is not granted, and quitting. I think the next step now is that I find a heuristic that still detects the Screen Recording permission status, without the false negatives. Another thing would be to try and understand why the app is not restarting for you. Something may be wrong with the restart code. |
Wow back in the day I implemented something based on this StackOverflow thread. I see that today they have found an actual public API that checks it. I guess official documentation from Apple didn't help with discoverability... I'll try this out. I'm worried that it could be missing on early minor versions of macOS 10.15 though. Not easy to tell if it's safe for these users Update: it crashes on my machine (running 10.15.7)
It looks like the API was added recently, in macOS 11. I see it in the 11.1 SDK but not in the 10.15 SDK. I think what this means is that it's a newly exposed API, that can be used in targets from 10.15 onwards. It's a weird thing, and I don't know if we can trust it. I'm going to try to compile from within a macOS 11 VM and see if that runs on my system. Man the hoops we have to jump through with Apple... |
Actually it restarted found by chance that the terminal started one was dead. |
But this ticket is about AltTab closing on its own, which implies it wouldn't restart but remain closed. Does it usually restart or stay closed? Maybe the issue is a mix of false-positive permission checks triggering a restart + the restart code failing to restart sometimes? |
@lwouis Actually it just crashed on me on the other mac without restart. So i guess i was lucky and it autorestarted that time. |
I was able to build on macOS 11 and try the new I'm going to try and use this alternative workaround instead of the one I'm using currently. Hopefully it doesn't produce false negatives like the current one. In my tests it's behaving well. I've also updated the restart code, so that hopefully it always succeeds to restart instead of only closing. @PolCPP @MuhammedZakir @ibrahimabdo @ivdorelian @eischet Here is a local build with both fixes. Could you please try it out and let me know if it fixes the issue from this ticket? Hopefully it's now very stable |
Thanks, I'm running the local build now. No issues yet... You seem to have fixed the (unrelated, I think) issue where the IntelliJ cursor disappears after pressing Ctrl-Enter, too, which is great. :-) |
This fix and a few others will be released in the next public release. I've had them on the back-burner for a while. I was waiting for the author of #727 (comment) to test the ticket to release the Jetbrains fix. |
Just came back to the office and woke up my old Mac Pro: Alt-Tab is still running. I think that's the first time since "upgrading" to Big Sur. Thank you! Update: one day later, it's still working. |
So far so good, with the latest build it didn't crashed anymore and it's 2 days already. Will report back in case it will. |
Excellent news! I'll make a public release after the weekend then! Please let me know around that time if it's still working great 👍 |
AltTab survived the weekend, and the whole week. Not a single crash for me. 👍 |
Same here: not a single issue yet... the app has been running fine for 5 days in a row. |
Cool! I'll make a public release then 👍 |
# [6.13.0](v6.12.0...v6.13.0) (2021-01-25) ### Bug Fixes * app would sometimes quit while in the background (closes [#704](#704)) ([d621ce5](d621ce5)) * disable standard tab detection for all JetBrains apps ([25343ea](25343ea)), closes [#716](#716) * prevent macos 11 from terminating alt-tab randomly ([2447140](2447140)) * restarting the app would sometimes fail to start again ([56d47fc](56d47fc)) * show window controls, even when mouse hover option is disabled ([c256933](c256933)) ### Features * add app category meta-data ([96572a8](96572a8)) * add swedish and czech localizations ([00e95d6](00e95d6)) * add ukrainian localization ([e576ca1](e576ca1)) * display windows partially on screen correctly (closes [#727](#727)) ([2f92936](2f92936)) * show window partially on-screen (closes [#727](#727)) ([b121162](b121162)) * update japanese, turkish, chinese localizations ([7226c25](7226c25))
This issue was opened by a bot after a user submitted feedback through the in-app form.
From: [email protected]
Message:
Debug profile
The text was updated successfully, but these errors were encountered: