Archived

This topic is now archived and is closed to further replies.

Program Crash Logging

This topic is 4951 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I need a way to log the exact point a program crashes and why inorder to track bugs. This is all part of the process of testing on different machiens. Currently I have a console that logs certain events but its not enough because every function does not interact with the console ( and it is not necessary for them to either ). I run netscape and sometimes it crashes on start up, but this other program pops up and is ready to report the exact reason why it crashed. I would like to integrate this kind of error catching in all my programs. Any Idea how this is done?
gdipong oglpong Online (43% complete) If you got any requests or suggestions post here

Share this post


Link to post
Share on other sites
You need a second process that runs in parallel to the first and monitors the health/execution of the first. This does not necessarily mean a second binary, though; with careful design, it can be a second thread within the same application - actually, a first thread since it must start before and terminate after the "application."

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Running on Windows? Dr Watson and Windbg are your friends.

Start "drwtsn32.exe" and configure it to create crash dumps. That will cause a .dmp file to get generated when your process crashes.

Make sure your build generate debug symbols, then you can load the crash dumps from a debugger.

Go to http://microsoft.com/ddk/ and download "Debugging Tools for Windows". Install and learn how to use windbg. The help file is really good.

Now open a .dmp file of the crash from windbg. There you have everything you need, such as call stack of the crash.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
http://www.codeproject.com/debug/crash_report.asp?df=100&forumid=14054&exp=0&select=742201

http://www.codeproject.com/debug/windbg_part1.asp

Share this post


Link to post
Share on other sites