0

Some of my users started to get some crashes on Windows 10.

This is the stack trace of the crash:

Not enough quota is available to process this command.

at System.Windows.Interop.HwndTarget.UpdateWindowSettings(Boolean enableRenderTarget, Nullable`1 channelSet)
at System.Windows.Interop.HwndTarget.UpdateWindowPos(IntPtr lParam)
at System.Windows.Interop.HwndTarget.HandleMessage(WindowMessage msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Interop.HwndSource.HwndTargetFilterMessage(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)

This is the stack trace of the crash when trying to display the first crash details:

The operation completed successfully.

at MS.Win32.UnsafeNativeMethods.CreateWindowEx(Int32 dwExStyle, String lpszClassName, String lpszWindowName, Int32 style, Int32 x, Int32 y, Int32 width, Int32 height, HandleRef hWndParent, HandleRef hMenu, HandleRef hInst, Object pvParam)
at MS.Win32.HwndWrapper..ctor(Int32 classStyle, Int32 style, Int32 exStyle, Int32 x, Int32 y, Int32 width, Int32 height, String name, IntPtr parent, HwndWrapperHook[] hooks)
at System.Windows.Interop.HwndSource.Initialize(HwndSourceParameters parameters)
at System.Windows.Window.CreateSourceWindow(Boolean duringShow)
at System.Windows.Window.ShowHelper(Object booleanBox)
at System.Windows.Window.ShowDialog()
at MyApp.Windows.Other.ExceptionDialog.Ok(Exception exception, String title, String instruction, String observation, Boolean bugWith4055002)
at MyApp.App.ShowException(Exception exception)
at MyApp.App.App_OnDispatcherUnhandledException(Object sender, DispatcherUnhandledExceptionEventArgs e)

From what I could understand, the message queue reached its capacity and cannot process any more commands.

I'm not sure if I'm correct and I'm not sure how to help the user to avoid getting this kind of crash.

Nicke Manarin
  • 3,026
  • 4
  • 37
  • 79
  • The quota is 10,000 windows for a single process. Nothing good can happen when you try to display info for the mishap, creating a window can no longer work. Usually takes a while to get there, so easy to miss while testing. Try to use Task Manager, Processes tab to chase down the handle leak, add the "User objects" column. A steadily rising number spells doom. – Hans Passant Apr 13 '20 at 16:07
  • Strange, I did a stress test and the app stayed in a 600-780 handles, 30-40 user objects range. – Nicke Manarin Apr 15 '20 at 13:06

0 Answers0