What to: Collect Information When Software Crashes
Asked Answered
C

3

4

I notice that a lot of desktop apps ( such as Firefox, Google Chrome, VS 2008 etc) have a crash dump that can be sent to the software vendors for analysis purpose. I am intended to create such a crash dump myself. I am doing .Net

What are the best practices when comes to what data to collect, so that the data collected is just enough to reproduce and fix the bugs, but nothing more?

Chummy answered 4/8, 2009 at 10:7 Comment(0)
M
5

I collect exception name, stack trace and ask customer what he was doing at time of crash. Usually that is enough.

Additionally, you can establish account with Microsoft to get debugging data of your application crashes with their Windows Error Reporting.

Mons answered 4/8, 2009 at 10:28 Comment(1)
+1 for Windows Error Reporting. When your app really crashes hard there isn't much you can easily do in .NET to get the information--let Windows send it to Microsoft and then pickup the details there.Hayfork
P
3

I built a logging system that reports directly into my bug database, and it reports the following information:

  • Non-identifiable information about the computer and runtime environment (like windows version, some regionale settings, amount of memory, cpu-type, etc.)
  • Stack-trace and information about the exception itself
  • Loaded assemblies, version numbers
  • Loaded dll's that aren't assemblies (you newer know when a dll injected by Skype to handle hot-key invocation might mess up your own program)

A form pops up first where the user can review everything that is to be sent, and can optionally identify him/herself + write a description what he/she was doing when the problem occured. If an email is provided, the user will get an email back to track the bug report with.

You should strive to make the process of logging as non-intrusive as possible, and detailed enough that you can at least determine where to start looking.

I'm currently building a logging system that can be enabled for users that experience the same problem multiple times, where the last N items of the log can be attached to the bug report, which contains things like code flow (method calls, returns, exceptions, etc.).

Papistry answered 4/8, 2009 at 10:36 Comment(0)
B
2

Why not use the Mini dump framework that Microsoft already provides. I recommend to have a look at the functions MiniDumpCallback and MiniDumpWriteDump that allow an application to augment the mini dump with additional application specific data.

Bluebill answered 11/8, 2009 at 21:41 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.