PowerToys icon indicating copy to clipboard operation
PowerToys copied to clipboard

[Run] ExternalException: A generic error occurred in GDI+.

Open andycianci opened this issue 1 year ago • 4 comments
trafficstars

Microsoft PowerToys version

0.77.0.0

Installation method

PowerToys auto-update

Running as admin

Yes

Area(s) with issue?

Installer

Steps to reproduce

runner-log_2024-01-09.txt 2024-01-09.txt

✔️ Expected Behavior

No response

❌ Actual Behavior

No response

Other Software

No response

andycianci avatar Jan 09 '24 19:01 andycianci

System.Runtime.InteropServices.ExternalException: A generic error occurred in GDI+.
   Source: System.Drawing.Common
   TargetAssembly: System.Drawing.Common, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
   TargetModule: System.Drawing.Common.dll
   TargetSite: System.Drawing.FontFamily get_GenericSansSerif()
   at System.Drawing.FontFamily.get_GenericSansSerif()
   at Wox.Infrastructure.UserSettings.PowerToysRunSettings..ctor()
   at .ctor()
   at System.Text.Json.Serialization.Converters.ObjectDefaultConverter`1.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value)
   at System.Text.Json.Serialization.JsonConverter`1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value, Boolean& isPopulatedValue)
   at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
   at System.Text.Json.JsonSerializer.ReadFromSpan[TValue](ReadOnlySpan`1 utf8Json, JsonTypeInfo`1 jsonTypeInfo, Nullable`1 actualByteCount)
   at System.Text.Json.JsonSerializer.ReadFromSpan[TValue](ReadOnlySpan`1 json, JsonTypeInfo`1 jsonTypeInfo)
   at System.Text.Json.JsonSerializer.Deserialize[TValue](String json, JsonSerializerOptions options)
   at Wox.Infrastructure.Storage.JsonStorage`1.LoadDefault()
   at Wox.Infrastructure.Storage.JsonStorage`1.Load()
   at PowerLauncher.ViewModel.SettingWindowViewModel..ctor()
   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)

davidegiacometti avatar Jan 10 '24 10:01 davidegiacometti

@jaimecbernardo Many property from the wox porting are still present in PowerToysRunSettings: we don't have option for font. https://github.com/microsoft/PowerToys/blob/8bdbeb41d4fe143425648c153c06049d1865380e/src/modules/launcher/Wox.Infrastructure/UserSettings/PowerToysRunSettings.cs#L201

davidegiacometti avatar Jan 10 '24 10:01 davidegiacometti

Interesting. Wonder if that's what's causing it. Pretty weird that the user is crashing on initializing this 🤔 Let's just remove this I think. @andycianci , Did PowerToys Run work on any previous version for you or is this the first time you're installing it?

jaimecbernardo avatar Jan 10 '24 10:01 jaimecbernardo

I am fine with cleaning up unused stuffs: I will open a PR for that 😃

davidegiacometti avatar Jan 10 '24 10:01 davidegiacometti

Hi, this has been worked on for the 0.78 development cycle. 😄 Please update PowerToys to the latest: https://github.com/microsoft/PowerToys/releases

jaimecbernardo avatar Feb 01 '24 11:02 jaimecbernardo