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

Crash when open application UI #1691

Open
tianweix opened this issue May 2, 2023 · 25 comments
Open

Crash when open application UI #1691

tianweix opened this issue May 2, 2023 · 25 comments
Labels
bug Something isn't working framework framework related issue unable to reproduce

Comments

@tianweix
Copy link

tianweix commented May 2, 2023

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):

  • OS: Windows 11, 22621.1635
  • Surface Studio 2, Intel(R) Core(TM) i7-7820HQ CPU, NVIDIA GeForce GTX 1060
  • Which wallpaper was running at the time if any: A customed video .mp4, but the bug doesn't seem to be related to any wallpaper type.

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.

@tianweix tianweix added the bug Something isn't working label May 2, 2023
@rocksdanister
Copy link
Owner

-> 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
Copy link
Owner

rocksdanister commented May 2, 2023

If the AppData directory creation fails Lively core will refuse to start with a message:

try
{
//create directories if not exist, eg: C:\Users\<User>\AppData\Local
Directory.CreateDirectory(Constants.CommonPaths.AppDataDir);
Directory.CreateDirectory(Constants.CommonPaths.LogDir);
Directory.CreateDirectory(Constants.CommonPaths.ThemeDir);
Directory.CreateDirectory(Constants.CommonPaths.TempDir);
Directory.CreateDirectory(Constants.CommonPaths.TempCefDir);
Directory.CreateDirectory(Constants.CommonPaths.TempVideoDir);
Directory.CreateDirectory(Constants.CommonPaths.ThemeCacheDir);
}
catch (Exception ex)
{
//nothing much can be done here..
MessageBox.Show(ex.Message, "AppData directory creation failed, exiting Lively..", MessageBoxButton.OK, MessageBoxImage.Error);
ShutDown();
return;
}

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
Copy link
Author

tianweix commented May 2, 2023

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
Copy link
Owner

rocksdanister commented May 2, 2023

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
Copy link
Author

tianweix commented May 2, 2023

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
Copy link
Owner

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

UI logs are otherwise empty.

@tianweix
Copy link
Author

tianweix commented May 2, 2023

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
Copy link
Owner

I made a report directly microsoft/WindowsAppSDK#2980

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

@siriume
Copy link

siriume commented May 4, 2023

same here.

@josunyjostar
Copy link

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
Copy link

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
Copy link
Owner

rocksdanister commented May 10, 2023

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

This was referenced May 10, 2023
@josunyjostar
Copy link

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

@siriume
Copy link

siriume commented May 10, 2023

Using the latest version still crashes
lively_log_20230511_085833.zip

@AzazelHD

This comment was marked as off-topic.

@rocksdanister

This comment was marked as outdated.

@AzazelHD
Copy link

AzazelHD commented May 11, 2023

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

This comment was marked as outdated.

@Sobble2546
Copy link

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

@rocksdanister
Copy link
Owner

rocksdanister commented Jun 7, 2023

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
Copy link

Aerophus commented Jun 9, 2023

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
Copy link

siriume commented Jul 11, 2023

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
Copy link

Screenshot_2

@pshigorlins
Copy link

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

@rocksdanister
Copy link
Owner

Can you try changing region format #2187 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working framework framework related issue unable to reproduce
Projects
None yet
Development

No branches or pull requests

9 participants