Windows 7 or Windows Server 2008 R2 crashes if a command prompt or a PowerShell console is opened and closed many times

Applies To
Windows 7 Enterprise Windows 7 Home Basic Windows 7 Home Premium Windows 7 Professional Windows 7 Starter Windows 7 Ultimate Windows Server 2008 R2 Datacenter Windows Server 2008 R2 Enterprise Windows Server 2008 R2 for Itanium-Based Systems Windows Server 2008 R2 Foundation Windows Server 2008 R2 Standard Windows Server 2008 R2 Web Edition

Symptoms

Assume that a command prompt or a Windows PowerShell console is opened and then closed many times on a computer that is running Windows 7 or Windows Server 2008 R2. In this situation, the performance of the computer may become slow, and applications may crash.

Note This issue occurs when you use a non-English input method (such as the Japanese IME). 

Cause

This issue occurs because Graphics Device Interface (GDI) objects are leaked every time that a command prompt or a PowerShell console is opened and then closed. The leak occurs in the Taskhost.exe process or the Explorer.exe process, depending on whether the language bar is displayed or not. When the number of leaked GDI object handles in the process reaches the maximum number, no more GDI objects can be created. Therefore, you experience the issue that is described in the "Symptoms" section. 

When an application receives the focus for the first time, a notification is sent to all language bars. Then, the language bars allocate GDI objects for the application. However, when a command prompt or a PowerShell console is closed, the Conhost.exe process does not send a notification to clean up the GDI objects that were allocated by the language bars. Therefore, the leak occurs. 

Resolution

Hotfix information

A supported hotfix is available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing the problem described in this article. This hotfix might receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next software update that contains this hotfix.

If the hotfix is available for download, there is a "Hotfix download available" section at the top of this Knowledge Base article. If this section does not appear, contact Microsoft Customer Service and Support to obtain the hotfix.

Note If additional issues occur or if any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. For a complete list of Microsoft Customer Service and Support telephone numbers or to create a separate service request, visit the following Microsoft Web site:

http:⁠//support.microsoft.com/contactus/?ws=support Note The "Hotfix download available" form displays the languages for which the hotfix is available. If you do not see your language, it is because a hotfix is not available for that language.

Prerequisites

To apply this hotfix, you must be running one of the following operating systems:

  • Windows 7
  • Windows 7 Service Pack 1 (SP1)
  • Windows Server 2008 R2
  • Windows Server 2008 R2 Service Pack 1 (SP1)

For more information about how to obtain a Windows 7 or Windows Server 2008 R2 service pack, click the following article number to view the article in the Microsoft Knowledge Base:

976932 Information about Service Pack 1 for Windows 7 and for Windows Server 2008 R2

Registry information

To use the hotfix in this package, you do not have to make any changes to the registry.

Restart requirement

You must restart the computer after you apply this hotfix.

Hotfix replacement information

This hotfix does not replace a previously released hotfix.

File information

The global version of this hotfix installs files that have the attributes that are listed in the following tables. The dates and the times for these files are listed in Coordinated Universal Time (UTC). The dates and the times for these files on your local computer are displayed in your local time together with your current daylight saving time (DST) bias. Additionally, the dates and the times may change when you perform certain operations on the files.

Windows 7 and Windows Server 2008 R2 file information notes

                  

  • The files that apply to a specific product, milestone (RTM, SPn), and service branch (LDR, GDR) can be identified by examining the file version numbers as shown in the following table:

    Version Product Milestone Service branch
    6.1.760
    0.16xxx
    Windows 7 and Windows Server 2008 R2 RTM GDR
    6.1.760
    0.21xxx
    Windows 7 and Windows Server 2008 R2 RTM LDR
    6.1.760
    1.17xxx
    Windows 7 and Windows Server 2008 R2 SP1 GDR
    6.1.760
    1.21xxx
    Windows 7 and Windows Server 2008 R2 SP1 LDR
  • GDR service branches contain only those fixes that are widely released to address widespread, extremely important issues. LDR service branches contain hotfixes in addition to widely released fixes.

  • The MANIFEST files (.manifest) and the MUM files (.mum) that are installed for each environment are listed separately in the "Additional file information for Windows Server 2008 R2 and for Windows 7" section. MUM and MANIFEST files, and the associated security catalog (.cat) files, are extremely important to maintain the state of the updated components. The security catalog files, for which the attributes are not listed, are signed with a Microsoft digital signature.

For all supported x86-based versions of Windows 7

File name File version File size Date Time Platform
Msctf.dll 6.1.7600.16885 828,928 15-Sep-2011 04:41 x86
Msctf.dll 6.1.7600.21054 828,928 15-Sep-2011 04:31 x86
Msctf.dll 6.1.7601.17692 828,928 15-Sep-2011 04:24 x86
Msctf.dll 6.1.7601.21819 828,928 15-Sep-2011 06:28 x86

For all supported x64-based versions of Windows 7 and of Windows Server 2008 R2

File name File version File size Date Time Platform
Msctf.dll 6.1.7600.16885 1,067,008 15-Sep-2011 05:21 x64
Msctf.dll 6.1.7600.21054 1,067,008 15-Sep-2011 05:22 x64
Msctf.dll 6.1.7601.17692 1,067,008 15-Sep-2011 05:32 x64
Msctf.dll 6.1.7601.21819 1,067,008 15-Sep-2011 06:23 x64
Msctf.dll 6.1.7600.16885 828,928 15-Sep-2011 04:41 x86
Msctf.dll 6.1.7600.21054 828,928 15-Sep-2011 04:31 x86
Msctf.dll 6.1.7601.17692 828,928 15-Sep-2011 04:24 x86
Msctf.dll 6.1.7601.21819 828,928 15-Sep-2011 06:28 x86

For all supported IA-64-based versions of Windows Server 2008 R2

File name File version File size Date Time Platform
Msctf.dll 6.1.7600.16885 2,097,664 15-Sep-2011 18:24 IA-64
Msctf.dll 6.1.7600.21054 2,097,664 15-Sep-2011 04:05 IA-64
Msctf.dll 6.1.7601.17692 2,097,664 15-Sep-2011 03:58 IA-64
Msctf.dll 6.1.7601.21819 2,097,664 15-Sep-2011 04:14 IA-64
Msctf.dll 6.1.7600.16885 828,928 15-Sep-2011 04:41 x86
Msctf.dll 6.1.7600.21054 828,928 15-Sep-2011 04:31 x86
Msctf.dll 6.1.7601.17692 828,928 15-Sep-2011 04:24 x86
Msctf.dll 6.1.7601.21819 828,928 15-Sep-2011 06:28 x86

Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

More Information

For more information about software update terminology, click the following article number to view the article in the Microsoft Knowledge Base:

824684 Description of the standard terminology that is used to describe Microsoft software updates

Additional file information

Additional file information for Windows 7 and for Windows Server 2008 R2

Additional files for all supported x86-based versions of Windows 7

File name X86_0cc3deb730a736ba504f264105e8737f_31bf3856ad364e35_6.1.7601.21819_none_4892407054846a0a.manifest
File version Not Applicable
File size 715
Date (UTC) 16-Sep-2011
Time (UTC) 07:40
File name X86_2352a71c9bd305726b47ad8ca2ab48d0_31bf3856ad364e35_6.1.7601.17692_none_19c711b4cd813d96.manifest
File version Not Applicable
File size 715
Date (UTC) 16-Sep-2011
Time (UTC) 07:40
File name X86_5c6877438bfac07620cf9a0cfcd40ba7_31bf3856ad364e35_6.1.7600.21054_none_d5eae554a732bb04.manifest
File version Not Applicable
File size 715
Date (UTC) 16-Sep-2011
Time (UTC) 07:40
File name X86_ad2de5a34fcd46b75971461e8a4f3777_31bf3856ad364e35_6.1.7600.16885_none_6ea87594c0deb9f9.manifest
File version Not Applicable
File size 715
Date (UTC) 16-Sep-2011
Time (UTC) 07:40
File name X86_microsoft-windows-t..icesframework-msctf_31bf3856ad364e35_6.1.7600.16885_none_759a0fbb5018a0cd.manifest
File version Not Applicable
File size 32,654
Date (UTC) 15-Sep-2011
Time (UTC) 05:13
File name X86_microsoft-windows-t..icesframework-msctf_31bf3856ad364e35_6.1.7600.21054_none_7642f422691f06af.manifest
File version Not Applicable
File size 32,654
Date (UTC) 15-Sep-2011
Time (UTC) 05:05
File name X86_microsoft-windows-t..icesframework-msctf_31bf3856ad364e35_6.1.7601.17692_none_77729bf74d49dca5.manifest
File version Not Applicable
File size 32,654
Date (UTC) 15-Sep-2011
Time (UTC) 04:56
File name X86_microsoft-windows-t..icesframework-msctf_31bf3856ad364e35_6.1.7601.21819_none_7859bc0e66204b6f.manifest
File version Not Applicable
File size 32,654
Date (UTC) 15-Sep-2011
Time (UTC) 07:14

Additional files for all supported x64-based versions of Windows 7 and of Windows Server 2008 R2

File name Amd64_07bbb394f7fc4646d98f8e565aee5a3c_31bf3856ad364e35_6.1.7600.16885_none_a0e9ccc7fd45788b.manifest
File version Not Applicable
File size 719
Date (UTC) 16-Sep-2011
Time (UTC) 07:40
File name Amd64_0cc3deb730a736ba504f264105e8737f_31bf3856ad364e35_6.1.7601.21819_none_a4b0dbf40ce1db40.manifest
File version Not Applicable
File size 717
Date (UTC) 16-Sep-2011
Time (UTC) 07:40
File name Amd64_2352a71c9bd305726b47ad8ca2ab48d0_31bf3856ad364e35_6.1.7601.17692_none_75e5ad3885deaecc.manifest
File version Not Applicable
File size 717
Date (UTC) 16-Sep-2011
Time (UTC) 07:40
File name Amd64_2e80b07e1d8366d5bc0366b9b48aeab3_31bf3856ad364e35_6.1.7601.21819_none_fc657a7f682eacb8.manifest
File version Not Applicable
File size 719
Date (UTC) 16-Sep-2011
Time (UTC) 07:40
File name Amd64_3f09274b570d98c1221f3f28cacd7c7b_31bf3856ad364e35_6.1.7601.17692_none_39426c1119a44e87.manifest
File version Not Applicable
File size 719
Date (UTC) 16-Sep-2011
Time (UTC) 07:40
File name Amd64_5c6877438bfac07620cf9a0cfcd40ba7_31bf3856ad364e35_6.1.7600.21054_none_320980d85f902c3a.manifest
File version Not Applicable
File size 717
Date (UTC) 16-Sep-2011
Time (UTC) 07:40
File name Amd64_987b9007ae16be5ae0cf4fdade8fb30c_31bf3856ad364e35_6.1.7600.21054_none_b65b84318d14bf77.manifest
File version Not Applicable
File size 719
Date (UTC) 16-Sep-2011
Time (UTC) 07:40
File name Amd64_a31aadbf5f8fcb96bb79a1248978497a_31bf3856ad364e35_6.1.7601.17692_none_9e0fb0c3f969a3fc.manifest
File version Not Applicable
File size 1,078
Date (UTC) 16-Sep-2011
Time (UTC) 07:40
File name Amd64_ad2de5a34fcd46b75971461e8a4f3777_31bf3856ad364e35_6.1.7600.16885_none_cac71118793c2b2f.manifest
File version Not Applicable
File size 717
Date (UTC) 16-Sep-2011
Time (UTC) 07:40
File name Amd64_ae4d574604089f81088179a22fb80ce0_31bf3856ad364e35_6.1.7600.16885_none_8053981888e00c65.manifest
File version Not Applicable
File size 1,078
Date (UTC) 16-Sep-2011
Time (UTC) 07:40
File name Amd64_cecf1278129f040171dd0c0349810456_31bf3856ad364e35_6.1.7601.21819_none_ebef3e8ef83bdb6e.manifest
File version Not Applicable
File size 1,078
Date (UTC) 16-Sep-2011
Time (UTC) 07:40
File name Amd64_f2dd9ac8dd8115da15789c479fa16783_31bf3856ad364e35_6.1.7600.21054_none_8e5d3a6aab7fe3a7.manifest
File version Not Applicable
File size 1,078
Date (UTC) 16-Sep-2011
Time (UTC) 07:40
File name Amd64_microsoft-windows-t..icesframework-msctf_31bf3856ad364e35_6.1.7600.16885_none_d1b8ab3f08761203.manifest
File version Not Applicable
File size 32,658
Date (UTC) 15-Sep-2011
Time (UTC) 06:06
File name Amd64_microsoft-windows-t..icesframework-msctf_31bf3856ad364e35_6.1.7600.21054_none_d2618fa6217c77e5.manifest
File version Not Applicable
File size 32,658
Date (UTC) 15-Sep-2011
Time (UTC) 05:56
File name Amd64_microsoft-windows-t..icesframework-msctf_31bf3856ad364e35_6.1.7601.17692_none_d391377b05a74ddb.manifest
File version Not Applicable
File size 32,658
Date (UTC) 15-Sep-2011
Time (UTC) 06:09
File name Amd64_microsoft-windows-t..icesframework-msctf_31bf3856ad364e35_6.1.7601.21819_none_d47857921e7dbca5.manifest
File version Not Applicable
File size 32,658
Date (UTC) 15-Sep-2011
Time (UTC) 07:38
File name X86_microsoft-windows-t..icesframework-msctf_31bf3856ad364e35_6.1.7600.16885_none_759a0fbb5018a0cd.manifest
File version Not Applicable
File size 32,654
Date (UTC) 15-Sep-2011
Time (UTC) 05:13
File name X86_microsoft-windows-t..icesframework-msctf_31bf3856ad364e35_6.1.7600.21054_none_7642f422691f06af.manifest
File version Not Applicable
File size 32,654
Date (UTC) 15-Sep-2011
Time (UTC) 05:05
File name X86_microsoft-windows-t..icesframework-msctf_31bf3856ad364e35_6.1.7601.17692_none_77729bf74d49dca5.manifest
File version Not Applicable
File size 32,654
Date (UTC) 15-Sep-2011
Time (UTC) 04:56
File name X86_microsoft-windows-t..icesframework-msctf_31bf3856ad364e35_6.1.7601.21819_none_7859bc0e66204b6f.manifest
File version Not Applicable
File size 32,654
Date (UTC) 15-Sep-2011
Time (UTC) 07:14

Additional files for all supported IA-64-based versions of Windows Server 2008 R2

File name Ia64_1a7104729aa73bec14333c20031c567a_31bf3856ad364e35_6.1.7600.21054_none_d29ad800d6b0eb2a.manifest
File version Not Applicable
File size 1,076
Date (UTC) 16-Sep-2011
Time (UTC) 07:40
File name Ia64_9a456ca05d3f8877086806104eaf07b3_31bf3856ad364e35_6.1.7600.16885_none_faecb2614b5c93d1.manifest
File version Not Applicable
File size 1,076
Date (UTC) 16-Sep-2011
Time (UTC) 07:40
File name Ia64_b5b69212ded752e5f9677daa7e40e6d0_31bf3856ad364e35_6.1.7601.17692_none_78905e71d852c53b.manifest
File version Not Applicable
File size 1,076
Date (UTC) 16-Sep-2011
Time (UTC) 07:40
File name Ia64_d72acb413223c73acb0f9144f33c126c_31bf3856ad364e35_6.1.7601.21819_none_24b800b9f87f4d0d.manifest
File version Not Applicable
File size 1,076
Date (UTC) 16-Sep-2011
Time (UTC) 07:40
File name Ia64_microsoft-windows-t..icesframework-msctf_31bf3856ad364e35_6.1.7600.16885_none_759bb3b15016a9c9.manifest
File version Not Applicable
File size 32,656
Date (UTC) 15-Sep-2011
Time (UTC) 18:45
File name Ia64_microsoft-windows-t..icesframework-msctf_31bf3856ad364e35_6.1.7600.21054_none_76449818691d0fab.manifest
File version Not Applicable
File size 32,656
Date (UTC) 15-Sep-2011
Time (UTC) 05:43
File name Ia64_microsoft-windows-t..icesframework-msctf_31bf3856ad364e35_6.1.7601.17692_none_77743fed4d47e5a1.manifest
File version Not Applicable
File size 32,656
Date (UTC) 15-Sep-2011
Time (UTC) 05:47
File name Ia64_microsoft-windows-t..icesframework-msctf_31bf3856ad364e35_6.1.7601.21819_none_785b6004661e546b.manifest
File version Not Applicable
File size 32,656
Date (UTC) 15-Sep-2011
Time (UTC) 07:30
File name X86_microsoft-windows-t..icesframework-msctf_31bf3856ad364e35_6.1.7600.16885_none_759a0fbb5018a0cd.manifest
File version Not Applicable
File size 32,654
Date (UTC) 15-Sep-2011
Time (UTC) 05:13
File name X86_microsoft-windows-t..icesframework-msctf_31bf3856ad364e35_6.1.7600.21054_none_7642f422691f06af.manifest
File version Not Applicable
File size 32,654
Date (UTC) 15-Sep-2011
Time (UTC) 05:05
File name X86_microsoft-windows-t..icesframework-msctf_31bf3856ad364e35_6.1.7601.17692_none_77729bf74d49dca5.manifest
File version Not Applicable
File size 32,654
Date (UTC) 15-Sep-2011
Time (UTC) 04:56
File name X86_microsoft-windows-t..icesframework-msctf_31bf3856ad364e35_6.1.7601.21819_none_7859bc0e66204b6f.manifest
File version Not Applicable
File size 32,654
Date (UTC) 15-Sep-2011
Time (UTC) 07:14