0

For example, if a release program appears no responding in Windows, what tools and methods should be used to find out which message procedure caused the long time no return?

cmf41013
  • 107
  • 1
  • 9
  • 2
    Create a mini dump and look at the stack trace on the main thread – David Heffernan Apr 25 '20 at 15:05
  • @DavidHeffernan Why create the mini dump? The program does not crash, it's just not responding for a while or ever. – cmf41013 Apr 26 '20 at 01:03
  • 1
    The mini dump will capture the state of the hung program so you can study it. The program will resume running after the dump is captured. It's like taking a picture of an athlete to see what's wrong with their swing. – Raymond Chen Apr 26 '20 at 05:17
  • 2
    and windbg can do a better job with !analyze -hang instead of the standard !analyze -v if you have a hung dump – blabb Apr 26 '20 at 05:51
  • It's not responding, usually, because it is busy doing something else. This will tell you what that something else is. – David Heffernan Apr 26 '20 at 07:01
  • @DavidHeffernan How to generate the mini dump of UI thread context, outside of the process condition? The program is release version. Thanks. – cmf41013 Apr 26 '20 at 15:57
  • Ask a websearch engine – David Heffernan Apr 26 '20 at 16:35
  • Related: [How do I take a good crash dump](https://stackoverflow.com/questions/24874027/how-do-i-take-a-good-crash-dump-for-net) – Thomas Weller Apr 26 '20 at 22:20
  • Suggestion: just to be sure, take several crash dumps and check if the call stack is always the same. Otherwise you might be unlucky by taking tha crash dump exactly that millisecond which is not responsible for the hang. – Thomas Weller Apr 26 '20 at 22:22
  • @DavidHeffernan,Thank you. – cmf41013 Apr 27 '20 at 06:44
  • @ThomasWeller, Thank you – cmf41013 Apr 27 '20 at 06:44
  • Can also consider using ProcessExplorer to view the thread stack, if dump analysis might be too intimidating. You'd need to make sure to have symbols setup first. – kvr May 30 '20 at 22:16
  • @kvr, Thanks. Excuse me, where to find the thread stack in ProcessExplorer? I have not found it. – cmf41013 Jun 03 '20 at 02:28
  • @cmf41013 see this https://superuser.com/questions/462989/how-can-i-view-the-call-stack-of-a-running-process-thread – kvr Jun 03 '20 at 04:59

0 Answers0