0

I'm learning how to use procdump64 to automatically create a dump file when a program hangs.

I created a simple Winforms application which will get into a deadlock when a button is hit.

I issued a command like this:

C:\Users\vl\source\repos\MyApp\MyApp\bin\Release\procdump64 -h Myapp.exe

I can see procdump started monitoring. I then hit the button and my form became not responsive anymore. However, there is no dump file generated even after a long time.

What could be the problem?

Thank you!

Girl Spider
  • 330
  • 2
  • 6
  • Is the executable already debugged (run from VS using either the debug or release profiles)? Have you tried running the compiled executable? You can start procDump (or procDump64) with `-w -e -t` (to wait for the process to start and dump after a default timeout when the Window is locked). Specify the path of the dump file after `-h [exe name]` (e.g., `C:\Temp\Myapp.dump`) – Jimi Jul 09 '20 at 18:13
  • IIRC, you can also use the post-mortem debugger mode (it should be `-i`) if the process is already being debugged (but I may be wrong). Or start without debugging (`CTRL+F5`). – Jimi Jul 09 '20 at 18:19
  • I was running in debug mode. However, I happened to have a different program that froze and it got a dump file generated when it hung. I noticed that app showed up as Not Responding in Task Manager. I think that's the difference. – Girl Spider Jul 22 '20 at 22:55

1 Answers1

0

It seems the dump file will only be generated when the app you are running show up as Not responding in Task Manager. I do not know why my app which is definitely deadlocked is not being detected as not responding by Task Manager, but it does shed light on why no dump file is generated when my app hangs.

Girl Spider
  • 330
  • 2
  • 6
  • `procDump` simply cannot start when a debugger is already attached to an application (since this is what the utility does). It prompts a message, stating that the app is already debugged and quits. The System creates a mini-dump when an application gets stuck (a Win32/WinForms app after a standard time when the message loop doesn't pump anymore) and is terminated. If you want to create a dump file using `procDump`, don't attach debugger, or - as mentioned - use the post-mortem mode, which will instead monitor the application and create a report when it's terminated. – Jimi Jul 23 '20 at 08:03