Tutorial :WPF Windows 7 application hangs


I have a .Net 3.5 WPF application that works fine on many windows 7 computers but on a few it hangs directly on startup before the window is displayed.

The machines are running 64-bit win 7 and .Net 4 is installed. There are other machines with the same configuration that works.

No error message is displayed and nothing is written in the event log. I have ran process monitor and fuslogw and all dependencies are loaded.

Task Manager shows 0% Cpu usage

The Application constructor runs (opening a splash screen) but the Startup event is never called.

Any ideas what to look for.


Today I removed the splash screen and the application worked fine. Restored previous version with the splash screen and it worked as well. Have no idea what caused it. The only part of my code that executed was

public App() {      SplashScreen splashScreen = new SplashScreen("Logo.png");      splashScreen.Show(true);  }  


I ran across this problem, and it appeared to be a corrupted font cache.

Steps to resolve:

  1. Run services.msc
  2. Stop the Windows Presentation Foundation Font Cache service
  3. Delete FontCache3.0.0.0.dat.
  4. Delete the file GDIPFONTCACHEV1.DAT from the user's profile directory.
  5. Reboot the computer.

In Windows Vista and Windows 7, the file FontCache3.0.0.0.dat is located in %windir%\ServiceProfiles\LocalService\AppData\Local, and the file GDIPFONTCACHEV1.DAT is located in %userprofile%\AppData\Local.

Modified steps from the original source: http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/7cc032c1-5f4d-4518-adc6-f53afd051e6b

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »