microsoft / PowerToys

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

[FancyZones] Win32Exception when closing editor window #13370

Closed dchristensen closed 3 years ago

dchristensen commented 3 years ago

Microsoft PowerToys version

0.45.0

Running as admin

Area(s) with issue?

FancyZones Editor

Steps to reproduce

I'm not sure what caused the error. I opened the editor via the button in the settings screen, made some changes to the layouts on my monitors and then closed the editor.

✔️ Expected Behavior

Not to crash

❌ Actual Behavior

App crashed when exiting

Other Software

No response

FZEditorCrashLog.txt

franky920920 commented 3 years ago

Exception

System.ComponentModel.Win32Exception: Invalid window handle.
   Source: WindowsBase
   TargetAssembly: WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
   TargetModule: WindowsBase.dll
   TargetSite: Void HookUpDefWindowProc(IntPtr)
   at MS.Win32.ManagedWndProcTracker.HookUpDefWindowProc(IntPtr hwnd)
   at MS.Win32.ManagedWndProcTracker.OnAppDomainProcessExit()
   at MS.Win32.ManagedWndProcTracker.ManagedWndProcTrackerShutDownListener.OnShutDown(Object target, Object sender, EventArgs e)
   at MS.Internal.ShutDownListener.HandleShutDown(Object sender, EventArgs e)
   at System.AppContext.OnProcessExit()

Environment

franky920920 commented 3 years ago

Duplicate of #13105

franky920920 commented 3 years ago

Thanks for reporting this. This issue is a duplicate. We'll track this in #13105 to centralize the discussion thread.