Troubleshooting crashes: Difference between revisions

Jump to navigation Jump to search
m
Line 167: Line 167:


Once you have rebuilt and relinked SimGear and FlightGear, you'll want to use a debugger like '''gdb''' to run your new binary. It does help to have a good way to reproduce a crash, such as using certain startup/runtime settings. For the sake of simplicity it is usually a good idea to disable all unrelated features and subsystems/settings, this includes complex aircraft and complex scenery locations (airports) if possible. For details, refer to the minimal startup profile detailed in this article.
Once you have rebuilt and relinked SimGear and FlightGear, you'll want to use a debugger like '''gdb''' to run your new binary. It does help to have a good way to reproduce a crash, such as using certain startup/runtime settings. For the sake of simplicity it is usually a good idea to disable all unrelated features and subsystems/settings, this includes complex aircraft and complex scenery locations (airports) if possible. For details, refer to the minimal startup profile detailed in this article.
# For gdb to be available, you'll normally have to use your package manager (apt, yum, yast etc) and install the "gdb" package first.
# next, you'd navigate to your build directory where your '''fgfs''' debug binary is located
# you'd then, run gdb
# via the gdb shell, you can specify the file to be used via '''file src/Main/fgfs'''
# this will preload the binary and its dependencies
# to actually run the file, you would use the '''run''' command
# you'll normally want to pass arguments right behind '''run''', especially the mandatory ones (i.e. to specify $FG_ROOT)
# creating a simple .[[Fgfsrc]] file helps for the sake of simplicity
# once the segfault/crash occurs, you'll want to run '''backtrace''' (with '''bt''' being the shorter equivalent)
# only if that isn't conclusive, use  '''thread apply all bt full''' instead to get a full backtrace for all threads (background tasks)
# please use the issue tracker to post your backtrace


== Related ==
== Related ==

Navigation menu