Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FancyZones Editor: Error thrown on apply then close - no problem observed #8321

Closed
funketyme opened this issue Dec 2, 2020 · 10 comments
Closed
Labels
FancyZones-Editor Issue revolving the FancyZone Editor Product-FancyZones Refers to the FancyZones PowerToy Resolution-External External issue, unrelated to PowerToys

Comments

@funketyme
Copy link

This error is thrown whenever I take the following steps and apply a different, existing FZ layout. It does not happen when I create a new layout.

  • Start FZ with Win + `
  • Select an existing FZ layout that is not currently applied.
  • Click Apply
  • Click Close
  • FZ layout is changed/applied but error is thrown/logged on close.

I have a 4k primary monitor with a 2560x1440 secondary monitor.

fz_error

Exception

System.ArgumentException: E_INVALIDARG
   Source: ControlzEx
   TargetAssembly: ControlzEx, Version=4.0.0.0, Culture=neutral, PublicKeyToken=69f1c32f803d307e
   TargetModule: ControlzEx.dll
   TargetSite: Void ThrowIfFailed(System.String)
   at ControlzEx.Standard.HRESULT.ThrowIfFailed(String message)
   at ControlzEx.Standard.HRESULT.ThrowLastError()
   at ControlzEx.Behaviors.GlowWindowBehavior.UpdateZOrderOfOwner(IntPtr hwndOwner)
   at ControlzEx.Behaviors.GlowWindowBehavior.UpdateZOrderOfThisAndOwner()
   at ControlzEx.Behaviors.GlowWindowBehavior.AssociatedObjectWindowProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at System.Windows.Interop.HwndSource.PublicHooksFilterMessage(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)

Environment

  • Command Line: "C:\Program Files\PowerToys\modules\FancyZones\FancyZonesEditor.exe" 9408/0/GSM5B08#4&1ff0915e&0&UID200195_3840_2160_{00000000-0000-0000-0000-000000000000}/2/DEL93D6#4&1ff0915e&0&UID198171_2560_1440_{00000000-0000-0000-0000-000000000000}/96/-2560/720/GSM5B08#4&1ff0915e&0&UID200195_3840_2160_{00000000-0000-0000-0000-000000000000}/96/0/0/
  • Timestamp: 12/01/2020 19:46:55
  • 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)
  • 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.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.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)
  • Microsoft.Xaml.Behaviors, Version=1.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a (C:\Program Files\PowerToys\modules\FancyZones\Microsoft.Xaml.Behaviors.dll)
  • Microsoft.Bcl.AsyncInterfaces, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 (C:\Program Files\PowerToys\modules\FancyZones\Microsoft.Bcl.AsyncInterfaces.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.Ne
@funketyme funketyme added the Issue-Bug Something isn't working label Dec 2, 2020
@ghost ghost added Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams Product-FancyZones Refers to the FancyZones PowerToy labels Dec 2, 2020
@enricogior
Copy link
Contributor

@funketyme
if for you is acceptable to install an unsigned build, can you try the one I've attached?
You would need to first uninstall the current version.

PowerToysSetup-0.0.1-x64-unsigned.zip

@enricogior enricogior added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Dec 3, 2020
@funketyme
Copy link
Author

Thank you Enrico. I will try the unsigned build shortly and report back.

@ghost ghost added Needs-Team-Response An issue author responded so the team needs to follow up and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Dec 3, 2020
@funketyme
Copy link
Author

funketyme commented Dec 3, 2020

@enricogior I have been using the unsigned build for the past 10-15 minutes. I have changed layouts approximately 20 times on each monitor and I have not been able to reproduce the issue. This appears to have resolved the issue.

Quick question. How should I proceed after this unsigned build? When the next version of PowerToys is released should I uninstall unsigned, then install the new version? Nevermind, I just tried to update and saw the "Update from local builds is not supported."

Thank you again, I will report back if I encounter any errors, but this build looks to have resolved my initial issue. Feel free to close this at your convenience.

@enricogior
Copy link
Contributor

@funketyme
thanks for testing it. If the build works for you feel free to use it until end of December when we will release 0.29.
You will have to update manually visiting the GitHub release page https://github.com/microsoft/PowerToys/releases

@enricogior enricogior added Resolution-Fix Committed Fix is checked in, but it might be 3-4 weeks until a release. and removed Needs-Team-Response An issue author responded so the team needs to follow up Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams labels Dec 4, 2020
@enricogior
Copy link
Contributor

The problem is fixed by #8122

@funketyme
Copy link
Author

@enricogior - I had not experienced any issues for the past two days. Today I just started seeing the same error again. This is on the same unsigned build from a couple of days ago. Same steps to reproduce as earlier. Same symptom (no obvious problem, the new layout is applied successfully). My computer has been on most of the day. I just switched layouts for the first time today and the error showed itself again after Win + ', Select Layout, Apply, Close.

I have done a few more tests and the error has thrown every time I have changed a layout on either monitor. Attaching the crash log.

FZEditorCrashLog.txt

@enricogior enricogior added FancyZones-Editor Issue revolving the FancyZone Editor and removed Resolution-Fix Committed Fix is checked in, but it might be 3-4 weeks until a release. labels Dec 7, 2020
@enricogior
Copy link
Contributor

enricogior commented Dec 10, 2020

@funketyme

  • if you quit PowerToys
  • delete %localappdata%\Microsoft\PowerToys\FancyZones\zones-settings.json
  • restart PowerToys

does the problem still persist?

@enricogior enricogior changed the title FancyZones: Error thrown on apply then close - no problem observed FancyZones Editor: Error thrown on apply then close - no problem observed Dec 10, 2020
@funketyme
Copy link
Author

funketyme commented Dec 10, 2020

@enricogior I think I figured out this issue. When I followed your steps, the issue continued to exist. I even tried your steps repeatedly, each time removing the newly created zones-settings.json file. So I looked into the crash file before uploading it again. I noticed something in the trace: at ControlzEx.Behaviors.GlowWindowBehavior.UpdateZOrderOfOwner

I use a few utilities by Stardock as part of their Object Desktop package. "GlowWindowBehavior" stood out. One of of the products included in Object Desktop is WindowsFX which allows you to configure things like drop shadow and transparency on inactive windows, etc. I opened it up and started to do a little experimenting.

Long story short, if I disable the feature in WindowsFX titled "Make windows under the active window darken to draw attention to the window with focus" the issue stops happening. If I re-enable the feature, the issue starts happening again.

temp

I uninstalled your build and installed 0.27.1. Same thing. Even without the unsigned build I can make the issue occur by enabling the feature. And make the issue go away by disabling that feature. 100% of the time.

If it helps, here is the product page for WindowsFX: https://www.stardock.com/products/windowfx/

P.S. I have also replaced the zones-settings.json file with my original version that had all of my custom zone configurations. Even with my original file I was able to make the error stop by disabling the WindowsFX feature. Also, the same stack trace info refrencing "GlowWindowBehavior" is in the original error dump, so I did not upload another error dump file.

@enricogior enricogior added FancyZones-App Compat Resolution-External External issue, unrelated to PowerToys and removed Issue-Bug Something isn't working labels Dec 10, 2020
@enricogior
Copy link
Contributor

@funketyme
thank you for the follow up and detailed description.

@enricogior
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FancyZones-Editor Issue revolving the FancyZone Editor Product-FancyZones Refers to the FancyZones PowerToy Resolution-External External issue, unrelated to PowerToys
Projects
None yet
Development

No branches or pull requests

2 participants