Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7789825
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T21:24:44+00:00 2026-06-01T21:24:44+00:00

Most of the time working as a .Net developer gives us the freedom to

  • 0

Most of the time working as a .Net developer gives us the freedom to mess around in our high-level-of-abstraction world, but sometimes reality kicks you in the private parts and tells you to find a man who really understands.

I’ve just had one of those experiences. I think it’ll suffice to list the corner data as an item list for you to understand what we have here:

  • Win2008 Server
  • 64Bit Environment
  • WPF Application used by multiple Clients simultaneously
  • Application is a launcher, that opens other applications using Process.Start()
  • Occasionally we get the exception listed below
System.ComponentModel.Win32Exception (0x80004005): Not enough quota is
available to process this command
at MS.Win32.UnsafeNativeMethods.PostMessage(HandleRef hwnd,
   WindowMessage msg, IntPtr   wparam, IntPtr lparam)
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 MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object
   source, Delegate method, Object args, Int32 numArgs, Delegate
   catchHandler)

EDIT #1
After some inspection, here’s more detail:

  • Launching is a 2-Step-Process, the Launcher launches an intermediate
    window using Process.WaitForExit()

  • From the intermediate window, further processes can be started in the same way (Process.WaitForExit).

  • With only the intermediate window open and no user interaction, the launcher process’s number of handles increases over time. The maximum increase we’ve seen here is 400 –> 6000 handles.

The facts added in the Edit really make me wonder whether there might be a handle leak in the framework somewhere. I’m trying to isolate the problem and check whether I can reproduce it from scratch. In the meantime, any kind of hint, idea, support or even chocolate is gladly accepted!

EDIT #2 : In an attempt to make the process responsive to PostMessage(), we removed the Thread.WaitForExit. Instead, we added a Handler for the Process’s Exited event and sent the Launcher into a loop like the following:

       while (foo == true)
        {
            System.Threading.Thread.Sleep(1000);
        }

The Exited-Handler sets foo to false and does nothing else.
Still, the number of Handles rises (400 to 800 in half an hour).

EDIT #3
Here comes something interesting, at last.

       while (foo == true)
        {
            System.Threading.Thread.Sleep(1000);
            GC.Collect();
        }

This keeps it the way it’s supposed to be, few handles, all nifty. Now that makes me wonder what’s wrong here…I’ll talk to the developer in charge again to check back what else the launcher does. So far, I’ve heard that it reads a few config values using XmlDocument.Load(), which is not an IDisposable – makes it kind of hard to produce any leakage here…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T21:24:45+00:00Added an answer on June 1, 2026 at 9:24 pm

    The error is telling you that a window’s message queue reached its max capacity when posting a message to it. That means the thread that owns that window is not processing messages fast enough, if at all.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Background: I am an intermediate web app developer working on the .Net Platform. Most
I've been working with C# and .NET for quite some time now, but am
I have been using Asynctask most of time, but in the current app the
Most of the time the autocomplete feature in Vim works nicely for me, but
I have been working on an ASP.NET/C# web app for some time and its
I'm an ASP.NET/C# developer and I've been working on this area for two years.
I am working on a .Net 3.5 application designed specifically for a high-powered PC
I've got an unmanaged dll working in asp.net running on IIS 7. Most of
I primarily spend my time working on automated tests of win32 and .NET applications,
Here's a piece of code that takes most time in my program, according to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.