microsoft / PowerToys

Windows system utilities to maximize productivity
MIT License
109.77k stars 6.46k forks source link

PowerToys crashes over missing app.dark.png file #25134

Closed ghost closed 1 year ago

ghost commented 1 year ago

Microsoft PowerToys version

0.68.1

Installation method

PowerToys auto-update

Running as admin

No

Area(s) with issue?

PowerToys Run

Steps to reproduce

Upon launching PowerToys 0.68.1, I receive an error dialog warning about a missing file for PowerToys Run. The dialog notes that an error log file has been reported to C:\Users\%USERNAME%\AppData\Local\Microsoft\PowerToys\PowerToys Run\Logs - contents of this file are below.


[2023-03-30 08:19:52.8671] [INFO] [C:\a_work\1\s\src\modules\launcher\PowerLauncher\App.xaml.cs::63] Starting PowerToys Run with PID=14708

[2023-03-30 08:19:52.9671] [INFO] [C:\a_work\1\s\src\modules\launcher\PowerLauncher\App.xaml.cs::74] Runner pid=13948

[2023-03-30 08:19:54.5368] [INFO] [C:\a_work\1\s\src\modules\launcher\PowerLauncher\App.xaml.cs::116] On Startup.

[2023-03-30 08:19:54.8716] [FATAL]

Exception

System.IO.FileNotFoundException: Could not find file 'C:\Program Files\PowerToys\modules\launcher\Images\app.dark.png'.
   Source: System.Private.CoreLib
   TargetAssembly: System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
   TargetModule: System.Private.CoreLib.dll
   TargetSite: Microsoft.Win32.SafeHandles.SafeFileHandle CreateFile(System.String, System.IO.FileMode, System.IO.FileAccess, System.IO.FileShare, System.IO.FileOptions)
   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.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
   at System.Windows.Media.Imaging.BitmapDecoder.SetupDecoderFromUriOrStream(Uri uri, Stream stream, BitmapCacheOption cacheOption, Guid& clsId, Boolean& isOriginalWritable, Stream& uriStream, UnmanagedMemoryStream& unmanagedMemoryStream, SafeFileHandle& safeFilehandle)
   at System.Windows.Media.Imaging.BitmapDecoder.CreateFromUriOrStream(Uri baseUri, Uri uri, Stream stream, BitmapCreateOptions createOptions, BitmapCacheOption cacheOption, RequestCachePolicy uriCachePolicy, Boolean insertInDecoderCache)
   at System.Windows.Media.Imaging.BitmapImage.FinalizeCreation()
   at Wox.Infrastructure.Image.ImageLoader.Initialize(Theme theme)
   at PowerLauncher.App.<>c__DisplayClass19_0.<OnStartup>b__0()
   at Wox.Infrastructure.Stopwatch.Normal(String message, Action action)
   at PowerLauncher.App.OnStartup(Object sender, StartupEventArgs e)
   at System.Windows.Application.<.ctor>b__1_0(Object unused)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

Environment

Assemblies - PowerToys.PowerLauncher

[2023-03-30 13:49:09.2116] [INFO] [C:\a_work\1\s\src\modules\launcher\PowerLauncher\App.xaml.cs::278] Start PowerToys Run Exit----------------------------------------------------

[2023-03-30 13:49:09.8170] [INFO] [C:\a_work\1\s\src\modules\launcher\Wox.Plugin\PluginPair.cs::126] Load cost for is <15ms>

[2023-03-30 13:49:09.8257] [INFO] [C:\a_work\1\s\src\modules\launcher\Wox.Plugin\PluginPair.cs::126] Load cost for is <7ms>

[2023-03-30 13:49:09.8257] [INFO] [C:\a_work\1\s\src\modules\launcher\Wox.Plugin\PluginPair.cs::126] Load cost for is <4ms>

[2023-03-30 13:49:09.8377] [INFO] [C:\a_work\1\s\src\modules\launcher\Wox.Plugin\PluginPair.cs::126] Load cost for is <3ms>

[2023-03-30 13:49:09.8377] [INFO] [C:\a_work\1\s\src\modules\launcher\Wox.Plugin\PluginPair.cs::126] Load cost for is <1ms>

[2023-03-30 13:49:09.9830] [INFO] [C:\a_work\1\s\src\modules\launcher\Wox.Plugin\PluginPair.cs::126] Load cost for is <139ms>

[2023-03-30 13:49:09.9830] [INFO] [C:\a_work\1\s\src\modules\launcher\Wox.Plugin\PluginPair.cs::126] Load cost for is <1ms>

[2023-03-30 13:49:09.9830] [INFO] [C:\a_work\1\s\src\modules\launcher\Wox.Plugin\PluginPair.cs::126] Load cost for is <3ms>

[2023-03-30 13:49:10.0239] [INFO] [C:\a_work\1\s\src\modules\launcher\Wox.Plugin\PluginPair.cs::126] Load cost for is <30ms>

[2023-03-30 13:49:10.0314] [INFO] [C:\a_work\1\s\src\modules\launcher\Wox.Plugin\PluginPair.cs::126] Load cost for is <5ms>

[2023-03-30 13:49:10.0314] [INFO] [C:\a_work\1\s\src\modules\launcher\Wox.Plugin\PluginPair.cs::126] Load cost for

[2023-03-30 13:49:10.0314] [INFO] [C:\a_work\1\s\src\modules\launcher\Wox.Plugin\PluginPair.cs::126] Load cost for is <1ms>

[2023-03-30 13:49:10.0534] [INFO] [C:\a_work\1\s\src\modules\launcher\Wox.Plugin\PluginPair.cs::126] Load cost for is <14ms>

[2023-03-30 13:49:10.2292] [INFO] [C:\a_work\1\s\src\modules\launcher\Wox.Plugin\PluginPair.cs::126] Load cost for is <174ms>

[2023-03-30 13:49:10.2292] [INFO] [C:\a_work\1\s\src\modules\launcher\Wox.Plugin\PluginPair.cs::126] Load cost for is <2ms>

[2023-03-30 13:49:10.2292] [INFO] [C:\a_work\1\s\src\modules\launcher\Wox.Plugin\PluginPair.cs::126] Load cost for is <4ms>

[2023-03-30 13:49:10.2495] [INFO] [C:\a_work\1\s\src\modules\launcher\Wox.Plugin\PluginPair.cs::126] Load cost for is <6ms>

[2023-03-30 13:49:10.3763] [INFO] [C:\a_work\1\s\src\modules\launcher\Wox.Plugin\PluginPair.cs::126] Load cost for is <125ms>

[2023-03-30 13:49:10.4007] [INFO] [C:\a_work\1\s\src\modules\launcher\PowerLauncher\App.xaml.cs::296] End PowerToys Run Exit ----------------------------------------------------

[2023-03-30 13:49:10.4007] [INFO] [C:\a_work\1\s\src\modules\launcher\Wox.Infrastructure\Stopwatch.cs::50] App.OnExit - Exit cost <1190ms>

[2023-03-30 13:53:25.2894] [INFO] [C:\a_work\1\s\src\modules\launcher\PowerLauncher\App.xaml.cs::105] Runner with pid=13948 exited. Exiting PowerToys Run

✔️ Expected Behavior

To launch PowerToys application without any kind of error dialog.

❌ Actual Behavior

When PowerToys first launches, it returns an error dialog ("PowerToys Run ran into an issue") with a pointer to a log file within C:\Users\%USERNAME%\AppData\Local\Microsoft\PowerToys\PowerToys Run\Logs.

Log file suggests this is due to an System.IO.FileNotFoundException on some icon image:

Could not find file 'C:\ProgramFiles\PowerToys\modules\launcher\Images\app.dark.png'. I checked that directory within File Explorer, and it does appear that app.dark.png is missing (and that this is not simply a permissions issue). I can see app.light.pngand the light & dark app_errorimages.

I was able to copy the app.dark.png image from a different PC where PowerToys was installed into the specified folder, and that seems to have stopped the error from occurring.

Perhaps it is worth double-checking if the native PowerToys update installer is including this image file?

Other Software

No response

crutkas commented 1 year ago

/dup #19871

microsoft-github-policy-service[bot] commented 1 year ago

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!