FancyWM / fancywm

FancyWM - Dynamic Tiling Window Manager for Windows
GNU General Public License v2.0
737 stars 27 forks source link

Crash when waking up from sleep #235

Closed iron-cc closed 7 months ago

iron-cc commented 7 months ago

Describe the bug Whenever I wake up my laptop from sleep FancyWM tells me that it has crashed. I'm running the latest version available from Github releases. This issue persists on 2.11.2, 2.11.4 and 2.11.5.

To Reproduce Steps to reproduce the behavior: Have FancyWM running and then let the system sleep then wake up from sleep, you will receive fancywm crash notification.

Expected behavior It should wake from sleep and continue working as normal.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information): Windows 11 Build 22621 FancyWM version 2.11.2, 2.11.4, and 2.11.5.

Additional context Add any other context about the problem here.

System.InvalidOperationException: Sequence contains no matching element
   at System.Linq.ThrowHelper.ThrowNoMatchException()
   at WinMan.Windows.Win32DisplayManager.OnDisplayChange() in D:\a\fancywm\fancywm\winman-windows\src\WinMan.Windows\Windows\Win32DisplayManager.cs:line 119
   at WinMan.Windows.Win32Workspace.<RefreshConfiguration>b__64_0() in D:\a\fancywm\fancywm\winman-windows\src\WinMan.Windows\Windows\Win32Workspace.cs:line 347
   at WinMan.Windows.Utilities.EventLoop.Run() in D:\a\fancywm\fancywm\winman-windows\src\WinMan.Windows\Utilities\EventLoop.cs:line 27
--- End of stack trace from previous location ---
   at FancyWM.Utilities.Dispatchers.<>c__DisplayClass4_0.<RethrowOnDispatcher>b__0() in D:\a\fancywm\fancywm\FancyWM\Utilities\Dispatchers.cs:line 62
   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)
--- End of stack trace from previous location ---
   at System.Threading.ExecutionContext.RunInternal(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 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 FancyWM.Startup.Main(String[] args) in D:\a\fancywm\fancywm\FancyWM\Startup.cs:line 148
iron-cc commented 7 months ago

Thank you so so much for the quick fix, really helped me out. Do you have a link where I can send a couple bucks for a coffee or beer on me?