Help

The best way to find solutions and ask for help is through answers.gazebosim.org.


 * 1) Posting a Backtrace

A backtrace is the series of instructions executed up to a point of failure. This information is very useful when debugging problems, such as segfaults or coredumps.

The GNU Project Debugger (GDB) is the best tool to create a backtrace.


 * 1) If possible, use a debug-enabled Gazebo

The `gazebo` package that you probably installed via `apt-get` was compiled in `Release` mode, which enables certain optimizations at the expense of including information that's helpful in tracking down problems. When reporting a crash, if you can, you should use a version of Gazebo that is compiled in `Debug` mode. Two options for doing this:


 * Install and run the pre-built `gazebo-dbg` package. This package doesn't yet exist, but it will.


 * Compile Gazebo yourself in debug mode. Follow the source install instructions, but when running `cmake ..` use:

cmake -DCMAKE_BUILD_TYPE=DEBUG ../

If neither option is available to you, then it's still worth using the debugger as described below to get a backtrace.


 * 1) Run Gazebo in GDB

At this point, it's important to know that when you run `gazebo`, it creates two child processes, one running `gzserver` and one running `gzclient`. You'll get better debug information if you run those two processes yourself. E.g., instead of running `gazebo my.world`, you would run `gzserver my.world` in one terminal and then `gzclient` in another terminal.

1. Run gzserver in GDB.

$ gdb --args gzserver my.world (gdb) run

1. Run gzclient in GDB (in another terminal).

$ gdb gzclient (gdb) run

1. Do what you were doing previously when the crash occurred. Sometimes an otherwise reproducible crash doesn't occur when running inside the debugger. That's frustrating.

1. If the server and/or client crashes, get a backtrace. A lot of output will be printed to the terminal.

(gdb) bt

1. Copy all of the output from the backtrace and post it in a question at answers.gazebosim.org.