Personal tools

Crash reporting

From AC3Filter
Jump to: navigation, search


[edit] Overview

Crash reporting in AC3Filter is implemented using BugTrap DLL by Maksim Pyatkovskiy. It uses custom SEH handler to catch unhandled exceptions, make error report and send it to AC3Filter server.

Report is send using WinINet.

Logging is done with valib logging (see valib/log.h). AC3Filter uses in-memory logging. Logs are flushed to disk on exception for BugTrap (see pre_error() func at filter/logging.cpp).

Two log files are made:

  1. Log with event-level entries only (ac3filter_event.log)
  2. Log with trace-level entries (ac3filter_trace.log)

This allows to see both, the whole filter life (1st log) and detailed pre-death trace (2nd log) with minimum amount of memory required (max 100kb per log).

Default crash dump type in BugTrap includes global variables. This leads to megabytes of unnessesary data (media player internals). Due to this, dump type is changed to MiniDumpNormal.

Following changes in BugTrap are done:

[edit] Create symbols store

symstore.exe add /t AC3Filter /v "2.6.0b" /s d:\symbols\ac3filter /r /f D:\symbols\ac3filter_pdb\2.6.0b

Must be done for each release. Symbols must include both PDB files and EXE/DLLs.

[edit] Crashdump analysis

set _NT_SYMBOL_PATH=d:\symbols\ac3filter;srv*d:\symbols\ms*
cdb -c ".ecxr;kc;q" -logo stack_trace.log -z D:\ac3filter\debug\AC3Filter\2.1a\794\crashdump.dmp

For each crash dump.

[edit] Links

[edit] Solutions

[edit] Theory

[edit] Practice

[edit] Crash dumps

[edit] Exceptions performance