Troubleshooting crashes: Difference between revisions

Jump to navigation Jump to search
more cleanup
(shorted a little and added ws2.0 memory problem)
(more cleanup)
Line 2: Line 2:


Crashes are never easy to troubleshoot. It's very likely that you'll need to experiment a bit to find out the cause, or at least to provide useful feedback. In fact issues depend a lot on things like hardware components, driver support and so on. Developers can't work on your machine, so you'll need to provide them with some specific information. This article will guide you in that.
Crashes are never easy to troubleshoot. It's very likely that you'll need to experiment a bit to find out the cause, or at least to provide useful feedback. In fact issues depend a lot on things like hardware components, driver support and so on. Developers can't work on your machine, so you'll need to provide them with some specific information. This article will guide you in that.
If not only FlightGear, but the whole system crashes, or freezes, please refer to [[System Crashes]].
If in the end you like bug hunting, please consider helping in [[Volunteer#Pre-Release Testers|testing future releases]].


== Known problems ==
== Known problems ==
Line 7: Line 11:


'''If you problem is not listed here, please consider adding it after you have solved it! Others like you will be grateful!'''
'''If you problem is not listed here, please consider adding it after you have solved it! Others like you will be grateful!'''
=== Optimus/Hybrid graphics technologies for laptops ===
If FlightGear crashes with
Unknown exception in the main loop. Aborting...
Possible cause: Not enough space
and you happen to have a laptop with Optimus Technology (NVidia) or Hybrid Graphics technology (ATI) onboard, you'll find some help at [[Troubleshooting performance issues#Operating system and driver setup]]. (Note that the problem is treated there because it's mostly cause of low performance.)


=== World Scenery 2.0 and 32-bit machines ===
=== World Scenery 2.0 and 32-bit machines ===
[[World Scenery]] 2.0 (the one with [[CORINE]] and [[OpenStreetMap]] data) highly raised memory requirements with respect to the previous version. Basically, with 4GB of RAM once you could safely use a visibility of a hundred kilometers; with Scenery 2.0, 4GB is barely enough for 10 km. A 32-bit machine can't use more than that memory, and simply kills FlightGear when it asks for more. To verify this, reduce your visibility (in-sim with ''View > Level of Detail adjustment'' and set ''Bare'' to 8000 m) and see if it stops crashing. You can also check memory consumption with the tools provided by your OS.
[[World Scenery]] 2.0 (the one with [[CORINE]] and [[OpenStreetMap]] data) highly raised memory requirements with respect to the previous version. Basically, with 4GB of RAM once you could safely use a visibility of a hundred kilometers; with Scenery 2.0, 4GB is barely enough for 10 km. A 32-bit machine can't use more than that memory, and simply kills FlightGear when it asks for more. To verify this, reduce your visibility (in-sim with ''View > Level of Detail adjustment'' and set ''Bare'' to 5000 m) and see if it stops crashing. You can also check memory consumption with the tools provided by your OS.


Sadly, the solution is keeping a low visibility, or moving to a 64-bit machine with at least 8GB of RAM. If you're feeling "hackish", you can try the solution reported at [[Unexpected Crashes with Scenery ver.2]].
Sadly, the solution is keeping a low visibility, or moving to a 64-bit machine with at least 8GB of RAM, which can provide even 45km of visibility. If you're feeling "hackish", you can try the solution reported at [[Unexpected Crashes with Scenery ver.2]].


=== Old graphics cards and FlightGear 2.10 ===
=== Old graphics cards and FlightGear 2.10 ===
Line 19: Line 29:


== Troubleshooting your crash ==
== Troubleshooting your crash ==
If FlightGear crashes (or looks/performs very badly/slowly), 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. FlightGear does work for hundreds of forum users, and usually without any form of sophisticated prior setup or configuration. So if something doesn't work "out of the box" it's usually some local or system-specific issue. In general, you are unlikely to encounter any major bugs when using a release - if you don't mind having to deal with bugs and technical issues, we'd like to invite you to help us test prereleases (so called "release candidates"/RCs) and nightly builds - or directly build from git.
=== Possible causes ===
=== 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.
FlightGear crashes are due to a number of reasons, not necessarily to bugs in its code. After all, it works "out of the box" for most users, so if something's broken it's often a system-specific issue, and yet again, it could be a system configuration that the developers couldn't test - [[Volunteer#Pre-Release Testers|you can help with that]]!)


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 [[Troubleshooting performance issues]], [[Problematic Video Cards]] and [[FlightGear Hardware Recommendations]] for more details.
It's just as well possible that the FlightGear default settings are not supported with your hardware/drivers. Since version 2.6, FlightGear will assume support for certain features that hardware older than 4-5 years might not give (especially graphics cards), so the default settings need to be customized to disable all unsupported features. See [[Troubleshooting performance issues]], [[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 [[Graphics drivers configuration|here]].
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 [[Graphics drivers configuration|here]]. Before proceeding any further, please make sure that you are actually able to run other OpenGL-based software/simulators/games, unrelated to FlightGear!


Before proceeding any further, please make sure that you are actually able to run other OpenGL-based software/simulators/games, unrelated to FlightGear!
=== The standard procedure ===
Given the above, it is important to start up FlightGear with a '''minimal startup profile''', with ''all'' eye candy and features disabled (so that FG won't crash due to lack of support for them) and start re-enabling them step by step to see what's supported by your hardware. You may want to [[Flightgear debug log|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. This procedure will also help in [[troubleshooting performance issues]].


The startup profile detailed below disables tons of features that are known to have a massive impact on frame rate and overall performance by making FG look plain bad and crude, as such, it gives you a rough idea of the maximum performance fgfs is able to achieve on your system - which in turn, allows you then to re-enable individual settings one-by-one, and see their impact on framerate/performance - so that you can determine which settings are particularly problematic - so that you can decide to come up with a custom profile to make the 60-100 fps goal for example - as you can see, on a 2009-era laptop, you could hope for ~790 fps and 3ms of frame spacing when in the "ugly" mode - so by hand-picking my settings and tweaking them as needed, you'll be getting beyond 50 fps, even with 75-85% of eye candy enabled, with fairly moderate GPU hardware
These settings use the simple UFO and a suitable scenery location to rule out aircraft or scenery as a cause for crashes. Don't even touch the aircraft and location settings (airport, azimuth, offset) until you have really fixed everything else already. Working step by step is the only real way, so don't bite off more than you can chew.


== Running FlightGear with minimal settings ==
If you find it looks like the Windows "compatibility mode" that you boot into after a crash, then you understand perfectly what we're doing here. However it's not as straightforward to do, so if in trouble [http://forum.flightgear.org/viewforum.php?f=17 ask for support at the forum]!
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 [[Flightgear debug log|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.
=== Minimal startup profile ===
 
{{Note|If you find any other settings causing a massive improvement of performance/compatibility, please feel free to add those below, so that others can benefit from your findings.}}
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 (frames created per second)
* The frame spacing indicator (latencies between rendered frames)
* The [[Howto:Use the system monitor|built-in system monitor]] (can be inspected via telnet/http using [[Telnet usage|--telnet=5900]])
* The OSG on-screen stats
* The [[Built-in Profiler]]
 
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 at least 30+ fps before changing to a regular aircraft and/or location! Realistically, the ufo is not very representative - so that it would be better to aim for something in between 50-100 fps prior to switching to a more complex aircraft like the c172p for example. For instance, aircraft like the A380, IAR80, Concorde or 777 are known to require fairly powerful hardware.
 
Thus, 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 ===
{{Note|If you find any other settings causing a massive improvement of performance/compatibility, please do feel free to add those below, so that others can benefit from your findings. That's the whole point of keeping this on the wiki, so that everybody can contribute. Eventually, we're hoping to use these findings to come up with a reliable subset of FlightGear that can be used to start up FlightGear in some form of "compatibility mode", that can be assumed to "just work" for the majority of FlightGear setups and users. This is going to be particularly important for efforts like [[FlightGear Headless]], [[FlightGear Benchmark]] and [[FGCanvas]].}}
   
   
As mentioned, the point of the following settings is to disable '''everything''' that could have an effect on performance, compatibility and stability, 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]]. (If you don't know what we're talking about, you can safely leave it as it is.)
 
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]].


You can directly use a custom [[Fgfsrc]] file for the following sections or parse the following lines to the console (separated by one empty character) after "FGFS" or set the respective options in [[Fgrun]] or in [[FlightGear configuration via XML|one of FlightGear's XML configuration files]].  
You can directly use a custom [[Fgfsrc]] file for the following sections or parse the following lines to the console (separated by one empty character, e.g. a space) after "FGFS" or set the respective options in [[Fgrun]] or in [[FlightGear configuration via XML|one of FlightGear's XML configuration files]].  


Please make sure to rename/delete your autosave and fgfsrc files prior to trying these settings, or your local settings would possibly override these settings.
Please make sure to rename/delete your autosave and fgfsrc files prior to trying these settings, or your local settings would possibly override these settings.
Line 267: Line 255:
Our hope is that we can come up with a fairly safe subset of FlightGear settings that should work for 99% of our users, even on  moderately old hardware. This would enable us to change the FlightGear defaults accordingly, and use these settings as a safe fallback alternative - so that FlightGear should no longer just crash for people without certain hardware/features.  
Our hope is that we can come up with a fairly safe subset of FlightGear settings that should work for 99% of our users, even on  moderately old hardware. This would enable us to change the FlightGear defaults accordingly, and use these settings as a safe fallback alternative - so that FlightGear should no longer just crash for people without certain hardware/features.  


There's a trend to expose more and more information via the property tree, to make the simulator increasinly runtime-configurable, and to allow subsystems to be re-initialized at runtime, so being able to start up FlightGear in some form of "safe" mode is generally a good thing and useful for anybody helping with troubleshooting on the forums, because it helps us exclude many potential problems. In the long run, such a profile could also be used as the foundation for a [[FlightGear Benchmark]] or some scripted regression suite to run FlightGear in a [[FlightGear Headless|headless]] mode to help with release preparations.
There's a trend to expose more and more information via the property tree, to make the simulator increasingly runtime-configurable, and to allow subsystems to be re-initialized at runtime, so being able to start up FlightGear in some form of "safe" mode is generally a good thing and useful for anybody helping with troubleshooting on the forums, because it helps us exclude many potential problems. In the long run, such a profile could also be used as the foundation for a [[FlightGear Benchmark]] or some scripted regression suite to run FlightGear in a [[FlightGear Headless|headless]] mode to help with release preparations, and [[FGCanvas]].




573

edits

Navigation menu