Tech Dreams

How to fix “WPF Application hangs” Problem in Windows 7

WPFI have a  WPF based application which was working fine on my “Windows 7” laptop till last night.Today when i tried to launch ,it just hanged and becomes non responsive .There is no information regarding any exception or error, except an “Application hang” event in the event Viewer.

After a whole day of failed attempts, i found out the cause for the problem and a simple solution (it just took me a minute) to resolve it

Problem

The problem is due to corrupt “Windows Presentation Font Cache 3.0.0”. This happens mostly due to abrupt shutdown of your system

Solution

The solution to the problem is to delete the corrupt font cache and restart the machine.The detailed steps are given below.

Step1:

  • Go to Run and  type “services.msc”
  • Look for a service name “Windows Presentation Foundation Font Cache 3.0.0.0” and stop it

Step 2:

  • Delete the file “FontCache3.0.0.0.dat”.This file is normally placed under the following file path.
    • Windows 7 / Vista – “%windir%\ServiceProfiles\LocalService\AppData\Local”
    • Windows XP – “%systemdrive%\Documents and Settings\LocalService\Local Settings\Application Data”

Step 3:

  • Restart the machine.

Update [14/01/11]

If the problem continues you can disable the “Windows Presentation Foundation Font Cache 3.0.0.0” service permanently. This will not have any impact to the application behaviour.

3 Comments on How to fix “WPF Application hangs” Problem in Windows 7

  1. Soni
    October 4, 2011 at 1:55 pm (7 years ago)

    After disabling the “Windows Presentation Foundation Font Cache 3.0.0.0″ service permanently” CPU came to normal uses..Thanks

    Reply
  2. Jayant
    December 7, 2010 at 2:50 pm (8 years ago)

    Samsudeen,

    I am looking for the solution for the same cause as expailed by you. However it is not resolved even after deleting FontCache and restarting the system.

    We have DotNet based applicaiton which is not working on one machine. System is hanging whenever i click on date picker. Tried uninstalling and installing DotNet 3.51 and even tried upgrading to DotNet 4.0.
    Our developers are not able to give a working solution for this.
    I am hoping to get some help in the forum.

    Reply
    • samsudeen
      December 19, 2010 at 8:17 pm (8 years ago)

      Dear Jayant Sir,
      Search for the “FontCache3.0.0.0.dat” file in other folders also and delete it

      sam

      Reply

Leave a reply