Microsoft KB Archive/937135

= Error message when you run a Windows Presentation Foundation (WPF)-based application in the .NET Framework 3.0 =

Article ID: 937135

Article Last Modified on 8/14/2007

-

APPLIES TO


 * Microsoft .NET Framework 3.0

-



SYMPTOMS
When you run a Windows Presentation Foundation (WPF)-based application in the Microsoft .NET Framework 3.0, you may receive a FileFormatException error or an ArgumentOutofRangeException error. The error occurs when the WPF-based application starts to process text. For example, you may receive a FileFormatException error message that resembles the following:

file:/// / file does not conform to the expected file format specification.

In this error message,  is typically the file name for a font.



CAUSE
This issue occurs if video drivers overwrite the data in the font cache that is stored in memory.



RESOLUTION
To resolve this issue, follow these steps:  Exit all WPF-based applications that are running on the computer. Stop the Windows Presentation Foundation Font Cache 3.0.0.0 service. To stop the Windows Presentation Foundation Font Cache 3.0.0.0 service, use one of the following methods.

Method 1: Use Microsoft Management Console  Click Start, click Run, type Services.msc, and then click OK. Right-click Windows Presentation Foundation Font Cache 3.0.0.0, and then click Stop.

Method 2: Use the command prompt  Click Start, click Run, type cmd, and then click OK. At the command prompt, type net stop &quot;Windows Presentation Foundation Font Cache 3.0.0.0&quot;, and then press ENTER.</li></ol> </li> Delete the old Fontcache3.0.0.0.dat file.

Note By default, the Fontcache3.0.0.0.dat file is located in the %windir%\ServiceProfiles\LocalService\AppData\Local folder in Windows Vista. By default, the Fontcache3.0.0.0.dat file is located in the %systemdrive%\Documents and Settings\LocalService\Local Settings\Application Data folder in Windows XP and in earlier versions of Windows.</li> Update the video card drivers. To do this, use one of the following methods.

Method 1: Use Windows Update Catalog

To update the video card drivers, check for updates in the Windows Update Catalog. For more information about how to download drivers from the Windows Update Catalog, click the following article number to view the article in the Microsoft Knowledge Base:

323166 How to download updates and drivers from the Windows Update Catalog

Method 2: Download and then install the latest video card drivers

To download and install the latest video card drivers, contact the computer or the video hardware manufacturer. For information about how to contact the hardware manufacturer, click the appropriate article number in the following list to view the article in the Microsoft Knowledge Base:

65416 Hardware and software vendor contact information, A-K

60781 Hardware and software vendor contact information, L-P

60782 Hardware and software vendor contact information, Q-Z

</li></ol>

<div class="moreinformation_section">

MORE INFORMATION
If the video card drivers overwrite the data in the font cache that is stored in memory, the corrupted data may be saved to the hard disk as a data file. Therefore, you may experience the issue that is described in the &quot;Symptoms&quot; section when another WPF-based application tries to read the corrupted data file.

After you update the video card drivers and after you delete the Fontcache3.0.0.0.dat file, a new font cache data file is created based on the new computer configuration. This new font cache data file is created when the Windows Presentation Foundation Font Cache 3.0.0.0 service is stopped. Typically, the new font cache data file is created when the computer is shut down or restarted.

Keywords: kbbug kbtshoot kbprb KB937135

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.