-
-
Notifications
You must be signed in to change notification settings - Fork 354
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
High RAM usage from replayd system daemon when thumbnails are enabled #4194
Comments
Hi, Thank you for sharing this. I'm afraid these are macOS internals we have no agency over. AltTab retrieves screenshots of windows, so it can show thumbnails of them. We need to screenshot often since the user needs the thumbnail to be fresh to reflect the windows. I looked at Perhaps there was a memory-leak on some version of macOS, that's been fixed on my version (15.2 (24C101))? Which macOS version are you on? Thank you |
Hi @lwouis, I was on 15.2 when I first detected this. I've recently updated to 15.3, and re-enabled the thumbnails to see if the behavior changes. I noticed that the RAM increase is lower, but still happening. For example, my I've also restarted my machine a couple of times to see if that helped, but nothing changed. I'm sure this is related to AltTab because when the thumbnails are disabled, I can leave the thumbnails on for a few days and see how the RAM usage changes over time. I'm not sure if other users are experiencing this, but many will probably not make the connection between If there's any specific testing I could do, or logs you might find helpful, please let me know! |
Hi, Thank you for your message. I've been reworking thumbnails recently. I don't think it would impact this macos internal memory leak, but it doesn't hurt to try. Could you please try out this local build and let me know? Thank you 🙇 |
@lwouis I just installed the build. I'll provide feedback in a day or two! |
@lwouis, the build you provided crashes frequently. Is the App saving logs anywhere in case you want to take a look? |
Oh that's not good! Could you please open the app from Terminal.app: Thank you |
I'm ready to release a big update with many improvement. However this crashing on your setup is worrying me. I'll wait on your feedback before releasing anything 🙇 Here's the latest build |
@lwouis I'm testing it now and will share the logs in a few hours ✌️ |
@lwouis, using the latest build you shared, there is a bug with the permissions, where it keeps saying that Accessibility isn't allowed, despite already having the permission set: The pop-up only appears when I run Launching AltTab normally, the permissions pop-up does not appear, and I can switch and focus on windows normally, meaning that Accessibility permission is working. Eventually the app crashes. I'm going to try a clean install, and see if that helps. |
@lwouis, I performed a clean install (removed the app, reset the permissions, deleted all folders and files related to AltTab, restarted MacOS), and I keep getting the same Accessibility permission error when running the debug logs. Here are all the files that I removed before performing a new installation: EDIT 1: The app keeps crashing after a few minutes. EDIT 2: Performed a clean install of the latest public release (v7.19.1) and the crashes stopped. But If I try to run the logs script, I still get the same Accessibility permissions error that I shared in my previous comment. In this situation, the app crashes and I have to manually kill the process to be able to use AltTab again. |
Hey @filipe-aparicio, When running the app through the Terminal, macOS needs permission to be granted to the Terminal, since it's the parent process. On your screenshot, I marked it with a blue arrow on the bottom right: |
Hi @filipe-aparicio, I'm holding to many improvements that I'd like to release. My only concern is the crashes you reported previously. Other people in other tickets I've fixed didn't have the issue. Here's the build I'd like to release. Could you please let me know if it works on your machine without crashing? Thank you 🙇 |
Update: please use this build instead |
@lwouis sorry I was busy for the past couple of days. I'll test this today and let you know later the results. |
Hi @filipe-aparicio, |
I was going to ask if there's some reported issues with memory usage, as AltTab itself is using almost 300MB on mine. Then I check this issue out and notice EDIT: Forgot to mention, I'm using AltTab And this is right after restarting AltTab. Is this normal amount of memory being used? |
Hi everyone, I'd like to release the new version. It contains lots of big improvements: compatibility with Stage Manager, higher resolution thumbnails, detecting windows on other Spaces from launch, performance improvements, better focus, improved localizations, bug fixes, etc. Before I released, could everyone please help QA this build? If it's working for everyone, I'll release it 🚀 Thank you 🙇 |
@lwouis Running this and killed I notice a slight lag sometimes when I first hit Alt + Tab and the list of windows show up, and I use the mouse cursor to hover between windows. Sometimes it takes a little bit to catch up with my quick movement of the mouse. After a few times like that, it seems to be faster, almost immediately response, highlighting the window thumbnail as I put the mouse cursor over it. And it seems to be always like that after I switch back and forth between my spaces (I have some app opens in fullscreen mode taking up another space). |
@lwouis, I've been running this new build for a few hours now and everything seems to be working fine (no crashes). I also started running the app in debug mode through the terminal and the logs seem normal, without any errors popping-up. It's a bit early to assess the I don't get any lag whatsoever switching windows, and the thumbnail resolution seems to be adapting better to external displays when compared with the stable release. If anything changes, I'll let you know. |
Yeah, the RAM issue is still there as well. @ngocphamm on my machine, if I stop AltTab from running (or disable the thumbnails) and restart |
Hi, Since I can't reproduce this issue on my machine, I think it's likely not an issue with AltTab. Perhaps a macOS bug that only triggers in some cases? Perhaps an interaction with another app? Perhaps an antivirus or JAMF-type software? I'm afraid that without anything else to work off of, I'll have to close this issue Thank you |
@lwouis, since I started testing this build, I've had 2 crashes. I couldn't get logs for the first one as I wasn't running the app via the terminal, but I was able to collect logs from the second crash. These are the last entries before crashing: |
Thank you for sharing this @filipe-aparicio! I think the issue is with mapping the Space of a window. It seems there is a window and we can't map its Space. This happens after a Screen Change event, so I guess the window is moved to another Space after plugging/unplugging a monitor, and we don't know about that Space yet? Could you please try out this build? Does it work when you trigger the screen event shown in your screenshot? Thank you |
AltTab (the build from yesterday) has crash twice on mine so far. I have sent the report both times after starting the app again. Hopefully that provides some insights into the issue. I will try the build from today now. Meanwhile, |
@lwouis, this build still crashes. I have 2 external monitors connected via a dock - not sure if that could be contributing to the issue. I'll try running the build via the terminal again to capture any useful logs and send them later today. |
Thank you @filipe-aparicio I release a fix. Does the latest public release work for you? If it still crashes for you, could you please share the logs? |
@lwouis I'm on the latest public release version, and I just got a crash. Clicked to send the report. |
Thank you @ngocphamm I found some crash reports on v7.20.1 on AppCenter. I think one of those is yours. It points to a crash in: Could you please try to reproduce the crash with this build, and let me know if it's gone? Thank you 🙇 |
@lwouis Sorry I'm not going to be able to test this for a few days and I'm away from the computer that had the crashes. I will when I'm back! Thanks for fixing those issues! |
I recently noticed my RAM usage increase drastically when using AltTab and after some inspection and testing, figured out that it was due to having thumbnails enabled.
After a few hours of enabling thumbnails, the replayd system process that handles screen capturing, went from using 9.7MB of RAM to >2GB. Force quitting replayd temporarily fixes the issues, but a few hours later, the RAM usage gets back to a couple of GBs.
If I disable the thumbnails and remove the screen recording permissions, replayd usage stops completely, which can be seen in the system logs using the following bash command:
log show --predicate 'process == "replayd"' --info --last 1h
As soon as re-enable the screen recording permissions and thumbnails, replayd starts producing thousands of logs in just a few minutes. A few hours later, the RAM usage starts increasing drastically again.
Im not sure if this is a bug, a memory leak, or just a side-effect of how MacOS handles the screen recording requirements for AltTab to work.
Just wanted to share this in case it's a bug that can be fixed.
The text was updated successfully, but these errors were encountered: