Periodic crashes from unhandled exception. Retrieving the COM class of unregistered class.
name: Periodic crashes about: title: 'Periodic Crashing' labels: '' assignees: ''
Describe the bug FancyWM periodically crashes. I do see this as the main issue: 2022-07-19 14:05:50.735 -05:00 [FTL] System.Runtime.InteropServices.COMException (0x80040154): Retrieving the COM class factory for component with CLSID {C2F03A33-21F5-47FA-B4BB-156362A2F239} failed due to the following error: 80040154 Class not registered (0x80040154 (REGDB_E_CLASSNOTREG)).
In the registry editor there isn't much information about this CLSID other than: Default = Immersive Shell AppId = {316cded5-e4ae-4b15-9113-7055d84dcc97}
It appears to be an unhandled exception
Expected behavior An exception occurs. It is unhandled and causes a fatal crash.
Desktop (please complete the following information):
- OS: Windows 10 Home
- Version 21H1 64-bit
Additional context fancywm-crash-20220719T140552.log fancywm-crash-20220712T093331.log fancywm-crash-20220526T094732.log
it definitely happens after the system comes back from idle.
Thanks for reporting. There were some fixed in v2.7 that allow FancyWM to keep running when explorer.exe crashes and restarts silently. Can you confirm whether you continue to see these messages in the latest version of FancyWM?
Just to confirm, what does back from idle mean - is it referring to sleep, hibernation or modern standby (newer portable devices)?
I'm on a desktop. This will happen after I've locked the computer with WIN+L and after it goes to sleep. My computer goes to sleep after 30 minutes. I got this info from the power & sleep settings.
My current version of FancyWM is 2.8.0.0
I cannot repro this, but the logs make it fairly obvious what is happening -- explorer.exe crashes. FancyWM normally tries to heal by retrying to connect to the explorer.exe services when that happens, but it only does so for specific error conditions, and REGDB_E_CLASSNOTREG is not one of them. Just handling this error at the retry level should hopefully fix this for you in the next release.
Writing back to confirm that it just happened.
System.Runtime.InteropServices.COMException (0x80040154): Retrieving the COM class factory for component with CLSID {C2F03A33-21F5-47FA-B4BB-156362A2F239} failed due to the following error: 80040154 Class not registered (0x80040154 (REGDB_E_CLASSNOTREG)).
at System.RuntimeTypeHandle.AllocateComObject(Void* pClassFactory)
at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean wrapExceptions)
at System.Activator.CreateInstance(Type type)
at WinMan.Windows.Win32VirtualDesktopService17661.Connect()
at WinMan.Windows.FaultTolerantWin32VirtualDesktopService.ExecuteWithRetry[T](Func`1 func)
at WinMan.Windows.Win32VirtualDesktopManager.get_CurrentDesktop()
at FancyWM.TilingService.GetOverlayAnchor()
at FancyWM.Windows.OverlayHost.UpdatePositions()
at FancyWM.Windows.OverlayHost.<Show>g__UpdateLoop|19_0()
at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_0(Object state)
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 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.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
at System.Windows.Threading.Dispatcher.Run()
at System.Windows.Application.RunDispatcher(Object ignore)
at System.Windows.Application.RunInternal(Window window)
at System.Windows.Application.Run()
at FancyWM.Startup.Main(String[] args)
Uh oh, it seems like 2.8.1.0 isn't running at all. Crashes immediately
** Note **
I updated windows, restarted my computer, then FancyWM said that 2.8.1.0 was available. So I updated to 2.8.1.0.
System.ComponentModel.Win32Exception (122): QueryDisplayConfig: error 122
at WinMan.Windows.Win32DisplayManager.GetMonitorSettings(IntPtr hMonitor)
at WinMan.Windows.Win32Display..ctor(Win32DisplayManager manager, IntPtr hMonitor)
at WinMan.Windows.Win32DisplayManager.<.ctor>b__27_0(IntPtr x)
at System.Linq.Enumerable.SelectListIterator`2.MoveNext()
at System.Collections.Generic.HashSet`1.UnionWith(IEnumerable`1 other)
at System.Collections.Generic.HashSet`1..ctor(IEnumerable`1 collection, IEqualityComparer`1 comparer)
at System.Collections.Generic.HashSet`1..ctor(IEnumerable`1 collection)
at WinMan.Windows.Win32DisplayManager..ctor(Win32Workspace workspace)
at WinMan.Windows.Win32Workspace.Open()
at FancyWM.MainWindow..ctor()
at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean wrapExceptions)
v2.8.2 is now available and should have fixed this.
This issue is stale because it has been open for 14 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.