locked
Debug using Windows crash report RRS feed

  • Question

  • When a exe crashes on a user's machine without .pdb files, a dialog pops up and shows such information that the application crashed at xxxxx. How can I use this information to get the call stack when I have VC and the .pdb files?
    Friday, May 13, 2016 10:03 AM

Answers

  • So the only way is:

    1. Distribute pdb files with product.
    2. Generate dump files.
    Am I right?

    For generation of dumps (2.) would think so. WER reports without dumps do normally not contain the necessary information. But there is no need to distribute symbol-files with your application, because for writing a dump-file, no symbols (pdbs) are needed. Only from the point onwards, when you load a dump-file into the debugger, matching symbol files should be accessible by your computer, else you may be lost. 
    Some good advice you may find here:
    http://www.wintellect.com/devcenter/jrobbins/pdb-files-what-every-developer-must-know

    Useful tips about taking dumps, in case it is not possible, to get dumps from 'Windows Error Reporting' (see link above about HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps registry key) you may for example find here:
    https://blogs.msdn.microsoft.com/debugger/2009/12/30/what-is-a-dump-and-how-do-i-create-one/

    Some info about usage of
    MiniDumpWriteDump function
    https://msdn.microsoft.com/en-us/library/ms680360.aspx

    http://www.debuginfo.com/articles/effminidumps.html
    https://blogs.msdn.microsoft.com/joshpoley/2008/05/19/prolific-usage-of-minidumpwritedump-automating-crash-dump-analysis-part-0/
    https://blogs.msdn.microsoft.com/dondu/2010/10/24/writing-minidumps-in-c/
    ...
    With kind regards




    Wednesday, May 18, 2016 11:23 AM
  • If you have only module and offset-address, you may not be able to reconstruct stack. E. g. C++ - debug-configuration: You can lookup function, if you start faulting application, calculate address ( with help of module-load-address in Modules-window) and using Disassembly-window.
    Then 'Call Hierarchy' may be able to give some hints. But in practice, you will not encounter situations as simple as this:

    In my personal opinion, for reasonable debugging, there should be at least some kind of dump.
    Probably
    Collecting User-Mode Dumps
    https://msdn.microsoft.com/en-us/library/windows/desktop/bb787181%28v=vs.85%29.aspx

    No warranty
    With kind regards

    Saturday, May 14, 2016 10:20 AM

All replies

  • If you have only module and offset-address, you may not be able to reconstruct stack. E. g. C++ - debug-configuration: You can lookup function, if you start faulting application, calculate address ( with help of module-load-address in Modules-window) and using Disassembly-window.
    Then 'Call Hierarchy' may be able to give some hints. But in practice, you will not encounter situations as simple as this:

    In my personal opinion, for reasonable debugging, there should be at least some kind of dump.
    Probably
    Collecting User-Mode Dumps
    https://msdn.microsoft.com/en-us/library/windows/desktop/bb787181%28v=vs.85%29.aspx

    No warranty
    With kind regards

    Saturday, May 14, 2016 10:20 AM
  • Hi. Thanks. :)

    So the only way is:

    1. Distribute pdb files with product.
    2. Generate dump files.
    Am I right?

    • Edited by niexuchina Wednesday, May 18, 2016 7:54 AM
    Wednesday, May 18, 2016 7:54 AM
  • So the only way is:

    1. Distribute pdb files with product.
    2. Generate dump files.
    Am I right?

    For generation of dumps (2.) would think so. WER reports without dumps do normally not contain the necessary information. But there is no need to distribute symbol-files with your application, because for writing a dump-file, no symbols (pdbs) are needed. Only from the point onwards, when you load a dump-file into the debugger, matching symbol files should be accessible by your computer, else you may be lost. 
    Some good advice you may find here:
    http://www.wintellect.com/devcenter/jrobbins/pdb-files-what-every-developer-must-know

    Useful tips about taking dumps, in case it is not possible, to get dumps from 'Windows Error Reporting' (see link above about HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps registry key) you may for example find here:
    https://blogs.msdn.microsoft.com/debugger/2009/12/30/what-is-a-dump-and-how-do-i-create-one/

    Some info about usage of
    MiniDumpWriteDump function
    https://msdn.microsoft.com/en-us/library/ms680360.aspx

    http://www.debuginfo.com/articles/effminidumps.html
    https://blogs.msdn.microsoft.com/joshpoley/2008/05/19/prolific-usage-of-minidumpwritedump-automating-crash-dump-analysis-part-0/
    https://blogs.msdn.microsoft.com/dondu/2010/10/24/writing-minidumps-in-c/
    ...
    With kind regards




    Wednesday, May 18, 2016 11:23 AM