WPF Application Hang

纵饮孤独 提交于 2019-12-08 08:04:29

问题


I'm using Windows 7 Professional (x64) and having installed .NET 4.0 RTM on my machine.

Since 2 days I'm noticing that every WPF application that I'm trying to run hangs and becomes non responsive (a not responding text is appended to it's title bar) and it's painted white.

There is no info regarding any exception, no error message. Nothing. Even the Event Log shows that there was "application hang" event (code 1002) and nothing more.

This problem is for everything that is written in WPF, even for products like NHibernate Profiler and other stuff that I was using on a regular basis without any issues.

Tried to reinstall .NET 4.0 and nothing changed. Any ideas why this might be happening?


回答1:


I had the same problem. It was a corrupt font cache!!

See http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/7cc032c1-5f4d-4518-adc6-f53afd051e6b for a solution.




回答2:


If I had to guess I would say video drivers. It might help to try attaching Visual Studio's debugger to the hung process (Debug -> Attach to Process) making sure that Managed Code is the selected debugger type. Then you can break into the debugger and maybe see a common stack trace.



来源:https://stackoverflow.com/questions/2688229/wpf-application-hang

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!