FIX: A worker thread in a .NET Framework 2.0-based Windows Forms application may be blocked when it calls the Control.Invoke method even if the GUI thread is idle

You are running a multithreaded Windows Forms application that you created by using the Microsoft .NET Framework 2.0. A worker thread may be blocked when it calls the System.Windows.Forms.Control.Invoke method, even if the Graphics User Interface (GUI) thread is idle.
The Control.Invoke method that is called by the worker thread uses the PostMessage API function to send a message to a message queue. The queue is specified by the window handle of the GUI control. However, before the message is processed, the GUI control thread has called the Control.Dispose method to delete the window handle. Therefore, the worker thread waits infinitely in the WaitOne method or in the WaitOneNative method that is called by the Control.Invoke method for the acknowledgement from the GUI control thread.

Hotfix Replacement Information

The hotfix that corresponds to KB969836 has been superseded with the hotfix KB981145, which contains all fixes that were previously included in KB969836. You should use the hotfix KB981145 to fix the issues described in KB969836. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
981145 Workflows gradually take longer to load in a workflow designer that is re-hosted in the .NET Framework 2.0

To work around this problem, you can use the Control.BeginInvoke method instead of the Control.Invoke method in the System.Windows.Forms namespace.
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

Article ID: 969836 - Last Review: 08/04/2010 02:18:00 - Revision: 4.0

Microsoft .NET Framework 2.0 Service Pack 2

  • kbHotfixServer kbexpertiseadvanced kbqfe kbsurveynew KB969836