Troubleshooting crashes: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
== Introduction ==


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 inusfficient driver support - so crashes are not necessarily due to a faulty program.  
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.
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 say 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 [[Hardware Recommendations]] for more details.
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 [[About graphic drivers|here]].
 
 


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 [http://wiki.flightgear.org/Howto:Improve_framerates#Debugging.2Flog_level], and what it was doing before it got terminated.
== Running FlightGear with minimal settings ==


This article will detail the steps required to disable most "eye candy" features, so that people can experiment with different settings, and come up with a list of supported settings for their particular hardware.  
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 [[Howto:Improve_framerates#Debugging.2Flog level|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.


These 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 settings" FlightGear window. This is not directly intended to get you flying, it's only intended to identify incompatible default settings, so that you can customize your startup settings accordingly. In order to change this, you need to really optimize all settings and then start enabling working features again and again, i.e. trial and error - to see what settings are working, and which don't work.
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.


What all the following settings do, is ensuring that the least complex aircraft and scenery location are picked, so that startup shouldn't fail due to aircraft/scenery at all. The ufo is the least complex aircraft, by default the c172p with a 3D cockpit would be used.
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.  


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.
The performance impact can be evaluated by using:
* The frame rate counter
* The frame spacing indicator
* The [[Howto:Use the system monitor|built-in system monitor]] (can be inspected via telnet/http using --telnet5900)  
* The OSG on-screen stats


'''Please''', only touch the aircraft/location settings '''after''' having optimized everything else already, and after ensuring that you are getting good frame rates (>= 30 fps).


Basically, if you are not getting frame rates '''much''' higher than 100 fps with the "Level 0" startup profile (without using frame throttling obviously), then using complex aircraft (777,787) or scenery (KSFO, KLSV etc) will be next to impossible with your system.
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.  


Once you have done that, I'd suggest to look at aircraft with 2D panels - such as the c172p-2dpanel or other simple aircraft (TODO: list of aircraft with 2D panels). It is very well possible that you need to find a combination of features and aircraft/locations that your system can handle without killing the FlightGear process.


Keep in mind that using certain features such as the AI traffic system or multiplayer support, will further increase your system's load.
=== Performance targets ===


If you need help with the whole process, please get in touch via the FG forums.
Generally, try to optimize FlightGear for 30 fps before changing to a regular aircraft and/or location!


When doing that, please fully document the whole process, i.e. including:
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.


* 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]] )


=== Minimal Startup Profile: Level 0 ===
=== Minimal Startup Profile ===
Basically, 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. Features should only be re-enabled after evaluating their impact on performance, using the frame rate counter, frame spacing indicator, the [[Howto:Use the system monitor|built-in system monitor]] (can be inspected via telnet/http using --telnet5900) and the OSG on-screen stats.
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]].
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 these lines to the console after "FGFS" or set them in [[FG launch control]] or in [[FlightGear configuration via XML|one of FlightGear's XML configuration files]].


* --airport=ksfo
* --airport=ksfo
Line 62: Line 65:
* --disable-ai-models
* --disable-ai-models
* --disable-clouds
* --disable-clouds
* --disable-clouds3d
* --disable-clouds3d
* --disable-skyblend
* --disable-skyblend
* --disable-textures
* --disable-textures
Line 74: Line 77:
* --prop:/sim/rendering/particles=0
* --prop:/sim/rendering/particles=0


Using these settings, I am getting frame rates between 400-500 fps and a steady frame spacing (latency) of 3-11 ms, on a notebook from 2007 (1024x768). Disabling wireframe mode lowers the framerate by about 50-80 fps.
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.


[[File:Fgfs28-bare-bones.png|thumb 200px|FlightGear bare bones]]
[[File:Fgfs28-bare-bones.png|thumb 200px|FlightGear bare bones]]
Line 80: Line 83:
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.
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.


== Reporting incompatible default settings ==
 
 
=== 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/
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 ==
== Related ==
* http://flightgear.org/forums/viewtopic.php?f=37&t=17199&p=165503#p163684
* http://flightgear.org/forums/viewtopic.php?f=37&t=17199&p=165503#p163684
* [[System Crashes]]
* [[Hardware Recommendations]]
* [[Settings for slower graphics cards]]
* [[Howto:Improve framerates]]
* [[Problematic Video Cards]]

Revision as of 01:59, 22 February 2013

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 these lines to the console after "FGFS" or set them in FG launch control 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