Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get stack trace of a crash on Windows without installing Visual Studio? (C++)

I have an C++ application, that crashes on a computer of some person on the other end of the world. There's no way for me to simulate it or get the same computer. The person is no developer, so I cannot really ask him to install Visual Studio or something. I have pretty deep debug logs, but they didn't reveal anything usable.

Is there a tool, that could generate the stack trace of the application at the moment of the crash? Such thing is available inside OSX, but seems that Windows doesn't have it.

like image 722
Vojtěch Melda Meluzín Avatar asked Jun 13 '14 15:06

Vojtěch Melda Meluzín


1 Answers

You can use procdump. It can be setup as a debugger to automatically create dumps for crashing processes.

Procdump is part of Sysinternal tools and can be found at:

http://technet.microsoft.com/en-us/sysinternals/dd996900.aspx

Relevant switches:

Create a dump for a hung application:

Write a mini dump for a process named 'hang.exe' when one of it's Windows is unresponsive for more than 5 seconds:

C:\>procdump -h hang.exe hungwindow.dmp

Automatically create dumps for crashing apps:

Register as the Just-in-Time (AeDebug) debugger. Makes full dumps in c:\dumps.

C:\>procdump -ma -i c:\dumps

Create a dump for a pid:

 C:\>procdump <PID>

You can read the dump files using windbg: Getting started with dump file analysis

like image 192
Nasir Avatar answered Sep 30 '22 15:09

Nasir