Troubleshooting crashes: Difference between revisions

Jump to navigation Jump to search
do not use Debug build type as that one enables different codepaths, and more than likely will not properly reproduce the issue
(do not use Debug build type as that one enables different codepaths, and more than likely will not properly reproduce the issue)
Line 271: Line 271:
A good way to to provide a reproducible test case is using the [[Replay]]/flight recorder system to create a flight recorder tape that triggers the crash, alternatively, consider providing a "flight plan" that triggers the crash - ideally, without it being aircraft specific, i.e. reproducible using aircraft like the ufo
A good way to to provide a reproducible test case is using the [[Replay]]/flight recorder system to create a flight recorder tape that triggers the crash, alternatively, consider providing a "flight plan" that triggers the crash - ideally, without it being aircraft specific, i.e. reproducible using aircraft like the ufo


Thus, you'll want to reconfigure your SimGear/FlightGear ($SG_SRC & $FG_SRC) source trees using the '''-CMAKE_BUILD_TYPE=Debug''' switch, for details please refer to: [[Building using CMake#Debug_Builds]]. It is a good idea not to touch your existing build trees for this, but instead create an additional directory hierarchy for your debugging binary, please see [[Building using CMake#Multiple build directories]] for details.  
Thus, you'll want to reconfigure your SimGear/FlightGear ($SG_SRC & $FG_SRC) source trees using the '''-CMAKE_BUILD_TYPE=RelWithDebInfo''' switch, for details please refer to: [[Building using CMake#Debug_Builds]]. It is a good idea not to touch your existing build trees for this, but instead create an additional directory hierarchy for your debugging binary, please see [[Building using CMake#Multiple build directories]] for details.  


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.
422

edits

Navigation menu