JohnCoates / Aerial

Apple TV Aerial Screensaver for Mac
MIT License
20.78k stars 1.05k forks source link

Screensaver not showing full screen #871

Closed super911 closed 4 years ago

super911 commented 5 years ago

Running macbook pro 2018 13" with Catalina and Aerial 1.6.2. Not running any external monitors.

Some videos do not run full screen and only appear in the lower left hand corner of the screen.. Sometimes the same video runs fine.. All videos selected are downloaded and in the cached folder. Log and screenshot of issue attached. Is this a known issue? Thanks!

aerial AerialLog.txt

glouel commented 4 years ago

@ravindrank when you get a sec, give https://github.com/glouel/Aerial/releases/download/v1.6.5beta2c/Aerial.saver.zip a chance !

With system clock disabled, basically same as the 1.6.5beta2 but with my "fix" in the other way. You won't see anything else but video on screen, that may help me understand what's happening should that one work. Thanks !

glouel commented 4 years ago

So, I'm not sure what I did, but I now have managed to reproduce the bug here with the latest beta build too on my iMac. It looks like I changed something that triggered it. I tried to investigate but so far didn't see anything, I'll give it another go soon.

Edit: Still investigating, here's what seems to be happening some of the time, our view gets resized somehow, and while I don't know what does it, what we get resized to is a pretty good hint :

2019-12-27 19:24:25.101 : <AerialView: 0x7fb699f0a940> observeValue Optional("readyForDisplay") false (0.0, 0.0, 2560.0, 1440.0)
2019-12-27 19:24:25.101 : <AerialView: 0x7fb699f0a940> backing change 2.0 isDisabled: false frame: (0.0, 0.0, 296.0, 184.0)

All of a sudden, I go from 2560x1440 (iMac) to 296x184, which, coincidentally, is the EXACT frame size of a preview (the tiny preview you get in System Preferences before going into Aerial's settings).

There's a bug in Catalina (that I reported in june, and reported again a few weeks ago) where screensavers are always told they are running in the tiny preview, even when that is not true (the correct behavior is documented here, we always get true : https://developer.apple.com/documentation/screensaver/screensaverview/1512504-ispreview ).

What I do, is that I override that value in our init when we are running fullscreen. I'm starting to wonder if overriding that is what's behind the issue (that's a pretty important flag as screensavers don't work the same way in that preview and in fullscreen mode). I'll keep investigating this, but since it didn't happen for me in previous builds, and is now happening all of a sudden, it looks like there's a race condition somewhere (would explain the randomness at which this appear), possibly in our hosting .appex that I'm triggering somehow. Will keep all of you updated.

glouel commented 4 years ago

This is driving me crazy, the exact build that let me reproduce the bug on Friday no longer does it for me on my iMac this morning 🙈

Replying to myself about overriding the isPreview flag, I did test that on Friday and it's not the issue, not overriding didn't change a thing.

But now that I know that it's our view that gets resized, I think this may be fixable, here's a build where I try to detect a bug situation and override the view size to what it was at startup. I can't test this sadly so if anyone here could test and report, that would be helpful. I did a quick check and it's possible to change the view size, whether that workaround the bug or not, I have no idea so please let me know : https://github.com/glouel/Aerial/releases/download/v1.6.5beta3b/Aerial.saver.zip

Please note that after install, you will need to set again your video preference (1080p 4K, HDR) as I changed stuff in that beta to make the UI simpler/easier to understand.

Thanks!

MadimetjaShika commented 4 years ago

Hi @glouel,

Firstly, thanks for your (and all other contributor's) work on this project.

In response to your request;

But now that I know that it's our view that gets resized, I think this may be fixable, here's a build where I try to detect a bug situation and override the view size to what it was at startup. I can't test this sadly so if anyone here could test and report, that would be helpful. I did a quick check and it's possible to change the view size, whether that workaround the bug or not, I have no idea so please let me know : https://github.com/glouel/Aerial/releases/download/v1.6.5beta3b/Aerial.saver.zip

I've installed v1.6.5beta3b, and all seems to be good. I don't observe the small preview display issue mentioned on this thread. Note that this is my very first install of this project, i.e. I didn't have to uninstall or upgrade from a previous version.

My test process:

For all iterations, the videos played at fullscreen without any issues.

My system info (not on osx beta program, and slightly different to initial reported machine):

Screenshot 2020-01-01 at 19 30 40

Additional Aerial config info:

So yea seems like this issue may be resolved with v1.6.5beta3b. I'll continue to observe this over time and let you know if at any point I come across the noted issue.

PS - let me know if there's any additional config I missed in my tests which may cause the noted issue and I'll be happy to re-test.

glouel commented 4 years ago

Firstly, thanks for your (and all other contributor's) work on this project.

Hi @MadimetjaShika !

Thanks a lot for checking this out :

  • With "Show with clock" setting selected

    • I allowed 7 videos to play without interruption, and all displayed at full screen. I did two separate isolated iterations, one on power and another on battery (pretty much full capacity at the time of testing).

So, this one should always work, even with the old builds.

  • With "Show with clock" setting de-selected

    • Same process as above, except I only did one iteration with power connected.

That's the one that failed sometimes ! So hopefully I got it fixed !

My system info (not on osx beta program, and slightly different to initial reported machine):

Screenshot 2020-01-01 at 19 30 40

Awesome, this Mac should experience the original bug as far as I understand.

Additional Aerial config info:

  • Video format at 1080p HDR
  • Disabled all other info display options except for "location"
  • Disabled video caching
  • All other config was left at the default from installation.

Sounds good !

So yea seems like this issue may be resolved with v1.6.5beta3b. I'll continue to observe this over time and let you know if at any point I come across the noted issue.

PS - let me know if there's any additional config I missed in my tests which may cause the noted issue and I'll be happy to re-test.

Again, many thanks for testing, if I may ask one more thing from you, would you be so kind to go into the Advanced tab in Aerial, make sure you check "Debug Mode" and "Log to disk".

Then, with the system clock unchecked, quickly launch Aerial a few times (5 or 6 should do, you can use a hot corner to quickly do it then wake it up after a few seconds, if it stats playing full screen it's all good, the bug happen when the screensaver starts only). Then open the log (you can open it using the "Show in Finder" button next to the two checkboxes I mentionned above) and search for a line that contains "*** Frame size bug". If you see that line, that would confirm that you hit the bug and the workaround worked !

Many thanks again for checking this out!

ravindrank commented 4 years ago

Hi Guillaume, Apologies I was out for several days and couldn't test this one. I was able to test 1.4.5beta3b build yesterday and glad to report that I didn't hit the issue :) No more small window. I tried without the clock setting as well as with the clock setting. I did turn on the 4K setting like you suggested.

Unfortunately I wont have the Macbook anymore from today but hoping you are all set for the new release :) Thanks for all the work you do and we appreciate all your efforts

glouel commented 4 years ago

No worries @ravindrank, thanks for confirming that the workaround seems to work !

If you still have a few minutes with it and could check in the log if you see the "Frame size bug" line that I mentionned in the above post maybe, although the fact that you did hit the bug previoulsy and didn't with that build is probably enough confirmation !

ravindrank commented 4 years ago

Last minute :) but I found one one entry though not sure how. Maybe once I saw a blank screen. AerialLog.txt

glouel commented 4 years ago

Last minute :) but I found one one entry though not sure how. Maybe once I saw a blank screen. AerialLog.txt

When you see this line, it means the workaround code kicked in so on the contrary, it's all good ! Looking at your log :

2020-01-01 20:22:20.846 : *** Frame size bug, trying to override to 1440.0x900.0!

So that's when I detected that the frame was resized (I still have no idea why that happens but I think it's the Screensaver API at this point) and tried to size it back.

2020-01-01 20:22:23.696 : <AerialView: 0x7fed5580b350> observeValue Optional("readyForDisplay") true (0.0, 0.0, 1440.0, 900.0)
2020-01-01 20:22:23.696 : start playback: (0.0, 0.0, 1440.0, 900.0) (0.0, 0.0, 1440.0, 900.0)

It did then started to stream a video and start it's playback at the correct size, so that looks all good to me ! Looks like you woke from the screensaver a few secs afterwards and went back into settings.

So that looks pretty good, I'll release 1.6.5 with that fix then, thanks for the last minute check !

glouel commented 4 years ago

Closing this with the release of 1.7.0 : https://github.com/JohnCoates/Aerial/releases/tag/v1.7.0