2

I have a WPF application that is hanging on one user's machine. Other users aren't affected. The app hangs both running natively out of the development environment and whilst running under debug. The problem can be reproduced reliably - it simply hangs whatever the user attempts to do. Running under debug offers no clues, no exception is thrown, the app simply stops responding.

What options do I have for debugging this? Are there any external tools - things like sysinternals suite for example - that can help? Are there any Visual Studio debugger tricks or tips that might provide a bit more info?

MalcomTucker
  • 7,407
  • 14
  • 72
  • 93

3 Answers3

2

Yes, you can use mdbg.exe to attach to the hanging process (a PID) and when you are there press w to see the stack trace.

btw. the hanging could possibly be caused by the corrupted font cache so before you try the mdbg try to find the instruction on how to clear the WPF's font cache.

Wiktor Zychla
  • 47,367
  • 6
  • 74
  • 106
1

Since this is a rather general description only general pointers:

  • hit "pause" in the debugger and see where it hangs
  • patch the system + drivers to the latest "stable level"
  • check any 3rd-party assemblies you are using
    perhaps there is some quirk regarding version and/or configuration and/or dependency
  • use sysinternal processmon to check what the app does (which files are accessed etc.)
  • check network connectivity and configuration (proxy, DNS, firewall etc.) if your app uses anything (like a network share or DB or internet access etc.)
  • check RAM (perhaps the machine is paging like crazy...)
  • if your app is multi-threaded there can be exceptions "lurking" => try adding global handlers to get a clue (see here)
  • Font problems can be another issue to account for... see here
  • check for antivirus etc. => these can sometimes create strange behaviour

anything of the above could give you a clue what's going on.

Community
  • 1
  • 1
Yahia
  • 69,653
  • 9
  • 115
  • 144
0

Check your hardware acceleration for the machine. Remember WPF uses direct hardware access for rendering when available. You can try reducing your acceleration, updating your video drivers, etc.

What operating system is this running under? If Windows 7 - is Aero enabled?

tsells
  • 2,751
  • 1
  • 18
  • 20