利用者:AlexK/Breakpad
Breakpad is a library that generates a dump file after a crash on Windows, Linux and Mac. It is used in Firefox and Chrome. This library is very useful when a user experienced a crash but developers cannot reproduce it. A dump file is generated which later is analyzed against build’s symbol file to find a function which caused the crash. In additional the crash reporter will ask a user to send a dump file every time Blender crashes. That way we can provide critical fixes in timely manner.
Procedure for using breakpad:
Builder/Developer
- Builder creates a “Release with Debug Info” build WITH_BREAKPAD and WITH_CRASHREPORTER
- Builder uploads the build online
- Then builder generate symbol file for compiled build using dump_syms from breakpad tools. (sometimes you must build your own dump_syms on Windows)
***/dump_syms ***/blender.exe > blender.sym
Wait
Move blender.sym to blender.pdb/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX - id inside symbol file
- Generated symbol file then uploaded to common repository.
User
- User downloads and installs the build
- Build crashes
- The crash reporter starts and asks the user to send the dump file
- User can add name, e-mail and description.
- The report is added to the current bug tracker. (We can have separate crash tracker.) http://projects.blender.org/tracker/?func=detail&atid=498&aid=27400&group_id=9
- The report can be moved or assign to anyone as it is our tracker. The problem that is that user is not registered, so he cannot receive automatic follow ups.
Developer
- Ideally server would decode dump file
- For now developer must manually decode dump file using stackwalk. (on Windows Cygwin should be used to compile it)
***/minidump_stackwalk ***/***.dmp /symbols
/symbols is directory with subdirectories that store
all builds' symbol files like:
blender.pdb/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/blender.sym
- The output will find crash function and also provide additional info.
I already wrote interface for crash reporter on Windows. In addition I wrote a function that sends dump file to the tracker using cURL so it can be reuse on every OS. Crash Reporter doesn’t have Cmake/Scons support yet.
Breakpad in blender’s source code only changes 2 files and adds 2 additional so it would be easy to include in experimental branches. That way crashes would become known much faster.
- in progress 95%Breakpad on Windows
- in progress 20%Breakpad on Linux
- to doBreakpad on Mac
- CMake in progress 75%
- Scons to do
- Crashreporter UI on Windows in progress 95%
- Crashreporter UI on Linux to do
- Crashreporter UI on Macto do
- Crashreporter Sender in progress 90%
- Dump Server analyzer to do