异常报错:当前程序已使用了 Window 管理器对象的系统允许的所有句柄。

CL 2021/4/11 发布 · 2021/4/11 更新 · 2246 次阅读

现象

开启Quicker后,Quicker进程CPU占用较高。

报错:

Exception:当前程序已使用了 Window 管理器对象的系统允许的所有句柄。

Exception:
在 MS.Win32.SafeNativeMethods.SetTimer(HandleRef hWnd, Int32 nIDEvent, Int32 uElapse) 在 System.Windows.Threading.Dispatcher.SetWin32Timer(Int32 dueTimeInTicks) 在 System.Windows.Threading.Dispatcher.UpdateWin32TimerFromDispatcherThread(Object unused) 在 System.Windows.Threading.Dispatcher.PromoteTimers(Int32 currentTimeInTicks) 在 System.Windows.Threading.DispatcherOperation.InvokeImpl() 在 MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(Object obj) 在 System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) 在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) 在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 在 MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state) 在 System.Windows.Threading.DispatcherOperation.Invoke() 在 System.Windows.Threading.Dispatcher.ProcessQueue() 在 System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) 在 MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) 在 MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o) 在 System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs) 在 System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

原因

使用了两个动作互相循环启动,导致启动了非常多的系统资源。

建议

  • 设置好停止动作的快捷键,方便在遇到异常循环的时候快速停止动作。
  • 遇到Quicker占用CPU比较高的情况,一般是有没有处理好的循环。
  • 通过托盘菜单可以看到当前有哪些动作在运行。

 

· {{comment.createTimeStr}}
{{reply.votePoints}}
回复   – {{reply.createTimeStr}}
回复 x
标签
目录
相关操作