Troubleshooting crashes

From FlightGear wiki
Jump to navigation Jump to search

If FlightGear crashes (or looks/performs very badly), it's possible that this is due a number of reasons, such as limited hardware resources (CPU, GPU, RAM etc) or insufficient driver support - so crashes are not necessarily due to a faulty program.

Possible causes

It's just as well possible that the FlightGear default settings are not supported with your hardware/drivers, so that the process will be killed by the OS because it's trying to do something not supported by your computer. If you are experiencing full system crashes, you should see System Crashes instead.

By default, FlightGear 2.6+ will assume a certain runtime environment and certain GPU features which may not be suppported by most older cards (e.g. shader support), such as GeForce 6/7 generation hardware and most older hardware (older than 4-5 years), so that it can be expected that FG will probably not work on such computers "out of the box" and may get terminated by your operating system eventually, i.e. the default startup settings will need to be customized accordingly, to disable all unsupported default features. See Settings for slower graphics cards, Problematic Video Cards and FlightGear Hardware Recommendations for more details.

Also, make sure you've got the newest driver for your video card installed and running without errors. A suggestion for a thorough updating procedure can be found here.


Running FlightGear with minimal settings

In such cases, it is important to start up FlightGear with minimum settings, and start re-enabling features step by step to see what settings are supported by your hardware. You may want to raise the FlightGear log level, so that you get to see where the program stops starting/working, and what it was doing before it got terminated.

The following settings are really just intended to provide a minimal startup profile, with ALL eye candy disabled by default - so that FG doesn't crash due to lack of certain features (OpenGL, shaders etc) and you get a "bare bone" FlightGear window. They use the UFO, as it is the least complex aircraft (the default aircraft is the Cessna 172) and a suitable scenery location to rule out aircraft or scenery as a cause for crashes.

Once you have launched FlightGear with these minimal settings, you can enable all graphics options one by one. If an option incurs a huge performance hit, take into consideration whether it is necessary for your flying experience or not.

The performance impact can be evaluated by using:

  • The frame rate counter
  • The frame spacing indicator
  • The built-in system monitor (can be inspected via telnet/http using --telnet5900)
  • The OSG on-screen stats


It makes sense to keep using the ufo until you have optimized all settings accordingly and found out what's working and what isn't, i.e. don't even touch the aircraft settings or the location settings (airport, azimuth, offset) until you have really optimized everything else already.


Performance targets

Generally, try to optimize FlightGear for 30 fps before changing to a regular aircraft and/or location!

If you are not getting frame rates much higher than 100 fps with the minimal startup profile (without using frame throttling, i.e. locking the refresh rate at a certain frequency, obviously), then using complex aircraft (777,787) or scenery (KSFO, KLSV etc) will be next to impossible with your system.


Minimal Startup Profile

As mentioned, the point of the following settings is to disable everything that could have an effect on performance, to ensure that we get a working FlightGear window up and running with no eye candy at all, and maximum frame rate. Once that is working, features can be re-enabled step by step.

Depending on the hardware specs of the target platform, adjusting the threading mode of FG/OSG may also help: Howto:Activate multi core and multi GPU support.

Parse the following lines to the console (separated by one empty character) after "FGFS" or set the respective options in Fgrun or in one of FlightGear's XML configuration files.

  • --airport=ksfo
  • --offset-distance=4000
  • --offset-azimuth=90
  • --altitude=500
  • --heading=0
  • --model-hz=60
  • --bpp=16
  • --enable-wireframe
  • --disable-random-objects
  • --prop:/sim/rendering/quality-level=0
  • --prop:/sim/rendering/shaders/quality-level=0
  • --disable-ai-traffic
  • --prop:/sim/ai/enabled=0
  • --aircraft=ufo
  • --disable-sound
  • --prop:/sim/rendering/random-vegetation=0
  • --prop:/sim/rendering/random-buildings=0
  • --disable-specular-highlight
  • --disable-ai-models
  • --disable-clouds
  • --disable-clouds3d
  • --disable-skyblend
  • --disable-textures
  • --fog-fastest
  • --visibility=5000
  • --disable-distance-attenuation
  • --disable-enhanced-lighting
  • --disable-skyblend
  • --disable-textures
  • --disable-real-weather-fetch
  • --prop:/sim/rendering/particles=0

Using these settings, frame rates between 400-500 fps and a steady frame spacing (latency) of 3-11 ms, can be achieved on a notebook from 2007 (1024x768). Disabling wireframe mode lowers the framerate by about 50-80 fps.

FlightGear bare bones

As can be seen, additional resources can be freed by flying in areas without scenery (ocean tiles), and by using simple aircraft like the ufo. And by using a HUD instead of a 2D/3D cockpit panel.

Further assistance

If you need help with the whole process, please get in touch via the FG forums.

When doing that, please fully document the whole process, i.e. including:

  • startup settings (and fgfsrc if used)
  • error messages and warnings (console output)
  • screen shots
  • screen shots showing frame rate, frame spacing, performance monitor, osg on-screen stats (see Howto:Use the system monitor )


Reporting incompatible default settings

Once you have located and identified settings that seem to cause reproducible crashes with your hardware, it would be a good idea to report these settings using the issue tracker, so that these can hopefully be made optional in the upcoming release: http://flightgear-bugs.googlecode.com/


Related