Troubleshooting crashes: Difference between revisions

Jump to navigation Jump to search
m
m (link update)
Line 16: Line 16:
== Crashes in general ==
== Crashes in general ==
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.
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.
== Performance Issues ==
{{Conversational}}
If working through this article doesn't solve the problem, you are probably facing a hardware/driver issue, which means that you may need to upgrade (or even downgrade) your drivers, and/or disable some settings on the driver side of things.
If however, the "minimal startup profile" stops the error from occurring, that would suggest that FG is using some "code paths" that are not supported by your current driver - this isn't all that uncommon, we have an increasing number of GLSL shaders, while most of the existing FG code was really only written with a fixed rendering pipeline in mind - and in fact, much of it even predates the OSG port, such as for example the GUI (PLIB/PUI).
It isn't that far-fetched to think that these factors may not be very well supported under certain circumstances. In general, nvidia drivers are often understood to be/perform better (despite being closed-source).
It would also be interesting if any "modern" OSG code exhibits similar problems or not, to check that use any of the Canvas-based GUI dialogs/instruments for example, and please report back here.
In summary, our way of using OSG is not particularly optimized, and we're doing a lot of things that are known to be inefficient, such as having lots of GL state changes, and using legacy GL code in conjunction with more modern code - all of these things are having performance penalties, and they also affect compatibility - especially because GLSL, unlike DirectX shader code, is not bytecode, but compiled on-the-fly by your driver - in other words, each GPU vendor will typically have their own GLSL compiler implementation, and these are known to be fragile under certain circumstances - as an open source project, we do not have the resources to literally test each new -or modified- shader on all major hardware platforms - so we really rely on end-user feedback, but also on end-users being able -and willing to- read up on troubleshooting such issues, to provide better/more informed feedback, e.g. by using tools like gDebugger or the corresponding ATI/AMD and nvidia equivalents.
Writing portable cross-platform code is tricky in and of itself, but that problem is already solved by FlightGear - however, supporting different GPU vendors and makes is basically an identical challenge these days, because hardware, drivers and GLSL compilers differ hugely when it comes to quality and performance.
Some people have been suggesting to our core/shaders developers to switch to AMD/ATI or even Intel hardware in order to get rid of certain problems.
But it's not as simple as that to be honest: FlightGear is a fairly old code base, and it also isn't particularly modern - these days, many parts are basically unmaintained, and haven't been touched in years, despite containing lots of legacy code.
OSG is much more powerful than you may think, but it cannot magically fix all the problems that FlightGear introduces, we have a ton of features that basically still date back to the pre-OSG days, i.e. when we were using purely PLIB and SDL. OSG itself is generally rock-solid and there are rarely any issues found with it. To see for yourself, just run osgviewer or any of the OSG examples.
As recently pointed out elsewhere, those OSG examples even support Intel GMA cards, often even shaders to some degree - but we have never really formalized the way OpenGL/OSG code is written/developed for FlightGear, including effects and shaders.
And as mentioned previously, writing portable shaders is made unnecessarily difficult due to the nature of GLSL itself, and due to the fact that we cannot easily develop/test things on different hardware. Most contributors really only have 1-2 computers - typically, with nvidia hardware, specifically purchased for running FG and other 3D software.
This is a volunteer-driven project, you cannot really expect people to spend thousands of dollars on hardware that they don't need. Some of our shader developers already spent more money on certain hardware than 99% of our users probably, including core developers. So it really isn't fair to suggest that all those shader problems are due to "bad coding habits".
First of all, you should really check if the error is in any way affected by NOT using shaders at all, if the error persists, it is is obviously unrelated.
Then again, it is even possible that there are bugs in the C++/OSG code in FG, and that the nvidia drivers just are more forgiving, or even just have better/more lenient (or aggressive) optimization techniques.
Yeah, it is true that most commercial games will perform rather well on modern hardware where FG may typically show single digit frame rates, and even crash - but that is unlikely to be due to GLSL/shaders at all. There are more factors involved here, outside the reach of people doing primarily Nasal/GLSL development.
To see for yourself, just run osgviewer or even fgviewer and see if certain errors show up or not. That is a good thing to do troubleshooting wise, and it is for us easier to check what MIGHT be going on.
I am not sure if this is just a "driver" issue - even if there's no problem on the driver side of things, it clearly is an incompatibility - regardless of the reason. Commercial projects typically have the manpower and resources to do lots of testing so that shaders and other code can be adjusted accordingly.
So far, this has not been a focus of the FlightGear project, and it is not reasonable to ask individual developers to handle this by suggesting that they should get certain hardware, and even pay for it ...
For example, I have access to 4 different computers, but I don't typically build/run/test FlightGear on all of them - even though I could do that, but there are more enjoyable things to do admittedly. Still, I try to provide the corresponding step-by-step instructions to tell people how to troubleshoot problems - but don't expect me to do all this on my own, let alone purchase additional hardware each month, just because someone may be running into certain issues.


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


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]].
Line 305: Line 265:
* [[System Crashes]]
* [[System Crashes]]
* [[Hardware Recommendations]]
* [[Hardware Recommendations]]
* [[Settings for slower graphics cards]]
* [[Troubleshooting performance issues]]
* [[Howto:Improve framerates]]
* [[Problematic Video Cards]]
* [[Problematic Video Cards]]


[[Category:Howto|Debugging FlightGear Crashes]]
[[Category:Howto|Debugging FlightGear Crashes]]
[[Category:Troubleshooting]]
[[Category:Troubleshooting]]
573

edits

Navigation menu