Skip to content
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

Can't exit screensaver without using force quit. #828

Closed
6 tasks done
BorBorBor opened this issue Jul 6, 2019 · 89 comments
Closed
6 tasks done

Can't exit screensaver without using force quit. #828

BorBorBor opened this issue Jul 6, 2019 · 89 comments

Comments

@BorBorBor
Copy link

BorBorBor commented Jul 6, 2019

General troubleshooting tips

Before logging an issue please check that:

If none of this fixes your issue, tell us about the problem you are experiencing or the feature you'd like to request.

Required information

In order to help us sort your issue, we ask that you provide the following information:

  • Mac model: MacBook Pro (13-inch, 2018, Four Thunderbolt 3 Ports)
  • macOS version: 10.14.4 (18E226)
  • Monitor setup: using internal + external screen (PHL 272B8Q 27-inch (2560 x 1440)). Screensaver is set to only show on external screen.

If appropriate, please enable Debug mode and Log to disk in Advanced tab and replicate your bug, then attach the AerialLog.txt file (You can access this file through the Advanced tab).

Description of issue / Feature request

Seemingly at random the screensaver gets 'stuck' and I cannot close it without resorting to force quit (cmd-opt-shift-esc). The screensaver continues to play and when I move the mouse I actually see the mouse move on top of the video. Cmd-tab or similar do not work either.

The issue appears randomly every few days, otherwise it exits normally. I am not sure why it happens those times and have not managed to reproduce it, which is why the log is missing; it just happened again but might as well take a while before I see it again.

It seems similar to the (closed) issue #51, but I do not have the options set like in that ticket.

@glouel
Copy link
Collaborator

glouel commented Jul 6, 2019

Hi @BorBorBor

Can you clarify which version of Aerial you use ? You may want to try the latest beta if you haven't.

Can you tell me also if you have right arrow to skip enabled or not ? And if you tried enabling/disabling it ?

In general, it's the system that kills Aerial when you press a key, not the other way around. It looks like some things changed in 10.14.4 with some specific settings in mission control. You can have a look at this thread and particularly this post : #768 (comment)

@BorBorBor
Copy link
Author

Hey @glouel, this is on version 1.5.0. I had the right arrow on, but I have changed it now.

Settings are the same in the comment you link. The issue is not exactly the same one, since the poster of that thread can quit with the mouse and I cannot.

Something to maybe remark is that I have password / touch ID turned on for disabling the screen saver.

@glouel
Copy link
Collaborator

glouel commented Jul 8, 2019

@BorBorBor
Indeed, I didn't catch that mouse didn't help, sorry. So probably not the "right key" thing, we don't intercept mouse presses.

May I suggest you disable "Auto install updates while the screen saver runs" in Advanced (it's enabled by default). Some people seem to see some misbehaving because of that option (which is weird knowing 1.5.0 is the latest available in non beta form), perhaps that could be it too ? I'm refering to that long thread #814

As best I can tell, password to go out of screensaver may not interact well with what I do with Sparkle. So let me know if that one helps.

@BorBorBor
Copy link
Author

Hi @glouel, thanks again for replying. I've disabled that 'auto install' option and see whether it disappears. It is hard to know if it fully worked since the issue does not happen all the time, but I'll let you know if it seems gone.

Password for exiting has been on for me since I have installed Aerial more than 2 years ago, and I would rather not disable it as I need to lock my computer for security reasons. So I'll try that later if it is really necessary.

@glouel
Copy link
Collaborator

glouel commented Jul 8, 2019

Ok the fact you've been using for 2+ years make it more likely it's the Sparkle auto update thing misbehaving (introduced in 1.4.8). Just keep me posted in a bit if you think it fixes the issue (or if it does not) and we'll see what we can do next. Thanks

@glouel
Copy link
Collaborator

glouel commented Jul 15, 2019

@BorBorBor by any chance, are you using Little Snitch or another firewall ? The (slightly) related issue regarding Sparkle was linked to Little Snitch not having the correct rule set for the background update.

My guess is that Little Snitch (or your firewall) may try to pop a window to ask if you want to allow the connection and that grabs the focus from system, which in turn makes it impossible for system to pass the keystroke to us.

Disabling "Auto install updates while the screen saver runs" in Advanced, as you did, should have done the trick for you already (as long as your videos were cached, if they weren't, probably had the same issue on trying to download a new video).

@BorBorBor
Copy link
Author

Hey @glouel, I was offline for a few weeks (as one does in the summer ;-)).

No, I do not use a firewall other than the default macOS one. I do use the app AntiRSI which gives me a popup to take a work break every once in a while, so that might be it, but I have also been using that app consistently for years so I would also not imagine so.

Because I did not use my computer a lot the past time I can't say if the issue is remedied by turning off the updates or not.

@glouel
Copy link
Collaborator

glouel commented Jul 27, 2019

@BorBorBor no worries, please let me know in a few days if disabling updates fixed it or not.

Regarding AntiRSI, one question, do you happen sometimes to see a popup when going out of the screensaver from it ?

There has been some subtle changes regarding screensavers in 10.14.4, my guess is they started to clamp some things in preparation of the big clamp that is Catalina. It's quite possible that some new interaction came out of it when a screensaver tries to grab the keyboard (that's no longer allowed in Catalina right now, on top of everything else with the new sandbox we have to live in).

@BorBorBor
Copy link
Author

@glouel I just got an AntiRSI popup behind the screensaver, and this did not lead to the problem. As of now I haven't seen (or managed to reproduce) the issue with updates disabled.

@glouel
Copy link
Collaborator

glouel commented Jul 30, 2019

@BorBorBor this is intriguing. Still waiting on some more feedback but what I get so far from different people is:

  • nothing popups, with updates = OK
  • something popups, with updates = NOT OK
  • something popups, no updates = OK

So maybe there's a collision of focus loss with updates and a popup. In your case, I'd suggest you keep updates disabled, if that's ok, I may ask you to test something else in the future. I'm still waiting for what will happen on Catalina to get a better idea of where things are going. It's possible that the interception of key we do (right arrow to skip) plays an indirect role into this, and I may have to remove that code entirely which may ends up fixing this.

Bit of a headscratcher, thanks for the feedback and keep an eye on next beta or the one after that where I'll try something around this.

@BorBorBor
Copy link
Author

@glouel Thanks for the feedback. Yeah, it is mysterious. I'll let you know if I discover something new, please give me a sign if you need me to test anything.

@amiantos
Copy link

amiantos commented Aug 21, 2019

I think I have this issue with my own Swift screensaver (Life Saver) and it annoys the heck out of me. My screensaver has no control options. The way it presents for me is that I lose all ability to get the password prompt to come up.

I come back to my PC, and no keyboard presses or mouse clicks will get the password prompt to come up. I don't believe I can see the mouse either. What brings the password up on my MacBooks is if I hit the power button... this will bring the password prompt up immediately. Also, if my MacBook is in clam-shell mode with a bluetooth keyboard attached (no access to power button), I have to open my MacBook screen for a second, then the screensaver seems to restart itself and the password prompt will come up.

I'm probably not going to be much help, I have no idea why it happens, but it happens so frequently and regularly to me that I imagine it must be really annoying for other people, but no one has mentioned it, even close friends who I know use the screensaver. I've thought it was just me... but it's so annoying, and it happens on both of my computers. (It didn't used to happen when I was using ElectricSheep.)

@glouel
Copy link
Collaborator

glouel commented Aug 21, 2019

I think I have this issue with my own Swift screensaver (Life Saver) and it annoys the heck out of me. My screensaver has no control options. The way it presents for me is that I lose all ability to get the password prompt to come up.

I come back to my PC, and no keyboard presses or mouse clicks will get the password prompt to come up. I don't believe I can see the mouse either. What brings the password up on my MacBooks is if I hit the power button... this will bring the password prompt up immediately. Also, if my MacBook is in clam-shell mode with a bluetooth keyboard attached (no access to power button), I have to open my MacBook screen for a second, then the screensaver seems to restart itself and the password prompt will come up.

I'm probably not going to be much help, I have no idea why it happens, but it happens so frequently and regularly to me that I imagine it must be really annoying for other people, but no one has mentioned it, even close friends who I know use the screensaver. I've thought it was just me... but it's so annoying, and it happens on both of my computers. (It didn't used to happen when I was using ElectricSheep.)

Hey @amiantos

Thanks for chiming in ! Quick question, do you intercept keypresses with your screensaver ? It seems to me that those reports I do get started around the time I added the ability to press the arrow key to skip.

The exact conditions when the bug happen are a bit more complex, usually there's some focus conflict with a background app (like Little Snitch or AntiRSI here), and it seems the latest point updates of 10.14 made things worse by sometimes stealing focus themselves.

With Catalina, you can no longer intercept keypresses, so I may have to take down that bit of code in a further update anyway. But you might want to check that on your end and see if it helps (you need to comment out the code as you can't conditionally intercept keypresses, sadly) ?

@amiantos
Copy link

As far as I know, Life Saver does not intercept keypresses, there's no interactivity in the screensaver at all. I also don't believe I have any third party apps that would steal focus... very peculiar! How does it feel to be the most knowledgable person about screensaver development?? Hehe :)

@BorBorBor
Copy link
Author

Hey people,

The exact conditions when the bug happen are a bit more complex, usually there's some focus conflict with a background app (like Little Snitch or AntiRSI here), and it seems the latest point updates of 10.14 made things worse by sometimes stealing focus themselves.

I must say that after disabling the updater I haven't had the problem anymore, while I have been using the screensaver (+ AntiRSI) consistently. So I think the issue (at least the issue I was experiencing) was not caused by the focus conflict.

@glouel
Copy link
Collaborator

glouel commented Aug 21, 2019

Hey people,

The exact conditions when the bug happen are a bit more complex, usually there's some focus conflict with a background app (like Little Snitch or AntiRSI here), and it seems the latest point updates of 10.14 made things worse by sometimes stealing focus themselves.

I must say that after disabling the updater I haven't had the problem anymore, while I have been using the screensaver (+ AntiRSI) consistently. So I think the issue (at least the issue I was experiencing) was not caused by the focus conflict.

@BorBorBor

Interesting, glad to hear that disabling updates worked for you. My understanding in your case is that Sparkle which I use for auto updates may make Aerial lose focus on some systems but not all (when another app that may steal focus is involved). Glad to hear that fixed, hopefully I can find a better way to handle auto updates then.

As far as I know, Life Saver does not intercept keypresses, there's no interactivity in the screensaver at all. I also don't believe I have any third party apps that would steal focus... very peculiar!

I guess you don't use Sparkle either ? I'd suggest you look at this post here : #768 (comment) , there's a link to a gist with a script that tells you who has focus. Might be interesting for you to see what is happening when your screensaver loses focus.

How does it feel to be the most knowledgable person about screensaver development?? Hehe :)

Haha, I guess that's not a very marketable skill ;) The whole process should probably be less painful that it is now though, and I don't have high hopes for Catalina...

@glouel
Copy link
Collaborator

glouel commented Aug 21, 2019

@amiantos by the way on the same thread, check this comment, there's a bug in Mojave with some settings of mission control that I had completely forgotten about : #768 (comment)

That may be the difference in your setup compared to your friends ? Maybe you should try to see if Aerial exhibits the same bug in your setup too to double check.

@LogicWavelength
Copy link

LogicWavelength commented Oct 18, 2019

I am experiencing the same issue. Moving the mouse, the cursor becomes visible, but I cannot get the password entry box to come up to unlock my iMac. Prior to posting the below debug log, I did disable the auto updates, so I will see if that fixes it. I just wanted to contribute to fixing this bug.

  • 27" iMac (late 2013)
  • macOS Catalina 10.15 (19A602)
  • Aerial 1.6.1
> 9:19:46 AM : avInit1 (0.0, 0.0, 296.0, 184.0)
> 9:19:46 AM : <AerialView: 0x7fc666401950> AerialView setup init (V1.6.1)
> 9:19:46 AM : Time Management initialized
> 9:19:46 AM : Display Detection initialized
> 9:19:46 AM : ***Display Detection***
> 9:19:46 AM : 1 display(s) detected
> 9:19:46 AM : 1cm = 42.91338647126605 points
> 9:19:46 AM : npass: dict [__C.NSDeviceDescriptionKey(_rawValue: NSDeviceResolution): NSSize: {72, 72}, __C.NSDeviceDescriptionKey(_rawValue: NSDeviceBitsPerSample): 8, __C.NSDeviceDescriptionKey(_rawValue: NSDeviceIsScreen): YES, __C.NSDeviceDescriptionKey(_rawValue: NSScreenNumber): 69992768, __C.NSDeviceDescriptionKey(_rawValue: NSDeviceSize): NSSize: {2560, 1440}, __C.NSDeviceDescriptionKey(_rawValue: NSDeviceColorSpaceName): NSCalibratedRGBColorSpace]
> 9:19:46 AM :        bottomLeftFrame (0.0, 0.0, 2560.0, 1440.0)
> 9:19:46 AM : src orig : (0.0, 0.0)
> 9:19:46 AM : left 0.0 below 0.0
> 9:19:46 AM : [id=69992768, width=2560, height=1440, bottomLeftFrame=(0.0, 0.0, 2560.0, 1440.0), topRightCorner=(2560.0, 1440.0), isMain=true, backingScaleFactor=1.0]
> 9:19:46 AM : (0.0, 0.0, 2560.0, 1440.0)
> 9:19:46 AM : ***Display Detection Done***
> 9:19:46 AM : <AerialView: 0x7fc666401950> isPreview : true
> 9:19:46 AM : Using : nil
> 9:19:46 AM : <AerialView: 0x7fc666401950> no local player
> 9:19:46 AM : <AerialView: 0x7fc666401950> setupPlayerLayer
> 9:19:46 AM : <AerialView: 0x7fc666401950> setting up player layer with bounds/frame: (0.0, 0.0, 296.0, 184.0) / (0.0, 0.0, 296.0, 184.0)
> 9:19:46 AM : Using dot workaround for video driver corruption
> 9:19:46 AM : Manifest init
> 9:19:46 AM : app support exists
> 9:19:46 AM : No customvideos.json at : file:///Users/ben/Library/Containers/com.apple.ScreenSaver.Engine.legacyScreenSaver/Data/Library/Application%20Support/Aerial/customvideos.json
> 9:19:46 AM : isManifestCached 10 true
> 9:19:46 AM : isManifestCached 11 true
> 9:19:46 AM : isManifestCached 12 true
> 9:19:46 AM : isManifestCached 13 true
> 9:19:46 AM : 2019-10-17
> 9:19:46 AM : Interval : Optional(-119986.54723405838)
> 9:19:46 AM : No need to check for new videos
> 9:19:46 AM : Manifests files were not loaded in class
> 9:19:46 AM : Files were not already loaded in memory
> 9:19:46 AM : Manifests are cached on disk, loading
> 9:19:46 AM : Poi Strings Provider initialized
> 9:19:46 AM : Defaulting to bundle
> 9:19:46 AM : path : /Library/Screen Savers/Aerial.saver/Contents/Resources/en.json
> 9:19:46 AM : Community JSON : 73 entries
> 9:19:46 AM : No local or user cache exists, using ~/Library/Application Support/Aerial
> 9:19:46 AM : cache to be used : Optional("/Users/ben/Library/Containers/com.apple.ScreenSaver.Engine.legacyScreenSaver/Data/Library/Application Support/Aerial")
> 9:19:46 AM : Could not determine duration, video is not cached in any format
> 9:19:46 AM : Could not determine duration, video is not cached in any format
> 9:19:46 AM : Could not determine duration, video is not cached in any format
> 9:19:46 AM : Could not determine duration, video is not cached in any format
> 9:19:46 AM : Could not determine duration, video is not cached in any format
> 9:19:46 AM : Could not determine duration, video is not cached in any format
> 9:19:46 AM : Could not determine duration, video is not cached in any format
> 9:19:46 AM : Could not determine duration, video is not cached in any format
> 9:19:46 AM : Could not determine duration, video is not cached in any format
> 9:19:47 AM : Could not determine duration, video is not cached in any format
> 9:19:47 AM : Could not determine duration, video is not cached in any format
> 9:19:47 AM : Could not determine duration, video is not cached in any format
> 9:19:47 AM : Could not determine duration, video is not cached in any format
> 9:19:47 AM : Could not determine duration, video is not cached in any format
> 9:19:47 AM : Could not determine duration, video is not cached in any format
> 9:19:47 AM : Could not determine duration, video is not cached in any format
> 9:19:47 AM : Could not determine duration, video is not cached in any format
> 9:19:47 AM : Could not determine duration, video is not cached in any format
> 9:19:47 AM : Could not determine duration, video is not cached in any format
> 9:19:47 AM : Could not determine duration, video is not cached in any format
> 9:19:47 AM : Could not determine duration, video is not cached in any format
> 9:19:47 AM : Could not determine duration, video is not cached in any format
> 9:19:47 AM : Could not determine duration, video is not cached in any format
> 9:19:47 AM : Could not determine duration, video is not cached in any format
> 9:19:47 AM : Could not determine duration, video is not cached in any format
> 9:19:47 AM : Could not determine duration, video is not cached in any format
> 9:19:47 AM : Could not determine duration, video is not cached in any format
> 9:19:47 AM : Could not determine duration, video is not cached in any format
> 9:19:47 AM : Could not determine duration, video is not cached in any format
> 9:19:47 AM : Could not determine duration, video is not cached in any format
> 9:19:47 AM : Could not determine duration, video is not cached in any format
> 9:19:47 AM : Could not determine duration, video is not cached in any format
> 9:19:47 AM : Could not determine duration, video is not cached in any format
> 9:19:47 AM : Could not determine duration, video is not cached in any format
> 9:19:47 AM : Could not determine duration, video is not cached in any format
> 9:19:47 AM : Could not determine duration, video is not cached in any format
> 9:19:47 AM : Could not determine duration, video is not cached in any format
> 9:19:47 AM : Could not determine duration, video is not cached in any format
> 9:19:47 AM : Could not determine duration, video is not cached in any format
> 9:19:47 AM : Could not determine duration, video is not cached in any format
> 9:19:47 AM : Could not determine duration, video is not cached in any format
> 9:19:47 AM : Could not determine duration, video is not cached in any format
> 9:19:47 AM : Could not determine duration, video is not cached in any format
> 9:19:47 AM : Could not determine duration, video is not cached in any format
> 9:19:47 AM : Could not determine duration, video is not cached in any format
> 9:19:47 AM : Could not determine duration, video is not cached in any format
> 9:19:47 AM : Could not determine duration, video is not cached in any format
> 9:19:47 AM : Could not determine duration, video is not cached in any format
> 9:19:47 AM : Could not determine duration, video is not cached in any format
> 9:19:47 AM : Could not determine duration, video is not cached in any format
> 9:19:47 AM : Could not determine duration, video is not cached in any format
> 9:19:47 AM : Could not determine duration, video is not cached in any format
> 9:19:47 AM : Could not determine duration, video is not cached in any format
> 9:19:47 AM : Could not determine duration, video is not cached in any format
> 9:19:47 AM : Could not determine duration, video is not cached in any format
> 9:19:47 AM : Could not determine duration, video is not cached in any format
> 9:19:47 AM : Could not determine duration, video is not cached in any format
> 9:19:47 AM : Could not determine duration, video is not cached in any format
> 9:19:47 AM : Could not determine duration, video is not cached in any format
> 9:19:47 AM : Could not determine duration, video is not cached in any format
> 9:19:47 AM : Could not determine duration, video is not cached in any format
> 9:19:47 AM : Could not determine duration, video is not cached in any format
> 9:19:47 AM : Could not determine duration, video is not cached in any format
> 9:19:47 AM : Could not determine duration, video is not cached in any format
> 9:19:47 AM : Could not determine duration, video is not cached in any format
> 9:19:47 AM : Could not determine duration, video is not cached in any format
> 9:19:47 AM : Could not determine duration, video is not cached in any format
> 9:19:47 AM : Could not determine duration, video is not cached in any format
> 9:19:47 AM : Could not determine duration, video is not cached in any format
> 9:19:47 AM : Could not determine duration, video is not cached in any format
> 9:19:48 AM : Could not determine duration, video is not cached in any format
> 9:19:48 AM : Could not determine duration, video is not cached in any format
> 9:19:48 AM : Could not determine duration, video is not cached in any format
> 9:19:48 AM : Could not determine duration, video is not cached in any format
> 9:19:48 AM : Could not determine duration, video is not cached in any format
> 9:19:48 AM : Could not determine duration, video is not cached in any format
> 9:19:48 AM : Could not determine duration, video is not cached in any format
> 9:19:48 AM : Could not determine duration, video is not cached in any format
> 9:19:48 AM : Could not determine duration, video is not cached in any format
> 9:19:48 AM : Could not determine duration, video is not cached in any format
> 9:19:48 AM : Total videos processed : 88 callbacks : 0
> 9:19:48 AM : <AerialView: 0x7fc666401950> Setting player for all player layers in []
> 9:19:48 AM : initvideocache
> 9:19:48 AM : <AerialView: 0x7fc666401950> streaming video (not fully available offline) : https://sylvan.apple.com/Videos/comp_LA_A011_C003_DGRN_LNFIX_STAB_v57_SDR_PS_20181002_SDR_2K_AVC.mov
> 9:19:48 AM : <AerialView: 0x7fc666401950> observing current item <Aerial.AerialPlayerItem: 0x60000052e1e0, asset = <AVURLAsset: 0x60000052e100, URL = streaming://sylvan.apple.com/Videos/comp_LA_A011_C003_DGRN_LNFIX_STAB_v57_SDR_PS_20181002_SDR_2K_AVC.mov>>
> 9:19:48 AM : <AerialView: 0x7fc666401950> observeValue Optional("readyForDisplay")
> 9:19:48 AM : <AerialView: 0x7fc666401950> backing change 1.0 isDisabled: false
> 9:19:48 AM : Processsing contentInformationRequest
> 9:19:48 AM : expected content length: 400154051 type:com.apple.quicktime-movie
> 9:19:48 AM : <AerialView: 0x7fc666401950> startAnimation
> 9:19:48 AM : Processsing contentInformationRequest
> 9:19:48 AM : expected content length: 400154051 type:com.apple.quicktime-movie
> 9:19:49 AM : <AerialView: 0x7fc666401950> stopAnimation
> 9:19:49 AM : pwc init2
> 9:19:49 AM : Callback after manifest loading
> 9:19:49 AM : Looking for outdated files
> 9:19:49 AM : No old files found
> 9:19:50 AM : Aerial control panel V1.6.1
> 9:19:50 AM : Cache size : 1.79 GB
> 9:20:03 AM : cvcinit2
> 9:20:03 AM : cvcawake
> 9:20:03 AM : wdl
> 9:20:04 AM : connectionDidFinishLoading
> 9:20:06 AM : UI useHDR true
> 9:20:15 AM : UI popupVideoFormat: 1
> 9:20:39 AM : UI allowScreenSaverModeUpdatesChange: false

@BorBorBor
Copy link
Author

Boring update, I am still bugless after living without the updater. Thank you for the reminder to manually run updates now ;)

@glouel
Copy link
Collaborator

glouel commented Oct 18, 2019

I am experiencing the same issue. > * macOS Catalina 10.15 (19A602)

  • Aerial 1.6.1

@LogicWavelength let me know, it should fix. I've forced disabled auto updates in 1.6.2 (I see you're still in 1.6.1) for Catalina users, and won't reenable it until there's a fix.

@BorBorBor that's always good to hear, thanks 👍

@LogicWavelength
Copy link

I had just updated to 1.6.2 after posting! Guess I should have tried some of this first 👍

@lopezzi
Copy link

lopezzi commented Nov 13, 2019

This has happened to me many times, twice in the last two days. I'm running the latest version (1.6.4) and have auto-updates disabled. Running 10.15.1, on a MacBook Pro with an external screen. Also have an Apple Watch used to unlock the screensaver when I return to it (not sure if that matters, but wanted to mention how I typically use it). When it occurs, there doesn't appear to be anything that I can do to quit Aerial from running. I can do a three finger expose swipe and see all the open windows, but when I click one or swipe again, the videos continue playing over the whole screen. The only option I've resorted to is to ssh from my phone to issue a restart command to reboot the computer so I don't have to hard shut it down. Really hope this gets fixed as I love this screen saver, but having to reboot unexpectedly is a pain.

@glouel
Copy link
Collaborator

glouel commented Nov 13, 2019

This has happened to me many times, twice in the last two days. I'm running the latest version (1.6.4) and have auto-updates disabled. Running 10.15.1, on a MacBook Pro with an external screen. Also have an Apple Watch used to unlock the screensaver when I return to it (not sure if that matters, but wanted to mention how I typically use it). When it occurs, there doesn't appear to be anything that I can do to quit Aerial from running. I can do a three finger expose swipe and see all the open windows, but when I click one or swipe again, the videos continue playing over the whole screen. The only option I've resorted to is to ssh from my phone to issue a restart command to reboot the computer so I don't have to hard shut it down. Really hope this gets fixed as I love this screen saver, but having to reboot unexpectedly is a pain.

Hi @lopezzi

As far as I know, all the reported instances of this bug were fixed when I disabled auto updates for Catalina. So this is certainly puzzling and your occurence is the first I heard so far since. In any case, sorry about that.

From what I can gather from your message, this is not a 100% occurence, it may be even infrequent, am I getting this correctly ?

In broad terms, the issue surrounding auto updates is that the screensaver loses focus because another app steals the focus from it (in particular, Little Snitch and auto-updates, but with Catalina auto updates alone were enough). So there's a good chance that whatever is happening on your system is of the same vein.

If you could maybe think about other apps that are resident on your system (things like firewall, antivirus or stuff of that kind) that are running all the time and popping up windows, there's a good chance that it's something of the kind.

@lopezzi
Copy link

lopezzi commented Nov 13, 2019

From what I can gather from your message, this is not a 100% occurence, it may be even infrequent, am I getting this correctly ?

That is correct, it is not 100% of the time. Most of the time, it works perfectly, but there are those few times that when it does occur, it's disheartening as I only know to reboot to get out of it. When the Aerial screensaver kicks in, is there a certain process that starts? I'm wondering because since I can ssh back to my machine, maybe I can just kill the process and get back to my machine without having to reboot. Any ideas?

I do have lots of other things running, but generally nothing that pops up windows during the day that I can think of. Some of the apps that are running in the background are dropbox, Code42, OneDrive, Google Drive, NoMAD, 1password. None of those ever really pop anything up, but maybe they are interfering?

@glouel
Copy link
Collaborator

glouel commented Nov 13, 2019

From what I can gather from your message, this is not a 100% occurence, it may be even infrequent, am I getting this correctly ?

That is correct, it is not 100% of the time. Most of the time, it works perfectly, but there are those few times that when it does occur, it's disheartening as I only know to reboot to get out of it. When the Aerial screensaver kicks in, is there a certain process that starts? I'm wondering because since I can ssh back to my machine, maybe I can just kill the process and get back to my machine without having to reboot. Any ideas?

So this is a bit complicated in Catalina. But to keep it simple, a screensaver (any, not just Aerial) is a plugin to an app extension called legacyScreenSaver. It's not it's own process. The issue with auto updates was that Aerial started an extra process for the update, and because of permission that process failed. So I did remove that in Catalina.

So to answer your question, my understanding is that ScreenSaverEngine.app is the system process that is running the legacyScreenSaver.appex that in turn runs Aerial.saver, so maybe try and kill that process ? I have no idea if that works though, if it does please let me know.

I do have lots of other things running, but generally nothing that pops up windows during the day that I can think of. Some of the apps that are running in the background are dropbox, Code42, OneDrive, Google Drive, NoMAD, 1password. None of those ever really pop anything up, but maybe they are interfering?

That would be my guess yes. That's the only reason I know of of screensavers getting stuck (and it's probably not limited to Aerial but probably any 3rd party screensaver).

Because the issue is infrequent it's probably not super helpful, but there's a cool script here : #768 (comment)

written by someone who had an unrelated issue that can detect who steals the focus. Keeping it in the background may be helpful if you can get back to it maybe ? I wish I could be of more help but that's about all I know around that kind of issues.

Edit : also as mentionned by someone else, please try cmd-opt-shift-esc instead of sshing.

@lopezzi
Copy link

lopezzi commented Nov 13, 2019

I understand and thanks for the quick responses! When it happens again, I'll try killing the screensaverengine and see if that does anything. Also, thanks for the script, I'll try to get that running as well and see what we discover. Thanks again for your explanations and support!!

@lopezzi
Copy link

lopezzi commented Nov 14, 2019

Ok, so it just happened to me again. I had the script running (also attached it), but apparently the ScreenSaverEngine.app didn't quit once the loginwindow.app process completed (I think). Even though the script shows "no active app" after the loginwindow process, the ScreenSaverEngine is still running. I was able to get back into my machine by killing the ScreenSaverEngine.app PID from my phone. I tried by name, but it said it couldn't find any processes which I thought was weird. Anyway, once I did a "kill 38648", I was back in business. Thankfully I could see the terminal window by using expose and even take a pic of it, lol.
Screen Shot 2019-11-14 at 4 40 32 PM

@glouel
Copy link
Collaborator

glouel commented Nov 15, 2019

Hi @lopezzi and thanks for following up

So tiny bit of background of my understanding of this, as this may help to understand what you're seeing. As I mentioned before, in Catalina, 3rd party screensavers are a plugin to legacyScreenSaver.appex, itself an extension to ScreenSaverEngine.app. One pretty important thing about this is that the screensaver doesn't decide it's lifecycle. We get started AND stopped by the system, and, as far as I understand, that's ScreenSaverEngine.app that should have focus when it's running.

When you pressed a key to interrupt the screensaver, in the pre Catalina days, it would go to Aerial. Aerial could then bubble it up if it didn't need it (and it would go, I assumed, to ScreenSaverEngine.app). This was used for example for the right arrow key to skip a video. Now, that one no longer works because legacyScreenSaver.appex doesn't have the entitlement to have access to the keyboard, so as far as I know this code should not be a factor.

Now, if you don't ask for a password, this is pretty straightforward as far as I know, here's the output I get:

2019-11-15 13:54:22: [1397] /Applications/iTerm.app (iTerm2)
2019-11-15 13:54:24: [17752] /System/Library/CoreServices/ScreenSaverEngine.app (ScreenSaverEngine)
2019-11-15 13:54:31: [1397] /Applications/iTerm.app (iTerm2)

I started the screen saver, waited about 7 secs to press space, my understanding is that ScreenSaverEngine.app grab that input and quit itself, bringing me back to iTerm.app.

If you do ask for a password (with or without Apple Watch, I also use the watch unlock here) loginwindow.app comes in the mix, but later on. Here, I set the ask for password to 5 sec, waited about 8 sec to press a key :

2019-11-15 14:03:42: [1395] /Applications/Safari.app (Safari)
2019-11-15 14:04:06: [17787] /System/Library/CoreServices/ScreenSaverEngine.app (ScreenSaverEngine)
2019-11-15 14:04:14: [484] /System/Library/CoreServices/loginwindow.app (loginwindow)
2019-11-15 14:04:15: *** no active app ***

So for the whole 8 secs the screensaver was running, ScreenSaverEngine.app had focus here. When I pressed the key, loginwindow.app was moved to front (my logo was visible with the text mentioning watch unlock and the background a bit dimmed) and I think it had focus for an instant before relinquishing it (that focus would be of use to type the password). During that time, Aerial (through ScreenSaverEngine.app) is still running (you can see the video keeps playing in the background) ! It's only when loginwindow.app let's me in that Aerial gets killed (again, through the container app).

Notice that I also have the no active app, but this happens after the loginwindow.app was triggered (and so ScreenSaverEngine, for lack of better term, did it's job), and with a slight delay.

As far as I understand, the delay is the time needed for the watch unlock here. But loginwindow.app, unlike ScreenSaverEngine.app in the first case, does not give the focus back to the previously active app (here, Safari). And indeed after the unlock, Safari is not focused, nor anything else.

As far as I know, this is a pretty separate issue to yours, that is related to how loginwindow.app works in Catalina and is very much a bug, it should give proper focus back. But this is minor and not your issue.

Now when I look at your log, I'm a bit puzzled about what's happening exactly. Let me see if I get this correct :

  • You had mail in focus, launched screensaver.
  • 2.5 mins later, you came back, pressed a key or something. At that point, loginwindow.app came to front and you saw your logo.
  • The watch actually "unlocked" (your wrist was tapped) about 2 secs later.
  • At that point we're at 16:39:04. Now twelve seconds later ScreenSaverEngine gets focus again... That one I don't get, did you relaunch screensaver immediately or am I reading it wrong ? Because I get that 30 secs later, the whole loginwindow dance seems to happen again, and again looks "ok".
  • Then you have one last ScreenSaverEngine.app that seem to be the last entry here at 16:40:23. So I'm wondering, is it this instance that was the blocking one, or was all of it one ?

Can you be a bit more precise of what you exactly see when you are stuck, do you or do you not see the loginwindow.app with the dim, your logo and the watch thing ? I'm wondering if the issue is loginwindow.app not killing ScreenSaverengine.app after you auth, or if this is something else ?

Sorry this is a bit long (and it took me a bit to respond) but I'm not sure I'm exactly getting what you are experiencing. You mentioned that you could run Exposé which suggest you were logged back in. Also last thing, did you try or not this shortcut (pressing cmd-opt-shift-esc) instead of sshing ? This is the force quit shortcut and should work (you can try it before launching screensaver just to be sure) if I understand where you are at that point.

Thanks !

@glouel
Copy link
Collaborator

glouel commented Aug 26, 2020

Hi @benswinburne !

I have a script which sets up the screensaver for me as part of my OS config

defaults -currentHost write com.apple.screensaver idleTime 300
defaults -currentHost write com.apple.screensaver CleanExit -bool true
defaults -currentHost write com.apple.screensaver \
  moduleDict -dict moduleName Aerial path \
    "${HOME}/Library/Screen Savers/Aerial.saver" type 0

# Require password immediately after sleep or screen saver begins
defaults write com.apple.screensaver askForPassword -int 1
defaults write com.apple.screensaver askForPasswordDelay -int 0

Which seems to work fine, other than the fact that on both OSes for at least before the first† restart the screensaver would bounce a message around saying that the screensaver is not supported on this OS (Apologies, I don't have the exact message).

So, first about that. Simply closing and reopening System Preferences should do the trick, although I've had one report that on a fresh install, ScreenSaverEngine would throw an error until you rebooted once on 10.15.6.

It's more likely this one : There's a long standing macOS bug with Swift screensavers (which weren't officially supported for a while) with other System Preferences plugins that may be written in Swift and not using the same Swift Library. This also happens if you have another screen saver written in Swift and you switched from one to the other. More info here if you are curious: https://github.com/JohnCoates/Aerial/blob/master/Documentation/Troubleshooting.md#very-common-issuesmacos-bugs

After a restart it seems to work fine except for the screensaver would not allow me to exit once it started - I had to close the Macbook lid to return to a login prompt to get back to pre screensaver state. I was unable to exit the screensaver with the Macbook keyboard or trackpad, or any bluetooth mice/keyboards.

† I say at least before the first restart because I'm pretty sure that's the case but not 100% as I wasn't really paying attention specifically this issue at the time.

The suggestion above about disabling the update check does indeed stop this issue happening, but obviously there's no updates as a result.

Hmm, I'm slightly confused now. Which version of Aerial are you using ? Does it look like this or not :

If it does, I actually removed the Sparkle updater in 2.0.0 and made a separate auto updater, precisely because it kept causing the can't exit thing for some systems. That's the update settings that I used to recommend people disable. It's no longer there.

Also, I'm not a big brew user, but in general what I used to recommend pre 2.0.0 is that you should periodically run brew cask upgrade aerial to get updates, and not use the Sparkle auto update thing.

So just to clarify, right now, there are no auto updates in 2.0.0+. If you don't want to use the brew upgrade thing, I've made a separate Aerial Companion that gives you auto updates, you can grab it here with more explanation : https://aerialscreensaver.github.io/installation.html this page also explains the homebrew stuff (please be aware, right now homebrew may not always have the latest version as things are broken a bit in Big Sur and I have a hard time manually pushing the updates there).

(the companion can auto install and run in the background, though I may need to adjust a couple of things and give you a defaults write to trigger a fully unattended experience, but I'd be more than happy to do that if you are interested).

So first can we clarify which version you are running and if you see the can't exit bug with 2.0.0+ or not ? I'm still unsure if disabling Sparkle was enough to get rid of the bug. It's possible that Aerial loses focus sometimes on a network connection. I did remove streaming from Aerial 2 too, but there are two potential network connections that can go through:

  • Automatic downloads of videos in the background (can be disabled in Settings > Cache)
  • Weather (not enabled by default)

I've spent this morning trying to track various issues surrounding those and I'm still unclear about exactly what is happening (I wish I could reproduce). Just to clarify, with Catalina, Aerial has 0 control of the keyboard/mouse, I can no longer intercept them because we're sandboxed, and in general when you press a key to exit, it's ScreenSaverEngine that gets the key press and kills Aerial.

So let me know which version you are running, I had hoped that I had definitely got rid of that one in 2.0.0 but who knows...

@benswinburne
Copy link

Hi @glouel

I'm on my Catalina machine at the moment.

I was on 1.9.1
image

I wasn't aware that 2.x had been released as I only installed Big Sur and ran the brew file the other day and that machine is on 1.9.1 too so must have been pretty recent; apologies I should have checked first!

I'm happy doing upgrades through brew as that's how I keep 99% of the rest of the software on my machine up to date.

I've just used Homebrew to update aerial 1.9.2 -> 2.0.4.

Now it looks like this

image

Notice the shadowing on the text- presumably not supposed to look like that? Also seems to be missing the top border of the window?

I'm just going to post this now and try the screensaver on v2. I don't want to lose this post were it to go wrong so I'll feed back in a minute.

--

Unrelated point - Having upgraded to 2.0.4 I noticed there's a wizard to configure the screensaver options on first load of the settings. Is this something I'll be able to set flags for using defaults as I would like to keep the whole process automated.

@glouel
Copy link
Collaborator

glouel commented Aug 26, 2020

Notice the shadowing on the text- presumably not supposed to look like that? Also seems to be missing the top border of the window?

Shadows, if you pick a video in the middle column, you should see a video playing and the shadow is here to make the text readable. If the video isn't cached you'll get a screenshot of the video. But there's a tiny bug at first launch when you see exactly this, I need to fix that :)

Missing the border, that's because it's not a window it's a panel attached to the System Preferences window. It looks a bit foreign on Catalina but it will make a lot more sense in Big Sur. Try grabbing the bottom right corner and resize it, it will become more clear.

Unrelated point - Having upgraded to 2.0.4 I noticed there's a wizard to configure the screensaver options on first load of the settings. Is this something I'll be able to set flags for using defaults as I would like to keep the whole process automated.

Yep, the pref key is firstTimeSetup that needs to be set to true. The plist is in a container so it's a bit messy but I have something somewhere on how to set defaults for Aerial I'll look it up.

@benswinburne
Copy link

Right, current feedback is that I can't get it to lock up on 2.0.4 on Catalina which is good news.

However, on my machine with Big Sur I just reenabled update checking to prove it's broken and then upgrade to 2.x... bad news is that I now can't replicate it in 1.9.1 on Big Sur having disabled then reenabled it so I don't know if upgrading to 2.x was what fixed it or something else.

The main notable difference I see is that now the screensaver is telling me about 2.0.4 in the top corner which is something it wasn't doing before when it was definitely crashing. Is it perhaps that when it looks for an update and there isn't one it was failing perhaps?

Despite it working on Big Sur/1.9.1 it does seem to be intermittent. Sometimes wiggling the trackpad will return to login, sometimes it doesn't and I have to click, other times the trackpad does nothing and I have to press a keyboard key to get it to return to the login prompt. It hasn't got completely stuck though.

Missing the border, that's because it's not a window it's a panel attached to the System Preferences window. It looks a bit foreign on Catalina but it will make a lot more sense in Big Sur. Try grabbing the bottom right corner and resize it, it will become more clear.

I understand what you mean about resizing now. Probably doesn't matter as it's unlikely someone would want to do this but it's impossible to resize the Aerial prefs window to the same width as the parent window as changes to the width are made equally and the window isn't in the middle. Just in case it matters on Big Sur too.

image

Yep, the pref key is firstTimeSetup that needs to be set to true. The plist is in a container so it's a bit messy but I have something somewhere on how to set defaults for Aerial I'll look it up.

Great, thanks very much. Might be nice a list of available prefs in the readme/wiki somewhere if you already have a list, perhaps?

@glouel
Copy link
Collaborator

glouel commented Aug 26, 2020

Right, current feedback is that I can't get it to lock up on 2.0.4 on Catalina which is good news.

Yay! Just to clarify, do you use weather or did you enable automatic downloads ? Trying to gather data points as I'm trying to narrow down a few issues.

However, on my machine with Big Sur I just reenabled update checking to prove it's broken and then upgrade to 2.x... bad news is that I now can't replicate it in 1.9.1 on Big Sur having disabled then reenabled it so I don't know if upgrading to 2.x was what fixed it or something else.

The main notable difference I see is that now the screensaver is telling me about 2.0.4 in the top corner which is something it wasn't doing before when it was definitely crashing. Is it perhaps that when it looks for an update and there isn't one it was failing perhaps?

You never had this ? Are you using Little Snitch by any chance ? Again to clarify, Aerial was no longer able to auto update on Catalina, so it would just warn you of new versions like this.

Despite it working on Big Sur/1.9.1 it does seem to be intermittent. Sometimes wiggling the trackpad will return to login, sometimes it doesn't and I have to click, other times the trackpad does nothing and I have to press a keyboard key to get it to return to the login prompt. It hasn't got completely stuck though.

Yes so those are Big Sur specific issues right now I can confirm. One I've noticed is that if you have a notification at the right screen corner, moving the trackpad will do nothing. But same thing, keyboard always got me out of it here. If you experience otherwise please let me know. And Cmd+alt+shift+esc should always get you out should you get stuck.

Missing the border, that's because it's not a window it's a panel attached to the System Preferences window. It looks a bit foreign on Catalina but it will make a lot more sense in Big Sur. Try grabbing the bottom right corner and resize it, it will become more clear.

I understand what you mean about resizing now. Probably doesn't matter as it's unlikely someone would want to do this but it's impossible to resize the Aerial prefs window to the same width as the parent window as changes to the width are made equally and the window isn't in the middle. Just in case it matters on Big Sur too.

image

That's intriguing, looks like it's offset right by 2px. That's probably a macOS thing as we just give the panel and it gets attached to System Preferences by the system. But yeah I've gone large with 2.0.0 by default. I also use large controls on Big Sur.

Yep, the pref key is firstTimeSetup that needs to be set to true. The plist is in a container so it's a bit messy but I have something somewhere on how to set defaults for Aerial I'll look it up.

Great, thanks very much. Might be nice a list of available prefs in the readme/wiki somewhere if you already have a list, perhaps?

So I haven't documented it but I can do that at some point. In the meantime check that issue for more info on how to access it in general: #976

I've also pinned an issue on top of the issues, regarding Big Sur. Right now the paths are a mess so your scripts will need to be adjusted.

@benswinburne
Copy link

Yay! Just to clarify, do you use weather or did you enable automatic downloads ? Trying to gather data points as I'm trying to narrow down a few issues.

  • Catalina - did not re enable automatic downloads before upgrading to 2.x. Have now enabled weather and still can't get it to lockup.

  • Big Sur - re enabled automatic downloads, have not upgraded to 2.x but it now no longer locks up. Enabled weather too now and still doesn't lock up.

You never had this ? Are you using Little Snitch by any chance ? Again to clarify, Aerial was no longer able to auto update on Catalina, so it would just warn you of new versions like this.

No idea what Little Snitch is so I'm going to say no (?). I get that Aerial was not actually able to perform the update on Catalina, but I'd also never seen the message about new available versions before.

So I haven't documented it but I can do that at some point. In the meantime check that issue for more info on how to access it in general: #976

Great, thanks.

I've also pinned an issue on top of the issues, regarding Big Sur. Right now the paths are a mess so your scripts will need to be adjusted.

I had a look at this- seems to be just to continue using old downloads etc, right? I was on a fresh machine so I didn't have any existing downloads. My script mentioned above installed 1.9.x (at the time) and worked fine but I'll keep an eye on it for 2.0 installs- thanks.

@glouel
Copy link
Collaborator

glouel commented Aug 28, 2020

  • Catalina - did not re enable automatic downloads before upgrading to 2.x. Have now enabled weather and still can't get it to lockup.
  • Big Sur - re enabled automatic downloads, have not upgraded to 2.x but it now no longer locks up. Enabled weather too now and still doesn't lock up.

Ok please update me if you experience any locking issue but I think it's good, I haven't had reports about that yet in 2.0. Thanks !

No idea what Little Snitch is so I'm going to say no (?). I get that Aerial was not actually able to perform the update on Catalina, but I'd also never seen the message about new available versions before.

Sorry, Little Snitch is a 3rd party firewall (https://www.obdev.at/products/littlesnitch/index.html). It's nice, but it doesn't play well with screensavers in general.

I had a look at this- seems to be just to continue using old downloads etc, right? I was on a fresh machine so I didn't have any existing downloads. My script mentioned above installed 1.9.x (at the time) and worked fine but I'll keep an eye on it for 2.0 installs- thanks.

Yes, just be aware that with the next Big Sur beta, your videos may go missing.

@glouel glouel closed this as completed Nov 22, 2020
@penx
Copy link

penx commented Jan 13, 2021

I just had this issue with Catalina 10.15.7 and Aerial 2.2.6. I could use expose but every time I exited expose, Aerial would show. In the end I had to force quit. I noticed via expose one window that was open was a Problem Report/crash window for a different application (crash was unrelated to Aerial but perhaps the display of the problem report window interfered with the Aerial logic).

@glouel
Copy link
Collaborator

glouel commented Jan 13, 2021

@penx that's interesting ! Indeed I think the crash report window probably stole focus from ScreenSaverEngine and put you in that situation.

Post Catalina, screensavers have little control about stuff like focus and keyboard, it's all been neutered and I believe that for some reason ScreenSaverEngine (Aerial's "host" in this case) tends to not try and get back focus (or maybe didn't expect it could lose it).

You should consider opening a feedback on Feedback Assistant explaining what happened if you have a minute.

@apwelsh
Copy link

apwelsh commented Jan 14, 2021

I gave up and remove the software. I have been locked out of my system far too many time when I needed access for work.

@glouel
Copy link
Collaborator

glouel commented Jan 14, 2021

I gave up and remove the software. I have been locked out of my system far too many time when I needed access for work.

Sorry to hear that. cmd-opt-shift-esc will always get you out FYI when that issue arise.

I understand from reading up that you were running 1.9.X versions, I believe I fixed the occurrences that were linked directly to Aerial's auto-updater stealing focus by simply removing it in 2.0+ and adding a separate companion app to handle the auto updates, should you wish to give it another shot. If you experienced the issue in 2.x I'm interested to hear about it as I didn't get a report until yesterday of that happening again.

There still seems to be some occurrences when a 3rd party app steals focus but as much as I've tried to workaround that, this seems to be an issue in ScreenSaverEngine.

@apwelsh
Copy link

apwelsh commented Jan 15, 2021

Actually, the key sequence wouldn't. The screen save hijacks the system, and I have to find the right combination of Task/Windows switching and force kill. The only way to always get out is to force logout. Still, I no longer use the screen saver. I loved it, but I can no longer afford to be locked out of my system because of something as simple as a screen that has been way over complicated.

@jacklawry
Copy link

I use a program called "Better Touch Tool” (BTT) and have a Touch Bar button setup called "Aerial Kill" that does a "Command + Option + Shift + Esc” I find that if it locks up this kills it and it lets me back in...

I use BTT as I can never remember the correct keys and I can't use my computer to look it up...

@penx
Copy link

penx commented Jan 15, 2021

cmd-opt-shift-esc

Actually, the key sequence wouldn't.

@apwelsh I was trying cmd-opt-esc for a while before seeing this issue - which doesn't work because of what you describe. cmd-opt-shift-esc, however, did work. Did you try with the shift?

@glouel
Copy link
Collaborator

glouel commented Jan 18, 2021

I just saw this this morning, and it looks eerily similar : https://www.macrumors.com/2021/01/18/m1-macs-fast-user-switching-screensaver-bug/

By any chance, @apwelsh @jacklawry @penx are you using fast user switching ? I still believe that the root cause is the focus getting lost but fast user switching may trigger that bug a lot more for some.

@penx
Copy link

penx commented Jan 18, 2021

I’m not using fast user switching

edit: I'm also not on Big Sur and am not using an M1 chip

@apwelsh
Copy link

apwelsh commented Jan 18, 2021

Yes. I am a power user. I run multiple users on my systems. So, I do use fast user switching. But say the time of the last screen save hijacking, I was not, as that computer in question has been migrated to a single user system prior to the last issue that resulted in me removing the screen saver.

@jacklawry
Copy link

I am on Big Sur but not on M1 (16" MacBook Pro - 2.4Ghz I9) I have only one user but oddly Fast user switching was enabled to show the icon in the menu bar (not sure if this could be default)? I have now unticked that so will see if it does make any difference...

@jacklawry
Copy link

Also @glouel - why is this issue marked as closed when still obviously an active issue for people?

@BorBorBor
Copy link
Author

@jacklawry To answer your last question, the original issue was solved. It actually still remains solved for me and I suspect you are now experiencing a different issue. I think that's why the issue was closed.

@glouel
Copy link
Collaborator

glouel commented Jan 19, 2021

@penx & @apwelsh thanks for getting back to me on this, and apologies because I was confused reading the macrumors story. I did spend a lot of time yesterday going through user reports from people on macrumors and 9to5 and here's my best explanation of what is happening for them (and you, incidentally) :

  • Screensaver will launch on its own, while you're working <- This seems, best as I can tell, to be a Big Sur only issue
  • For those users where the screensaver launched on its own, they can't quit it <- This seems to be the similar part of the issue that you reported, you can run exposé, you can't quit without using something like **cmd + opt + shift + esc **.

So, again, sorry, disabling fast user switching does seem to stop the first bug (screensaver launching on its own) but not the second. The first bug seems to only happen on Big Sur (and maybe M1) for people with multiple user accounts and fast user switching. So, let's put that one aside.

Here's what's interesting, there are multiple people on macrumors/9to5mac and other sites that have confirmed they hit the second issue infrequently, and with some system screensavers. Most people don't mention the screensaver they are running but some mentioned for example the default Music screensaver.

So at that point I think the theory that some background app may be able to steal focus from ScreenSaverEngine.app is probably on the right track. I'll try to see if I can come up with some way to 100% reproduce the issue here to try and narrow it down.

It's quite possible that not all system screensaver may hit the issue, as Apple ported a few of theirs to their new API, while a lot of others (like Music) run either under the compatibility thing they introduced in Catalina legacyScreenSaver.appex or some other compatibility thing (something like iLifeScreensaver.appex possibly ?).

Interestingly the issue started with 10.14.4 where they started to change some things for screensavers, although at this point it's still not super clear to me what they did back then.

Also @glouel - why is this issue marked as closed when still obviously an active issue for people?

Well, it wasn't obvious to me. The original issue as pointed by @BorBorBor was linked to the old auto update system for Aerial, which I made a workaround early on, and that I fully removed in 2.0. After removing it, multiple people confirmed it fixed the issue for them, including up here.

Since that release I haven't had a single report until @penx the other day. I did keep the bug open for a whole 3 month after the last user confirmation that it was fixed too just in case. But I guess whatever I do, that's never enough...

@penx
Copy link

penx commented Jan 19, 2021

thanks @glouel - for what it's worth, I think the window that stole focus was a crash report for Cypress which is an Electron application that I had launched from Terminal.app.

If you want to try to reliably recreate it, then mirroring what happened to me you may be able to:

  1. make an electron application that, after 30 seconds, consumes lots of memory until it crashes (e.g. a setTimeout and an infinite loop) (perhaps it doesn't need to be an Electron app so you could try doing the same with whatever tech stack you're familiar with first)
  2. test that running the application causes the Finder crash report window to show after 30-60 seconds
  3. run the application from Terminal and immediately start the screensaver e.g. from a hot corner
  4. try to exit the screensaver after 60 seconds

I have only encountered this issue once though, so I don't know how reliably it can be recreated!

@jacklawry
Copy link

Sorry @glouel I hadn't meant that to read the way it does now having read it back again so apologies again.

I was only referring to people still having issues with it getting stuck and becoming non responsive. It's a great plugin and it's a shame to hear people stopping using it due to this issue.

For what it's worth it doesn't get stuck that often for me and hasn't for a little while. When it does my shortcut using BTT (as above) always seems to resolve the issue first time.

@glouel
Copy link
Collaborator

glouel commented Jan 19, 2021

thanks @glouel - for what it's worth, I think the window that stole focus was a crash report for Cypress which is an Electron application that I had launched from Terminal.app.

@penx Interesting. Just to be clear, the crash report window was macOS's crash report window ? Not something from specific from Electron right ?

If you want to try to reliably recreate it, then mirroring what happened to me you may be able to:

  1. make an electron application that, after 30 seconds, consumes lots of memory until it crashes (e.g. a setTimeout and an infinite loop) (perhaps it doesn't need to be an Electron app so you could try doing the same with whatever tech stack you're familiar with first)
  2. test that running the application causes the Finder crash report window to show after 30-60 seconds
  3. run the application from Terminal and immediately start the screensaver e.g. from a hot corner
  4. try to exit the screensaver after 60 seconds

I have only encountered this issue once though, so I don't know how reliably it can be recreated!

That's a great idea ! I'm trying another solution right now but this may be a great way to directly replicate what you had, especially since there are so many ways to get a window foreground somehow and stealing focus (I banged my head so many times around a previous issue where the system preferences panel would not have keyboard focus on 10.13 if I recall correctly...), I am completely unfamiliar with Electron but that shouldn't be an issue, I'll give that a shot next if plan B fails.

So far I tried stealing focus from applescript, but you can't do that there ! At best you can reorder windows from an app but not reliably push on foreground, so that's a bust. Right now plan B is I'm trying to make a tiny macOS app that launches screensaver then does all the tricks to steal focus, we'll see where that goes.

And @jacklawry no worries. The fact that you rarely see it is pretty nowadays seems pretty consistent with everything I keep seeing so far so we'll see if I can find a good way to replicate and hopefully escalate that to Apple...

@BorBorBor
Copy link
Author

Ha, plot twist! Guess what just happened!

(Well, I think you can guess what just happened)

(No idea how or what or why)

@glouel
Copy link
Collaborator

glouel commented Jan 27, 2021

Ha thanks for the heads up @BorBorBor ! I've been super busy this last week so I put my testing on hold but will try to get back to it asap and let you know. Only happenned once I guess ?

@BorBorBor
Copy link
Author

Haha, no worries, I guess I'm freshened up on my Force Quit-shortcuts now. Yes, it only happened once, I don't know how or why.

Something interesting (that might not be interesting idk): I have a Touch Bar MacBook and it's set up with a "start screen saver"-button. If I press that while Aerial is 'stuck' it actually starts an additional Aerial instance on top of it. That one works as normal, i.e. when I move the mouse I get the "login" prompt and I can enter my password (and return to the "stuck" instance of Aerial underneath that one).

@glouel
Copy link
Collaborator

glouel commented Jan 27, 2021

That definitely is interesting, and super weird.

The touchbar by itself is really weird (and apparently going away, crossing fingers), I bet that button is programmed to show up when ScreenSaverEngine.app is not running as the front app, and that's what's causing you the ability to launch it twice (which you can definitely do, I did weird experiments like this with companion, it was so weird I ended up using an undocumented API to launch the screensaver instead because it felt safer 🙈).

They really made a mess with their internal changes!

@BorBorBor
Copy link
Author

Yes actually you are right, I tested it and the touch bar button does not show up when the screen saver is running as usual. So somehow Aerial kind of separates itself from the normal screen saver 'slot'.

and apparently going away, crossing fingers

But how will I find my favorite emojis ever again 😱

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests