Powertoys: [FZ Editor] System.ComponentModel.Win32Exception

Created on 1 Oct 2020  路  12Comments  路  Source: microsoft/PowerToys

I got also an error. Trying to edit the custom FancyZones. FZEditorCrashLog.txt contains:

Exception

System.ComponentModel.Win32Exception: Das System kann die angegebene Datei nicht finden
   Source: MahApps.Metro
   TargetAssembly: MahApps.Metro, Version=2.0.0.0, Culture=neutral, PublicKeyToken=51482d6f650b2b3f
   TargetModule: MahApps.Metro.dll
   TargetSite: System.String GetWindowText(System.Windows.Window)
   bei MahApps.Metro.Controls.WinApiHelper.GetWindowText(Window window)
   bei MahApps.Metro.Automation.Peers.MetroWindowAutomationPeer.GetNameCore()
   bei System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree()
   bei System.Windows.ContextLayoutManager.fireAutomationEvents()
   bei System.Windows.ContextLayoutManager.UpdateLayout()
   bei System.Windows.Interop.HwndSource.SetLayoutSize()
   bei System.Windows.Interop.HwndSource.set_RootVisualInternal(Visual value)
   bei System.Windows.Window.SetRootVisual()
   bei System.Windows.Window.SetRootVisualAndUpdateSTC()
   bei System.Windows.Window.SetupInitialState(Double requestedTop, Double requestedLeft, Double requestedWidth, Double requestedHeight)
   bei System.Windows.Window.CreateSourceWindow(Boolean duringShow)
   bei System.Windows.Window.ShowHelper(Object booleanBox)
   bei FancyZonesEditor.MainWindow.EditLayout_Click(Object sender, RoutedEventArgs e)
   bei System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   bei System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   bei System.Windows.Controls.Primitives.ButtonBase.OnClick()
   bei System.Windows.Controls.Button.OnClick()
   bei System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
   bei System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   bei System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   bei System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   bei System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
   bei System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)
   bei System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   bei System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   bei System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   bei System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   bei System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
   bei System.Windows.Input.InputManager.ProcessStagingArea()
   bei System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
   bei System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
   bei System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
   bei System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   bei System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   bei MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   bei MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   bei System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   bei System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   bei System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   bei MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   bei MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
   bei System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
   bei System.Windows.Application.RunDispatcher(Object ignore)
   bei System.Windows.Application.RunInternal(Window window)
   bei FancyZonesEditor.App.Main()

Environment

  • Command Line: "C:Program FilesPowerToysmodulesFancyZonesFancyZonesEditor.exe" 0_0_3840_1560 "15216"
  • Timestamp: 10/01/2020 07:26:54
  • 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.23.0.0, Culture=neutral, PublicKeyToken=null (C:Program FilesPowerToysmodulesFancyZonesFancyZonesEditor.exe)

  • System.Text.Json, Version=4.0.1.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 (C:Program FilesPowerToysmodulesFancyZonesSystem.Text.Json.dll)
  • System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 (C:Program FilesPowerToysmodulesFancyZonesSystem.Memory.dll)
  • System.Runtime.CompilerServices.Unsafe, Version=4.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a (C:Program FilesPowerToysmodulesFancyZonesSystem.Runtime.CompilerServices.Unsafe.dll)
  • System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 (C:Program FilesPowerToysmodulesFancyZonesSystem.Buffers.dll)
  • System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a (C:Program FilesPowerToysmodulesFancyZonesSystem.Numerics.Vectors.dll)
  • System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 (C:Program FilesPowerToysmodulesFancyZonesSystem.ValueTuple.dll)
  • MahApps.Metro, Version=2.0.0.0, Culture=neutral, PublicKeyToken=51482d6f650b2b3f (C:Program FilesPowerToysmodulesFancyZonesMahApps.Metro.dll)
  • ControlzEx, Version=4.0.0.0, Culture=neutral, PublicKeyToken=69f1c32f803d307e (C:Program FilesPowerToysmodulesFancyZonesControlzEx.dll)
  • ManagedCommon, Version=0.23.0.0, Culture=neutral, PublicKeyToken=null (C:Program FilesPowerToysmodulesFancyZonesManagedCommon.dll)
  • Telemetry, Version=0.23.0.0, Culture=neutral, PublicKeyToken=null (C:Program FilesPowerToysmodulesFancyZonesTelemetry.dll)
  • Microsoft.Xaml.Behaviors, Version=1.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a (C:Program FilesPowerToysmodulesFancyZonesMicrosoft.Xaml.Behaviors.dll)
  • mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 (C:WindowsMicrosoft.NETFramework64v4.0.30319mscorlib.dll)
  • System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 (C:WINDOWSMicrosoft.NetassemblyGAC_MSILSystemv4.0_4.0.0.0__b77a5c561934e089System.dll)
  • System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 (C:WINDOWSMicrosoft.NetassemblyGAC_MSILSystem.Corev4.0_4.0.0.0__b77a5c561934e089System.Core.dll)
  • PresentationFramework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 (C:WINDOWSMicrosoft.NetassemblyGAC_MSILPresentationFrameworkv4.0_4.0.0.0__31bf3856ad364e35PresentationFramework.dll)
  • WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 (C:WINDOWSMicrosoft.NetassemblyGAC_MSILWindowsBasev4.0_4.0.0.0__31bf3856ad364e35WindowsBase.dll)
  • PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 (C:WINDOWSMicrosoft.NetassemblyGAC_64PresentationCorev4.0_4.0.0.0__31bf3856ad364e35PresentationCore.dll)
  • System.Xaml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 (C:WINDOWSMicrosoft.NetassemblyGAC_MSILSystem.Xamlv4.0_4.0.0.0__b77a5c561934e089System.Xaml.dll)
  • System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a (C:WINDOWSMicrosoft.NetassemblyGAC_MSILSystem.Configurationv4.0_4.0.0.0__b03f5f7f11d50a3aSystem.Configuration.dll)
  • System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 (C:WINDOWSMicrosoft.NetassemblyGAC_MSILSystem.Xmlv4.0_4.0.0.0__b77a5c561934e089System.Xml.dll)
  • PresentationFramework.Aero2, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 (C:WINDOWSMicrosoft.NetassemblyGAC_MSILPresentationFramework.Aero2v4.0_4.0.0.0__31bf3856ad364e35PresentationFramework.Aero2.dll)
  • PresentationFramework-SystemXml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 (C:WINDOWSMicrosoft.NetassemblyGAC_MSILPresentationFramework-SystemXmlv4.0_4.0.0.0__b77a5c561934e089PresentationFramework-SystemXml.dll)
  • System.Windows.Controls.Ribbon, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 (C:WINDOWSMicrosoft.NetassemblyGAC_MSILSystem.Windows.Controls.Ribbonv4.0_4.0.0.0__b77a5c561934e089System.Windows.Controls.Ribbon.dll)
  • netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 (C:WINDOWSMicrosoft.NetassemblyGAC_MSILnetstandardv4.0_2.0.0.0__cc7b13ffcd2ddd51netstandard.dll)
  • mscorlib.resources, Version=4.0.0.0, Culture=de, PublicKeyToken=b77a5c561934e089 (C:WINDO

_Originally posted by @rgisler in https://github.com/microsoft/PowerToys/issues/6877#issuecomment-701895391_

FancyZones-Editor Issue-Bug Product-FancyZones Resolution-Fix-Committed Severity-Crash Tracking-External

Most helpful comment

Ok, it鈥檚 related to latest MahApps release. I鈥檒l fix this as soon as possible.

All 12 comments

Look's as this is the same error. Steps to reproduce:

  • Choose FancyZones
  • Launch zones editor
  • Select the "custom" tab.
  • Select "Create new custom"
  • Edit selected layout ==>
    image

The zones-settings.json:
zones-settings.json.txt

@rgisler
just to make sure, the crash happens as soon as you click edit and so you don't see this dialog, correct?

image

Yes, that's right.

Das System kann die angegebene Datei nicht finden -> The system can not find the stated file

@rgisler, can you do some screenshots of
C:Program FilesPowerToys
C:Program FilesPowerToysmodulesFancyZones

PowerToys:
image

FancyZones:
image

Info: Updated to version 0.23.2, same behavior, same error.

The problem seems a widespread issue with the MahApp.Metro lib https://github.com/MahApps/MahApps.Metro/issues/3922

Ok, it鈥檚 related to latest MahApps release. I鈥檒l fix this as soon as possible.

@crutkas So, I fixed this by using the WindowAutomationPeer instead implementing my own one. Hopefully this will fix all issues with this, because I got the first issue with this implementation, which IMO is then not a problem by MahApps.

This fix will be available with MahApps v2.3.0 and will be released in the next 2 days.

@punker76
when 2.3.0 will be available I'll prepare a private build for the users that reported the problem with the FZ Editor to verify it.
Thank you!

Was this page helpful?
0 / 5 - 0 ratings