Powertoys: fancyzones editor crashes when spaces around zone is big 600. can't use any more. what is solution

Created on 1 Oct 2020  ·  7Comments  ·  Source: microsoft/PowerToys

ℹ Computer information

  • PowerToys version: 0.23.0
  • PowerToy Utility: fancy zones
  • Running PowerToys as Admin: yes
  • Windows build number: 19041.508

📝 Provide detailed reproduction steps (if any)

  1. … input value 600 spaces around zone in fancy zones editor
  2. … apply
  3. … launch fancy zones editor

✔️ Expected result

error crash. error log onto fzeditorcrashlog.txt

❌ Actual result

error crash

error log below

Exception

System.ArgumentException: '-231.5' is not a valid value for property 'Width'.
   Source: WindowsBase
   TargetAssembly: WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
   TargetModule: WindowsBase.dll
   TargetSite: Void SetValueCommon(System.Windows.DependencyProperty, System.Object, System.Windows.PropertyMetadata, Boolean, Boolean, System.Windows.OperationType, Boolean)
   at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
   at FancyZonesEditor.LayoutPreview.RenderActualScalePreview(GridLayoutModel grid)
   at FancyZonesEditor.LayoutPreview.RenderPreview()
   at System.Windows.FrameworkElement.RaiseDependencyPropertyChanged(EventPrivateKey key, DependencyPropertyChangedEventArgs args)
   at System.Windows.FrameworkElement.OnDataContextChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
   at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
   at System.Windows.TreeWalkHelper.OnInheritablePropertyChanged(DependencyObject d, InheritablePropertyChangeInfo info, Boolean visitedViaVisualTree)
   at System.Windows.DescendentsWalker`1._VisitNode(DependencyObject d, Boolean visitedViaVisualTree)
   at System.Windows.DescendentsWalker`1.WalkLogicalChildren(FrameworkElement feParent, FrameworkContentElement fceParent, IEnumerator logicalChildren)
   at System.Windows.DescendentsWalker`1.WalkFrameworkElementLogicalThenVisualChildren(FrameworkElement feParent, Boolean hasLogicalChildren)
   at System.Windows.DescendentsWalker`1.IterateChildren(DependencyObject d)
   at System.Windows.DescendentsWalker`1.StartWalk(DependencyObject startNode, Boolean skipStartNode)
   at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
   at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
   at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
   at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
   at FancyZonesEditor.App.OnStartup(Object sender, StartupEventArgs e)
   at System.Windows.Application.OnStartup(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)
   at System.Windows.Threading.DispatcherOperation.InvokeImpl()
   at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(Object obj)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Windows.Threading.DispatcherOperation.Invoke()
   at System.Windows.Threading.Dispatcher.ProcessQueue()
   at System.Windows.Threading.Dispatcher.WndProcHook(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" 374_1080_1474_864 "35000"
  • Timestamp: 10/01/2020 16:21:23
  • 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 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.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 (C:\Program Files\PowerToys\modules\FancyZones\System.Memory.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)
  • System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 (C:\Program Files\PowerToys\modules\FancyZones\System.Buffers.dll)
  • System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a (C:\Program Files\PowerToys\modules\FancyZones\System.Numerics.Vectors.dll)
  • System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 (C:\Program Files\PowerToys\modules\FancyZones\System.ValueTuple.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.23.0.0, Culture=neutral, PublicKeyToken=null (C:\Program Files\PowerToys\modules\FancyZones\ManagedCommon.dll)
  • Telemetry, Version=0.23.0.0, Culture=neutral, PublicKeyToken=null (C:\Program Files\PowerToys\modules\FancyZones\Telemetry.dll)
  • Microsoft.Xaml.Behaviors, Version=1.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a (C:\Program Files\PowerToys\modules\FancyZones\Microsoft.Xaml.Behaviors.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)
  • 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)
  • 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)
  • 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)
  • 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, Public

    📷 Screenshots

FancyZones-Editor Issue-Bug Resolution-Duplicate

Most helpful comment

Th fix will be available in 0.25
Duplicate of https://github.com/microsoft/PowerToys/issues/6814

All 7 comments

@banglacow
try the following steps:

  • quit PowerToys
  • in command prompt run del %localappdata%\Microsoft\PowerToys\FancyZones
  • restart PowerToys

Is there a user case where you need 600 or was just a test?

@banglacow: What is your current resolution, and what pattern did you have selected? My suspect is that there is no check if there is room for the space around. (like 1920 pixels, space around of 600 with 3 areas will do, but not 1080 with space around 600 with 2+ areas). Nethertheless, crashes are bad and there should be a message that the value is too high.

Probably we want to test the following scenario's.

  1. Putting a value bigger than the screen can handle
  2. Increasing the number of areas so that 1. can occur.

Th fix will be available in 0.25
Duplicate of https://github.com/microsoft/PowerToys/issues/6814

This is why input controls (in general, so not only these) need limits.

@banglacow
try the following steps:

  • quit PowerToys
  • in command prompt run del %localappdata%\Microsoft\PowerToys\FancyZones
  • restart PowerToys

Is there a user case where you need 600 or was just a test?

the number was just a typo..

so there is this curious scenario now when FZ editor can be launched if I switch to another resolution.

for eg I tried Potrait mode 1920 and it worked ... then when I entered the value of 600 and clicked apply... trying to launch Fz editor again failed with error message logged.

For your information @P-Storm @enricogior

Would try the above solution and get back if it works

Edit update:
@enricogior
it worked

@banglacow
thanks for the follow-up.
I'll close this issue since is already tracked in https://github.com/microsoft/PowerToys/issues/6814
The fix will be available in 0.25
Thanks.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

niels9001 picture niels9001  ·  3Comments

SWinxy picture SWinxy  ·  3Comments

amorenew picture amorenew  ·  3Comments

enricogior picture enricogior  ·  3Comments

21cpDev picture 21cpDev  ·  3Comments