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.88k stars 1.05k forks source link

Crash when open application UI #1691

Open tianweix opened 1 year ago

tianweix commented 1 year ago

Describe the bug Crash when open application UI. It happened after upgrading to lastest version(2.0.6.5), downgrade to 2.0.6.1 can fix.

To Reproduce Steps to reproduce the behavior:

  1. Go to system tray
  2. Click on 'Open Lively'
  3. A black window appears and disappears quickly.
  4. Retry multi times, 95% chance will crash.

Expected behavior Application UI should open as expected.

Desktop (please complete the following information):

Additional context Restart/reboot, or unintall/reinstall won't help. The bug only happens with 2.0.6.5. Any other older version (e.g. 2.0.6.1) doesn't have this issue. However, since there's no option to disable new-version notification. It's still very annoying to downgrade as a work around.

Log file (Important) Share the diagnostic files by: Open Lively settings (Gear icon) top-right -> System -> Log File -> Save or Navigate to Appdata folder C:\Users\<UserName>\AppData\Local\Lively Wallpaper\logs

-> N/A since the appliation UI is crashing, the Appdata folder also not existing.

rocksdanister commented 1 year ago

-> N/A since the appliation UI is crashing, the Appdata folder also not existing.

UI is a separate program from the core, this should not be possible.

rocksdanister commented 1 year ago

If the AppData directory creation fails Lively core will refuse to start with a message: https://github.com/rocksdanister/lively/blob/621c5d2d77ea36a995063b6693f029ca6215d899/src/Lively/Lively/App.xaml.cs#L107-L124

Based on your comment I am assuming you are using Installer version of Lively? if not the appdata for Microsoft Store version is: %LocalAppData%\Packages\12030rocksdanister.LivelyWallpaper_97hta09mmv6hy\LocalCache\Local\Lively Wallpaper

Log file can also be created using the tray-menu now:

image
tianweix commented 1 year ago

Thanks for the quick response! Clarification: I use Microsoft Store version, the bug happened right after Lively got updated this morning, that leads me to think it's a bug introduced by the recent upgrade. So I temporarily switch to Installer (with different versions) to confirm my hypothesis. I think that's why %LocalAppData%\Lively Wallpaper\logs didn't exist when I post the issue.

Now I find the logs at %LocalAppData%\Packages\12030rocksdanister.LivelyWallpaper_97hta09mmv6hy\LocalCache\Local\Lively Wallpaper, please let me know if any other info you need from my side.

2023-05-02 17:39:53.9457|INFO|Lively.App|
Lively v2.0.6.5 x64 desktop-bridge en-US
OS: Microsoft Windows 11 Pro 10.0.22621
CPU: Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz
GPU: NVIDIA GeForce GTX 1060

2023-05-02 17:39:54.1434|ERROR|Lively.Services.JsonUserSettingsService|System.IO.FileNotFoundException: Could not find file 'C:\Users\tianw\AppData\Local\Lively Wallpaper\Settings.json'.
File name: 'C:\Users\tianw\AppData\Local\Lively Wallpaper\Settings.json'
   at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options)
   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
   at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
   at System.IO.Strategies.FileStreamHelpers.ChooseStrategyCore(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
   at System.IO.StreamReader.ValidateArgsAndOpenPath(String path, Encoding encoding, Int32 bufferSize)
   at System.IO.File.OpenText(String path)
   at Lively.Common.Helpers.Storage.JsonStorage`1.LoadData(String filePath)
   at Lively.Services.JsonUserSettingsService.Load[T]()
2023-05-02 17:39:54.3711|ERROR|Lively.Services.JsonUserSettingsService|System.IO.FileNotFoundException: Could not find file 'C:\Users\tianw\AppData\Local\Lively Wallpaper\AppRules.json'.
File name: 'C:\Users\tianw\AppData\Local\Lively Wallpaper\AppRules.json'
   at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options)
   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
   at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
   at System.IO.Strategies.FileStreamHelpers.ChooseStrategyCore(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
   at System.IO.StreamReader.ValidateArgsAndOpenPath(String path, Encoding encoding, Int32 bufferSize)
   at System.IO.File.OpenText(String path)
   at Lively.Common.Helpers.Storage.JsonStorage`1.LoadData(String filePath)
   at Lively.Services.JsonUserSettingsService.Load[T]()
2023-05-02 17:39:54.3894|ERROR|Lively.Services.JsonUserSettingsService|System.IO.FileNotFoundException: Could not find file 'C:\Users\tianw\AppData\Local\Lively Wallpaper\WallpaperLayout.json'.
File name: 'C:\Users\tianw\AppData\Local\Lively Wallpaper\WallpaperLayout.json'
   at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options)
   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
   at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
   at System.IO.Strategies.FileStreamHelpers.ChooseStrategyCore(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
   at System.IO.StreamReader.ValidateArgsAndOpenPath(String path, Encoding encoding, Int32 bufferSize)
   at System.IO.File.OpenText(String path)
   at Lively.Common.Helpers.Storage.JsonStorage`1.LoadData(String filePath)
   at Lively.Services.JsonUserSettingsService.Load[T]()
2023-05-02 17:39:55.0735|INFO|Lively.Helpers.WindowsStartup|Startup is disabled
2023-05-02 17:39:55.1254|INFO|Lively.Helpers.WindowsStartup|Request to enable startup Enabled
2023-05-02 17:40:25.6511|INFO|Lively.Core.WinDesktopCore|Setting wallpaper: 鲸落 | C:\Users\tianw\Pictures\Wallpaper\鲸落.mp4
2023-05-02 17:40:25.7599|INFO|Lively.Core.WinDesktopCore|Core initialized..
2023-05-02 17:40:25.7599|INFO|Lively.Core.Watchdog.WatchdogProcess|Starting watchdog service...
2023-05-02 17:40:26.2985|INFO|Lively.Core.Wallpapers.VideoMpvPlayer|Mpv0:  (+) Video --vid=1 (*) (h264 2512x1410 30.000fps)
2023-05-02 17:40:26.2985|INFO|Lively.Core.Wallpapers.VideoMpvPlayer|Mpv0:  (+) Audio --aid=1 --alang=eng (*) (aac 2ch 48000Hz)
2023-05-02 17:40:26.5162|INFO|Lively.Core.Wallpapers.VideoMpvPlayer|Mpv0: Using hardware decoding (d3d11va).
2023-05-02 17:40:27.2255|INFO|Lively.Core.Wallpapers.VideoMpvPlayer|Mpv0: AO: [wasapi] 48000Hz stereo 2ch float
2023-05-02 17:40:27.2255|INFO|Lively.Core.Wallpapers.VideoMpvPlayer|Mpv0: VO: [gpu] 2512x1410 d3d11[nv12]
2023-05-02 17:40:48.1784|INFO|Lively.Core.WinDesktopCore|Sending wallpaper(Screen): \\.\DISPLAY1 | {X=0,Y=0,Width=4500,Height=3000}
2023-05-02 17:40:48.1983|INFO|Lively.Core.Watchdog.WatchdogProcess|Adding program to watchdog: 16740
2023-05-02 17:41:17.6153|INFO|Lively.Core.WinDesktopCore|Setting wallpaper: 童话镇 | C:\Users\tianw\Pictures\Wallpaper\童话镇.mov
2023-05-02 17:41:17.7243|INFO|Lively.Core.Wallpapers.VideoMpvPlayer|Mpv1:  (+) Video --vid=1 (*) (h264 1920x1080 23.976fps)
2023-05-02 17:41:17.7243|INFO|Lively.Core.Wallpapers.VideoMpvPlayer|Mpv1:  (+) Audio --aid=1 --alang=eng (*) (aac 2ch 44100Hz)
2023-05-02 17:41:17.9201|INFO|Lively.Core.Wallpapers.VideoMpvPlayer|Mpv1: Using hardware decoding (d3d11va).
2023-05-02 17:41:17.9692|INFO|Lively.Core.Wallpapers.VideoMpvPlayer|Mpv1: AO: [wasapi] 48000Hz stereo 2ch float
2023-05-02 17:41:17.9692|INFO|Lively.Core.Wallpapers.VideoMpvPlayer|Mpv1: VO: [gpu] 1920x1080 d3d11[nv12]
2023-05-02 17:41:32.4763|INFO|Lively.Core.Watchdog.WatchdogProcess|Cleared watchdog program(s)..
2023-05-02 17:41:32.4763|INFO|Lively.Core.WinDesktopCore|Sending wallpaper(Screen): \\.\DISPLAY1 | {X=0,Y=0,Width=4500,Height=3000}
2023-05-02 17:41:32.4913|INFO|Lively.Core.Watchdog.WatchdogProcess|Adding program to watchdog: 12408
2023-05-02 17:41:47.5688|INFO|Lively.Core.WinDesktopCore|Setting wallpaper: 大圣归来 | C:\Users\tianw\Pictures\Wallpaper\大圣归来.mp4
2023-05-02 17:41:47.6486|INFO|Lively.Core.Wallpapers.VideoMpvPlayer|Mpv2:  (+) Video --vid=1 (*) (h264 1920x1080 30.000fps)
2023-05-02 17:41:47.6486|INFO|Lively.Core.Wallpapers.VideoMpvPlayer|Mpv2:  (+) Audio --aid=1 --alang=eng (*) (aac 2ch 48000Hz)
2023-05-02 17:41:47.8564|INFO|Lively.Core.Wallpapers.VideoMpvPlayer|Mpv2: Using hardware decoding (d3d11va).
2023-05-02 17:41:47.9018|INFO|Lively.Core.Wallpapers.VideoMpvPlayer|Mpv2: AO: [wasapi] 48000Hz stereo 2ch float
2023-05-02 17:41:47.9048|INFO|Lively.Core.Wallpapers.VideoMpvPlayer|Mpv2: VO: [gpu] 1920x1080 => 1920x1188 d3d11[nv12]
2023-05-02 17:42:02.9753|INFO|Lively.Core.Watchdog.WatchdogProcess|Cleared watchdog program(s)..
2023-05-02 17:42:02.9753|INFO|Lively.Core.WinDesktopCore|Sending wallpaper(Screen): \\.\DISPLAY1 | {X=0,Y=0,Width=4500,Height=3000}
2023-05-02 17:42:02.9923|INFO|Lively.Core.Watchdog.WatchdogProcess|Adding program to watchdog: 2184
2023-05-02 17:42:09.1240|INFO|Lively.Core.WinDesktopCore|Setting wallpaper: 鲸落 | C:\Users\tianw\Pictures\Wallpaper\鲸落.mp4
2023-05-02 17:42:09.2006|INFO|Lively.Core.Wallpapers.VideoMpvPlayer|Mpv3:  (+) Video --vid=1 (*) (h264 2512x1410 30.000fps)
2023-05-02 17:42:09.2006|INFO|Lively.Core.Wallpapers.VideoMpvPlayer|Mpv3:  (+) Audio --aid=1 --alang=eng (*) (aac 2ch 48000Hz)
2023-05-02 17:42:09.4024|INFO|Lively.Core.Wallpapers.VideoMpvPlayer|Mpv3: Using hardware decoding (d3d11va).
2023-05-02 17:42:09.4478|INFO|Lively.Core.Wallpapers.VideoMpvPlayer|Mpv3: AO: [wasapi] 48000Hz stereo 2ch float
2023-05-02 17:42:09.4478|INFO|Lively.Core.Wallpapers.VideoMpvPlayer|Mpv3: VO: [gpu] 2512x1410 d3d11[nv12]
2023-05-02 17:42:09.4683|INFO|Lively.Core.Watchdog.WatchdogProcess|Cleared watchdog program(s)..
2023-05-02 17:42:09.4683|INFO|Lively.Core.WinDesktopCore|Sending wallpaper(Screen): \\.\DISPLAY1 | {X=0,Y=0,Width=4500,Height=3000}
2023-05-02 17:42:09.4824|INFO|Lively.Core.Watchdog.WatchdogProcess|Adding program to watchdog: 17628
2023-05-02 17:58:10.4919|INFO|Lively.Core.Watchdog.WatchdogProcess|Cleared watchdog program(s)..

2023-05-02 17:59:28.1937|INFO|Lively.App|
Lively v2.0.6.5 x64 desktop-bridge en-US
OS: Microsoft Windows 11 Pro 10.0.22621
CPU: Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz
GPU: NVIDIA GeForce GTX 1060

2023-05-02 17:59:29.2236|INFO|Lively.Helpers.WindowsStartup|Startup is enabled.
2023-05-02 17:59:30.9302|INFO|Lively.Core.WinDesktopCore|Restoring wallpaper 鲸落 | C:\Users\tianw\AppData\Local\Lively Wallpaper\Library\SaveData\wptmp\qz5ne3fz.gjb
2023-05-02 17:59:30.9302|INFO|Lively.Core.WinDesktopCore|Setting wallpaper: 鲸落 | C:\Users\tianw\Pictures\Wallpaper\鲸落.mp4
2023-05-02 17:59:31.0498|INFO|Lively.Core.WinDesktopCore|Core initialized..
2023-05-02 17:59:31.0498|INFO|Lively.Core.Watchdog.WatchdogProcess|Starting watchdog service...
2023-05-02 17:59:31.3345|INFO|Lively.Core.Wallpapers.VideoMpvPlayer|Mpv0:  (+) Video --vid=1 (*) (h264 2512x1410 30.000fps)
2023-05-02 17:59:31.3345|INFO|Lively.Core.Wallpapers.VideoMpvPlayer|Mpv0:  (+) Audio --aid=1 --alang=eng (*) (aac 2ch 48000Hz)
2023-05-02 17:59:31.5538|INFO|Lively.Core.Wallpapers.VideoMpvPlayer|Mpv0: Using hardware decoding (d3d11va).
2023-05-02 17:59:31.8419|INFO|Lively.Core.Wallpapers.VideoMpvPlayer|Mpv0: AO: [wasapi] 48000Hz stereo 2ch float
2023-05-02 17:59:31.8419|INFO|Lively.Core.Wallpapers.VideoMpvPlayer|Mpv0: VO: [gpu] 2512x1410 d3d11[nv12]
2023-05-02 17:59:31.8776|INFO|Lively.Core.WinDesktopCore|Sending wallpaper(Screen): \\.\DISPLAY1 | {X=0,Y=0,Width=4500,Height=3000}
2023-05-02 17:59:31.8878|INFO|Lively.Core.Watchdog.WatchdogProcess|Adding program to watchdog: 17808
2023-05-02 18:44:59.0354|INFO|Lively.Core.Wallpapers.VideoMpvPlayer|Mpv0: AO: [wasapi] 48000Hz stereo 2ch float
2023-05-02 19:05:58.1463|INFO|Lively.Core.Wallpapers.VideoMpvPlayer|Mpv0: AO: [wasapi] 48000Hz stereo 2ch float
rocksdanister commented 1 year ago
image

I need these folders, can you share it as a zip? alternatively you can also use the tray-menu to create the zip:

image image

(This UI is rendered by core and will work even if main UI don't.)

tianweix commented 1 year ago

Sure, here's the zip created by the 'Create log report file' button. BTW, I got a screenshot with the black window before it disappeared. lively_log_20230502_212113.zip Screenshot 2023-05-02 212037

rocksdanister commented 1 year ago

Can you check Event Viewer Lively.UI.WinUI error:

image

UI logs are otherwise empty.

tianweix commented 1 year ago

Found the error, (not sure if that's what you're asking for though, I don't have any windows app dev experience) image


Faulting module name: Microsoft.ui.xaml.dll, version: 3.1.3.0, time stamp: 0x6b833c08
Exception code: 0xc000027b
Fault offset: 0x0025fe0e
Faulting process id: 0x0xDD4
Faulting application start time: 0x0x1D97CF8DE299A6C
Faulting application path: C:\Program Files\WindowsApps\12030rocksdanister.LivelyWallpaper_1.0.133.0_x86__97hta09mmv6hy\Lively.UI.WinUI.exe
Faulting module path: C:\Program Files\WindowsApps\Microsoft.WindowsAppRuntime.1.3_3000.820.152.0_x86__8wekyb3d8bbwe\Microsoft.ui.xaml.dll
Report Id: 8f8fc1e2-2cea-4584-bf36-1aa74bc929c7
Faulting package full name: 12030rocksdanister.LivelyWallpaper_1.0.133.0_x86__97hta09mmv6hy```
rocksdanister commented 1 year ago

I made a report directly https://github.com/microsoft/WindowsAppSDK/issues/2980

May need to create a new one since its closed, lets see. Thanks for the help.

siriume commented 1 year ago

same here.

josunyjostar commented 1 year ago

image lively_log_20230505_154358.zip Your app is very cool. However, I am having the same problem. (Force Quit Application) Attach a log file. May your wonderful program be improved

bpulliam commented 1 year ago

WinAppSDK 1.3.1 (1.3.230502000) is out and contains a fix for the SystemBackdrop issue that I believe is what you're hitting. Give it a try and let me know.

rocksdanister commented 1 year ago

@josunyjostar @tianweix @siriume Can you try the latest beta installer: https://github.com/rocksdanister/lively-beta/releases/tag/v2.0.6.7

josunyjostar commented 1 year ago

It's working. It's made my life a little richer. Thank you.

siriume commented 1 year ago

Using the latest version still crashes lively_log_20230511_085833.zip

AzazelHD commented 1 year ago

For me it doesnt even open. Tho you can pause or change backgrounds right clicking the tray icon, but the "open lively" doesnt open the GUI at all. And since i reinstalled to see if that solves the problem, I can't set up back my backgrounds (on latest lively version)

rocksdanister commented 1 year ago

Are you running v2.0.6.7?

AzazelHD commented 1 year ago

Mmmm today, when I turned on my pc, I had an update for lively, I think it was 2.0.6.6. The "open lively" from tray icon still not working, after downloading an installing the newest update. However, after restarting my PC, I still cant open lively, but I can report a bug, by creating a log file. So i did it, and inside it, in settings.json, AppVersion is still 2.0.6.5.

EDIT: I upload here my latest logs, created at the time of posting this comment lively_log_20230511_151135.zip

AzazelHD commented 1 year ago

Are you running v2.0.6.7?

Also, on your official web page, by downloading the installer, it is 2.0.6.6, not .7. This is the name of the file by default when clicking on download installer: https://gyazo.com/c1fa5702b3111cc3f2b25865ae331c60

Sobble2546 commented 1 year ago

same here (send this to get update it on my mail)

rocksdanister commented 1 year ago

Just to confirm, people having the issue does it still crash with older version of Lively (v2.0.6.1) using WindowsAppSDK v1.2 : https://github.com/rocksdanister/lively/releases/tag/v2.0.6.1

I may have to push an update downgrading the sdk at this point.

Aerophus commented 1 year ago

Similar issues here with v2.0.6.6 Bug report lively_log_20230610_053353.zip

Faulting module name: Microsoft.ui.xaml.dll, version: 3.1.3.0, time stamp: 0x503f6125
Exception code: 0xc000027b
Fault offset: 0x0025fe6e
Faulting process ID: 0x2fd0
Faulting application start time: 0x01d99b093526b351
Faulting application path: C:\Program Files (x86)\Lively Wallpaper\plugins\UI\Lively.UI.WinUI.exe
Faulting module path: C:\Program Files (x86)\Lively Wallpaper\plugins\UI\Microsoft.ui.xaml.dll

Changing to v2.0.6.1 as suggested works!

siriume commented 1 year ago

Similar issues here with v2.0.7.0 Bug report lively_log_20230711_100603.zip Lively.UI.WinUI.exe.17532.dmp with in it.

pshigorlins commented 1 year ago

Screenshot_2

pshigorlins commented 1 year ago

I reinstalled for windows 10 and it worked normally in the current version

rocksdanister commented 5 months ago

Can you try changing region format https://github.com/rocksdanister/lively/issues/2187#issuecomment-2049024898