FIX: OutOfMemoryException occurs when you run a WPF application that loads a FlowDocument that has many glyphs on a Windows XP-based computer

Article translations Article translations
Article ID: 2588096 - View products that this article applies to.
Expand all | Collapse all

On This Page

SYMPTOMS

When you run a Windows Presentation Foundation (WPF) application that targets Microsoft .NET Framework 4 on a Windows XP-based computer, the application may experience an OutOfMemoryException. This occurs when the application loads a FlowDocument that contains lots of glyphs from a font file. 

CAUSE

The issue typically occurs when WPF continually loads font files into memory to access the requested glyphs and does not release the font files until Finalization occurs. If the application code is still processing the FlowDocument, the Finalizer cannot release the font files. Then, the application may experience an OutOfMemoryException.

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 website:
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.

You can also download this hotfix directly. To do this, visit the following Microsoft website:
http://connect.microsoft.com/VisualStudio/Downloads/DownloadDetails.aspx?DownloadID=40207

Prerequisites

To apply this hotfix, you must have the Microsoft .NET Framework 4 installed.

Restart requirement

You must restart the computer after you install this hotfix if the affected files are being used. We recommend that you close all .NET Framework applications before you install this hotfix.

File information

The English (United States) version of this hotfix uses a Microsoft Windows Installer package to install the hotfix. The dates and the times for these files are listed in Coordinated Universal Time (UTC) in the following table. When you view the file information, the date is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time item in Control Panel.
For all supported versions of the Microsoft .NET Framework 4, 32-bit edition
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatform
Presentationcore.dll4.0.30319.5103,789,15222-Sep-201106:35x86
Presentationframework.dll4.0.30319.5106,431,08022-Sep-201106:35x86
Setup.dll10.0.30319.510295,76022-Sep-201106:35x86
Setupengine.dll10.0.30319.510809,30422-Sep-201106:35x86
Setupui.exe10.0.30319.51078,15222-Sep-201106:35x86
Windowsbase.dll4.0.30319.5101,371,48022-Sep-201106:35x86
Wpftxt_v0400.dll4.0.30319.510917,33622-Sep-201106:35x86
For all supported versions of the Microsoft .NET Framework 4, 64-bit edition
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatform
Presentationcore.dll4.0.30319.5103,789,15222-Sep-201106:35x86
Presentationcore.dll4.0.30319.5103,825,50422-Sep-201107:15x64
Presentationframework.dll4.0.30319.5106,431,08022-Sep-201106:35x86
Setup.dll10.0.30319.510295,76022-Sep-201106:35x86
Setupengine.dll10.0.30319.510809,30422-Sep-201106:35x86
Setupui.exe10.0.30319.51078,15222-Sep-201106:35x86
Windowsbase.dll4.0.30319.5101,371,48022-Sep-201106:35x86
Wpftxt_v0400.dll4.0.30319.510917,33622-Sep-201106:35x86
Wpftxt_v0400.dll4.0.30319.5101,223,51222-Sep-201107:15x64
For all supported versions of the Microsoft .NET Framework 4, IA-64 edition
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatform
Presentationcore.dll4.0.30319.5103,789,15222-Sep-201106:35x86
Presentationframework.dll4.0.30319.5106,431,08022-Sep-201106:35x86
Setup.dll10.0.30319.510295,76022-Sep-201106:35x86
Setupengine.dll10.0.30319.510809,30422-Sep-201106:35x86
Setupui.exe10.0.30319.51078,15222-Sep-201106:35x86
Windowsbase.dll4.0.30319.5101,371,48022-Sep-201106:35x86
Wpftxt_v0400.dll4.0.30319.510917,33622-Sep-201106:35x86

STATUS

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

Properties

Article ID: 2588096 - Last Review: January 26, 2012 - Revision: 2.0
APPLIES TO
  • Microsoft .NET Framework 4
Keywords: 
kbautohotfix kbqfe kbhotfixserver kbfix KB2588096

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com