Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WPF application freezes completely for 1 minute

I have the following, very weird problem with my WPF app in production environment:

  • The customer reports the program is extremely slow. Sometimes the entire interface freezes for about one minute
  • During this "freeze" there is no CPU activity. Other programs still work fine
  • The issue always occurs when the user is physically behind the PC. That is, when I login using RDP or TeamViewer the problem is very hard to reproduce, although I've seen it happening
  • To make it even more strange: this company has about 40 PC's with identical hardware. Only in 5 of them this problem occurs (PC: HP Compaq 6000 Pro Small Form Factor)

I will visit the company in a few days to have physical acces to the PC.

One thing to note: this program runs in about 1000 companies without problems, which makes me think there is a problem with the hardware.

How would you diagnose such an issue? Which tools? Any tips or pointers?

like image 978
Robbert Dam Avatar asked Sep 16 '11 09:09

Robbert Dam


2 Answers

Thanks all for the suggestions. I tried various of them. In this case the comment from Ray was most helpful, he said:

"I wonder if doing something similar to this: blogs.technet.com/b/markrussinovich/archive/2010/12/07/… and this: blogs.technet.com/b/markrussinovich/archive/2010/01/13/… would help diagnose the problem. – Ray Sep 16 at 9:32"

The Process Monitor pointed out then when the app was idle, there were various reads from the registry related to Direct3D. This made the video card driver suspicous. I've removed the driver and installed a newer version (we've tried this earlier, but now there was an even newer update). This update fixed the issue.

like image 87
Robbert Dam Avatar answered Oct 22 '22 18:10

Robbert Dam


I noticed a similar behavior in our lab. The app freezes often, but either no CPU, nor networking activity. Same behavior on many PCs, both on old- and new-machines.

Finally I got it. Since the app uses web-services, and -for default- the proxy is "auto" detecting, the discovering is freezing everything for several seconds.

By setting the proxy as null, everything is going all right.

http://msdn.microsoft.com/en-us/library/fze2ytx2.aspx

like image 1
Mario Vernari Avatar answered Oct 22 '22 18:10

Mario Vernari