microsoft / PowerToys

Windows system utilities to maximize productivity
MIT License
111.39k stars 6.56k forks source link

Error trying to open FancyZones editor #7937

Closed AndrewPetz closed 3 years ago

AndrewPetz commented 4 years ago

ℹ Computer information

📝 Provide detailed reproduction steps (if any)

  1. Make sure PowerToys is open, then either: 2a. Press the shortcut to open the FancyZones editor OR 2b. Click the FancyZones editor button in the PowerToys UI

Potentially important note: I just purchased an LG 34GP83A-B ultrawide monitor, and this only started after I set it up with my PC.

✔️ Expected result

The FancyZones editor opens

❌ Actual result

I get an error message:

Error parsing device info data.: Could not load file or assembly 'System.Numerics.Vectors, Version=4.1.3.0, Culture=neutral, PublicKeyToken=b03f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

📷 Screenshots

image

ghost commented 4 years ago

System.Numerics.Vectors is missing. That shouldn't happen

/cc @crutkas @enricogior

AndrewPetz commented 4 years ago

I just tried uninstalling and reinstalling (probably should have done that earlier haha) and I'm getting the same error message.

crutkas commented 4 years ago

my hunch on #7850 isn't right which was unsigned since that is a signed file (while old sig, still signed).

@andrewpetz can you take a screenshot of the files in. Should be 17 files and 34 items total C:\Program Files\PowerToys\modules\FancyZones

Also what malware / virus protection are you running?

Here is a pic of my folder image

AndrewPetz commented 4 years ago

@crutkas Here's the screenshot:

image

I'm running the default Windows Security, no additional antivirus other than the occasional manual Malwarebytes scan.

crutkas commented 4 years ago

now that is weird, the file is there.

crutkas commented 4 years ago

@AndrewPetz Can you run this command in PowerShell and paste the output? Get-FileHash 'C:\Program Files\PowerToys\modules\FancyZones\System.Numerics.Vectors.dll'

here was mine: Algorithm Hash Path


SHA256 1D3EF8698281E7CF7371D1554AFEF5872B39F96C26DA772210A33DA041BA1183

AndrewPetz commented 4 years ago

@crutkas Here you go:

SHA256 1D3EF8698281E7CF7371D1554AFEF5872B39F96C26DA772210A33DA041BA1183

crutkas commented 4 years ago

Betting you're on .net framework 4.8 based on your OS version.

honestly a bit unsure why. Happens every time? can you try to just run FancyZoneEditor.exe straight? it will error but would be interesting what happens

crutkas commented 4 years ago
AndrewPetz commented 4 years ago

Yes I do have .NET Framework 4.8 installed, and yeah it does happen every time.

Yep that's all that happened.

image

crutkas commented 4 years ago

Here is the interesting thing, via direct, it works. Via the setting app it doesn't

Can you see if it launches if PT isn't running as admin?

Does it work via the hot key?

crutkas commented 4 years ago

Trying to see maybe it is a launch permutation

AndrewPetz commented 4 years ago

@crutkas I just double-checked and I get the same result with and without running as admin, and both trying to launch it from the app and using the hotkey.

AndrewPetz commented 4 years ago

Also, I updated my Windows 10 last night and am now on build 19042.630. No change in what's happening with PowerToys but thought I'd let you know.

enricogior commented 4 years ago

@AndrewPetz can you post the properties Details tab of System.Numerics.Vectors.dll? Also, try moving the dll to the desktop and then open again the FZ editor using the shortcut or from the Settings page, are you getting the same error or a different one?

image

AndrewPetz commented 4 years ago

@enricogior sure. Here's the details tab:

image

When I moved System.Numerics.Vectors.dllto the desktop and tried opening the FanzyZones editor again I got a different message:

image

After moving it back into the FancyZones folder, I got the same message I was getting before.

ghost commented 4 years ago

Both are exactly the same!

enricogior commented 4 years ago

@AndrewPetz thanks. Now I'm wondering if it's another DLL that is trying to load System.Numerics.Vectors.dll while expecting a different version.

enricogior commented 3 years ago

@AndrewPetz is this still happening with 0.27?

AndrewPetz commented 3 years ago

@enricogior Thanks for checking back with me!

I updated to 0.27 and I'm still getting the same error, but there are some differences. I'm able to open the editor, but when I do, I get two error messages before it opens:

image

image

I'm able to select pre-made layouts to use, but get another error when I try to save a custom layout:

image

Here are the contents of that file:

Expand ## Exception ``` System.IO.FileLoadException: Could not load file or assembly 'System.Numerics.Vectors, Version=4.1.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) Source: System.Memory TargetAssembly: System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 TargetModule: System.Memory.dll TargetSite: Int32 IndexOf(Byte ByRef, Byte, Int32) at System.SpanHelpers.IndexOf(Byte& searchSpace, Byte value, Int32 length) at System.Text.Json.Utf8JsonReader.ConsumeIntegerDigits(ReadOnlySpan`1& data, Int32& i) at System.Text.Json.Utf8JsonReader.TryGetNumber(ReadOnlySpan`1 data, Int32& consumed) at System.Text.Json.Utf8JsonReader.ConsumeNumber() at System.Text.Json.Utf8JsonReader.ConsumeValue(Byte marker) at System.Text.Json.Utf8JsonReader.ReadSingleSegment() at System.Text.Json.Utf8JsonReader.Read() at System.Text.Json.JsonDocument.TryParseValue(Utf8JsonReader& reader, JsonDocument& document, Boolean shouldThrow) at System.Text.Json.Serialization.Converters.JsonConverterJsonElement.Read(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options) at System.Text.Json.JsonPropertyInfoNotNullable`4.OnRead(ReadStack& state, Utf8JsonReader& reader) at System.Text.Json.JsonSerializer.ReadCore(JsonSerializerOptions options, Utf8JsonReader& reader, ReadStack& readStack) at System.Text.Json.JsonSerializer.ReadCore(Type returnType, JsonSerializerOptions options, Utf8JsonReader& reader) at System.Text.Json.JsonSerializer.Deserialize(String json, Type returnType, JsonSerializerOptions options) at System.Text.Json.JsonSerializer.Deserialize[TValue](String json, JsonSerializerOptions options) at FancyZonesEditor.Models.CanvasLayoutModel.PersistData() at FancyZonesEditor.EditorWindow.OnSaveApplyTemplate(Object sender, RoutedEventArgs e) at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args) at System.Windows.Controls.Primitives.ButtonBase.OnClick() at System.Windows.Controls.Button.OnClick() at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e) at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target) at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs) at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent) at System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e) at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target) at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs) at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args) at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args) at System.Windows.Input.InputManager.ProcessStagingArea() at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input) at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport) at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel) at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o) 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) at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs) at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam) at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg) at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame) at System.Windows.Application.RunDispatcher(Object ignore) at System.Windows.Application.RunInternal(Window window) at FancyZonesEditor.App.Main() ``` ## Environment * Command Line: "C:\Program Files\PowerToys\modules\FancyZones\FancyZonesEditor.exe" 42836/0/GSM774B#5&2442797f&0&UID33029_3440_1440_{B16A1F92-0037-4796-A310-AD0866BF7453}/2/AUS28B1#5&2442797f&0&UID33024_3840_2160_{B16A1F92-0037-4796-A310-AD0866BF7453}/144/3440/-420/GSM774B#5&2442797f&0&UID33029_3440_1440_{B16A1F92-0037-4796-A310-AD0866BF7453}/96/0/0/ * Timestamp: 12/01/2020 18:05:17 * OS Version: Microsoft Windows NT 6.2.9200.0 * IntPtr Length: 8 * x64: True * CLR Version: 4.0.30319.42000 ## Assemblies - FancyZonesEditor.exe * FancyZonesEditor, Version=0.27.0.0, Culture=neutral, PublicKeyToken=null (C:\Program Files\PowerToys\modules\FancyZones\FancyZonesEditor.exe) * System.Text.Json, Version=4.0.1.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 (C:\Program Files\PowerToys\modules\FancyZones\System.Text.Json.dll) * System.IO.Abstractions, Version=12.0.0.0, Culture=neutral, PublicKeyToken=96bf224d23c43e59 (C:\Program Files\PowerToys\modules\FancyZones\System.IO.Abstractions.dll) * MahApps.Metro, Version=2.0.0.0, Culture=neutral, PublicKeyToken=51482d6f650b2b3f (C:\Program Files\PowerToys\modules\FancyZones\MahApps.Metro.dll) * ControlzEx, Version=4.0.0.0, Culture=neutral, PublicKeyToken=69f1c32f803d307e (C:\Program Files\PowerToys\modules\FancyZones\ControlzEx.dll) * ManagedCommon, Version=0.27.0.0, Culture=neutral, PublicKeyToken=null (C:\Program Files\PowerToys\modules\FancyZones\ManagedCommon.dll) * Telemetry, Version=0.27.0.0, Culture=neutral, PublicKeyToken=null (C:\Program Files\PowerToys\modules\FancyZones\Telemetry.dll) * System.Runtime.CompilerServices.Unsafe, Version=4.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a (C:\Program Files\PowerToys\modules\FancyZones\System.Runtime.CompilerServices.Unsafe.dll) * Microsoft.Xaml.Behaviors, Version=1.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a (C:\Program Files\PowerToys\modules\FancyZones\Microsoft.Xaml.Behaviors.dll) * System.Text.Encodings.Web, Version=4.0.5.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 (C:\Program Files\PowerToys\modules\FancyZones\System.Text.Encodings.Web.dll) * mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 (C:\Windows\Microsoft.NET\Framework64\v4.0.30319\mscorlib.dll) * System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 (C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll) * System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 (C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll) * PresentationFramework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 (C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\PresentationFramework\v4.0_4.0.0.0__31bf3856ad364e35\PresentationFramework.dll) * WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 (C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\WindowsBase\v4.0_4.0.0.0__31bf3856ad364e35\WindowsBase.dll) * PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 (C:\WINDOWS\Microsoft.Net\assembly\GAC_64\PresentationCore\v4.0_4.0.0.0__31bf3856ad364e35\PresentationCore.dll) * System.Xaml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 (C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Xaml\v4.0_4.0.0.0__b77a5c561934e089\System.Xaml.dll) * System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a (C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll) * System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 (C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll) * System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a (C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll) * System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 (C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms\v4.0_4.0.0.0__b77a5c561934e089\System.Windows.Forms.dll) * PresentationFramework.Aero2, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 (C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\PresentationFramework.Aero2\v4.0_4.0.0.0__31bf3856ad364e35\PresentationFramework.Aero2.dll) * PresentationFramework-SystemXml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 (C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\PresentationFramework-SystemXml\v4.0_4.0.0.0__b77a5c561934e089\PresentationFramework-SystemXml.dll) * System.Windows.Controls.Ribbon, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 (C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Controls.Ribbon\v4.0_4.0.0.0__b77a5c561934e089\System.Windows.Controls.Ribbon.dll) * netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 (C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\netstandard\v4.0_2.0.0.0__cc7b13ffcd2ddd51\netstandard.dll) * System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 (C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Memory\v4.0_4.0.1.1__cc7b13ffcd2ddd51\System.Memory.dll) * System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 (C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Buffers\v4.0_4.0.3.0__cc7b13ffcd2ddd51\System.Buffers.dll) * UIAutomationTypes, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 (C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\UIAutomationTypes\v4.0_4.0.0.0__31bf3856ad364e35\UIAutomationTypes.dll) * UIAutomationProvider, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 (C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\UIAutomationProvider\v4.0_4.0.0.0__31bf3856ad364e35\UIAutomationProvider.dll) * Microsoft.Bcl.AsyncInterfaces, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 (C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\Microsoft.Bcl.AsyncInterfaces\v4.0_1.0.0.0__cc7b13ffcd2ddd51\Microsoft.Bcl.AsyncInterfaces.dll) * System.Numerics.Vectors,

So it looks like I'm now able to open the editor, but it's failing because it's unable to find System.Numerics.Vectors.

Let me know if you need any more details!

enricogior commented 3 years ago

@AndrewPetz is it acceptable for you to install a private unsigned build? If it is, I will send you an updated version of the editor to test it.

AndrewPetz commented 3 years ago

@enricogior I'd be ok with that!

enricogior commented 3 years ago

@AndrewPetz this is a build based on the current master branch that is work in progress for the 0.29 release, so it contains all the feature of 0.27 + some stuff that may be unstable. The version number is 0.0.1 to distinguish it from stable releases. Also it doesn't auto update when a new official build is released. Let me know if this solves the FZ Editor bug. Thanks.

PowerToysSetup-0.0.1-x64-unsigned.zip

AndrewPetz commented 3 years ago

@enricogior That worked! I was able to open the editor, create a couple custom layouts, and use them.

enricogior commented 3 years ago

@AndrewPetz great, thank you for testing it. The new code will be released at the end of December, we'll close this issue at that time and notify here when the new version is available.

crutkas commented 3 years ago

@enricogior do we have a parent issue for this fix or are we deeming the the work in progress item for 0.29?

enricogior commented 3 years ago

@crutkas this was fixed by https://github.com/microsoft/PowerToys/pull/8122

crutkas commented 3 years ago

Fixed with 0.29, released today. https://github.com/microsoft/PowerToys/releases/tag/v0.29.0