rocksdanister / lively

Free and open-source software that allows users to set animated desktop wallpapers and screensavers powered by WinUI 3.
https://rocksdanister.com/lively
GNU General Public License v3.0
14.81k stars 1.05k forks source link

Custom web wallpaper causes Lively Wallpaper to hang/black screen. (GMS2) #1048

Closed tabularelf closed 1 year ago

tabularelf commented 2 years ago

Describe the bug Unlike in Wallpaper Engine, where the wallpaper loads and runs normally, the wallpaper when attempting to add via Lively Wallpaper causes the whole program to hang in a bizarre way. Changing web engines to MS Edge, adding it in and then changing it back to CEF does work around this, but also results in the wallpaper trying to load and then ending up on a black screen. Using any other wallpaper that's not made by me seems to work On wallpaper engine, this doesn't happen and loads right away.

To Reproduce Steps to reproduce the behavior of Lively hanging:

  1. Download and extract "Vividerie Wallpaper.zip". (This wallpaper is a very basic one, that has a character on screen from the game Vividerie, chasing after the mouse.)
  2. With Lively Wallpaper running and the web browser set to "CEFSharp", add "Vividerie Wallpaper's index.html" as a wallpaper.
  3. When the settings windows pop up, attempt to press OK.
  4. Lively hangs indefinitely. (I've sat several of minutes waiting before I ended up shutting it down forcefully.)

Steps to reproduce the behaviour of the black screen (without Lively hanging):

  1. Do the steps above, but have the web browser set to "MS Edge."
  2. Interchangeably set the web browser between "MS Edge" and "CEFSharp". Both will cause a black screen, but not cause Lively to hang.

Expected behavior Like with Wallpaper Engine, I expect the wallpaper to load just fine.

Desktop (please complete the following information): -OS: Windows 10 21H1 -Wallpaper: Custom Wallpaper that I made in GMS2 (barebones minimal) -Lively version: 1741 Stable

Additional Context I primarily use GameMaker Studio 2 to develop HTML5-based wallpapers, after discovering that it was very possible and somewhat feasible to pull off for Wallpaper Engine. I'm the developer who made a wallpaper called "Five Nights at Freddy's 1 Camera View (Interactive)" (See here https://steamcommunity.com/sharedfiles/filedetails/?id=2517518192). I've been asked a lot by several of users to support Lively Wallpaper. And I've been trying for the past two weeks to work out and diagnose the issue at hand, but I'm not getting anything super meaningful out of the logs or the debugger, despite defining a port. (Debugger refuses to load just for these wallpapers that I made.) It works just fine for any other web-based wallpaper.

Note: Log file covers the black screen ahnging that works around Lively hanging. [removed] lively_log_20220210_155438.zip

tabularelf commented 2 years ago

This is a separate log file that covers the Lively hanging portion. The wallpaper seems to also black screen as well, but Lively remains hanging. 20220210_162551.txt

akkuz commented 2 years ago

I also have the problem that the first time lively loads a web page wallpaper it shows a black screen, if I change to another wallpaper and I turn back to the web page one it works fine. Another problem is that sometimes (only if in the web page there is a video in webm format) when I set an applicaton in fullscreen and after some time I turn it back to icon, it buggs (I converted the video format mp4 to webm like the instructions from rocksdanister, with the program called HandBrake, I don t know if it si this causing the bug) like frezzing or looping in a wrong way or it glitches in a gray weird shape. This happens only a few times but it fixes every time I change wallpaper and I turn it back.

rocksdanister commented 2 years ago

Hi, thanks for the detailed report.

Currently I am in the process of a rewrite https://github.com/rocksdanister/lively/issues/969 and beta release is going live next week.. Lively's last update was several months ago and since then I have patched some issues with web wallpapers including the black screen one (display scaling related) and also the version of CefSharp being used is also very old by now.

I will take a look next week once the work on beta is complete. (also I removed the file due to possible copyright concerns?)

rocksdanister commented 2 years ago

also possibly related https://github.com/rocksdanister/lively/issues/904 ?

tabularelf commented 2 years ago

Hi, thanks for the detailed report.

Currently I am in the process of a rewrite #969 and beta release is going live next week.. Lively's last update was several months ago and since then I have patched some issues with web wallpapers including the black screen one (display scaling related) and also the version of CefSharp being used is also very old by now.

I will take a look next week once the work on beta is complete. (also I removed the file due to possible copyright concerns?)

Good to hear a quick response! There's no real copyright concerns afaik. I have made the wallpaper as a side thing for a friends developer. But I appreciate the concern nonetheless.

Take the time. I'm in no particular rush, since all of my efforts are currently tied with Wallpaper Engine anyway. But anything would be swell.

tabularelf commented 2 years ago

also possibly related #904 ?

I'm not entirely certain, but the wallpaper at least spews out only a fair number of console.log() calls (this is just GameMaker's HTML5 behaviour, and it's normal for the amount of console.logs(), which is a fairly small number).

But I'm not super technical on Lively/CEFSharp so I'm not the expert here.

akkuz commented 2 years ago

also possibly related #904 ?

(I m talking for my issue, I don't know if tabularef's and my problem are related) I don't think so, I modified the cyberpunk hype web wallpaper to another one with a webm file insted of V (cyberpunk main character) and the problem shows only with this webm file, not with images. SetIntervals for updating date, time and weather work just fine.

akkuz commented 2 years ago

@rocksdanister when I was talking about a weird gray shape I was talking about this thing (this is a webm video looped in a web page wallpaper) (maybe you know the source of the problem): image

tabularelf commented 2 years ago

also possibly related #904 ?

(I m talking for my issue, I don't know if tabularef's and my problem are related) I don't think so, I modified the cyberpunk hype web wallpaper to another one with a webm file insted of V (cyberpunk main character) and the problem shows only with this webm file, not with images. SetIntervals for updating date, time and weather work just fine.

Yeah our problems aren't the same. Since mines occurring with webpages and GMS2 HTML5 builds. But black screen isn't definitely nice.

tabularelf commented 1 year ago

Wanted to bump this. Any progress?

tabularelf commented 1 year ago

I'll note that I've tried the latest version, as there has been quite a couple of updates. -CefSharp crashes after the wallpaper is through the initial loading. -WebView2 flat out doesn't work. (Page doesn't even load)

rocksdanister commented 1 year ago

-CefSharp crashes after the wallpaper is through the initial loading.

@tabularelf this is the original console log issue https://github.com/rocksdanister/lively/issues/904 Adding the following code before body of index.html the Vividerie Wallpaper works:

   <script type="text/javascript">
        console.log = ()=>{};
    </script>
image

-WebView2 flat out doesn't work. (Page doesn't even load)

WebView2 does not support files yet due to CORS https://github.com/rocksdanister/lively/issues/1160

tabularelf commented 1 year ago

It works but that's just... Lol what? Any case that could be fixed at some point? I can't really do much to reduce any of the console logs, and I occassionally rely on them for debugging purposes (as well as troubleshooting errors down the line). A step forward for me since I can work on it at least to incorporate options for Lively now.

rocksdanister commented 1 year ago

Closing this as duplicate, once https://github.com/rocksdanister/lively/issues/904 is fixed it should work even with log.

rocksdanister commented 1 year ago

Found the cause, next update will have the fix 🥳