Board index FlightGear Support Graphics

no VASI/PAPI with flightgear 3.4

Graphics issues like: bad framerates, weird colors, OpenGL errors etc. Bad graphics ar usually the result of bad graphics cards or drivers.
Forum rules
In order to help you, we need to know a lot of information. Make sure to include answers to at least the following questions in your initial post.

- what OS (Windows Xp/Vista, Mac etc.) are you running?
- what FlightGear version do you use?
- what graphics card do you have?
- does the problem occur with any aircraft, at any airport?
- is there any output printed to the console (black window)?
- copy&paste your commandline (tick the "Show commandline box on the last page of FGRun or the "Others" section on the Mac launcher).
- please upload a screenshot of the problem.

If you experience FlightGear crashes, please report a bug using the issue tracker (can be also used for feature requests).
To run FlightGear on old computers with bad OpenGL support, please take a look at this wiki article. If you are seeing corrupted/broken textures, please see this article.

Note: If you did not get a reponse, even after 7 days, you may want to check out the FlightGear mailing lists to ask your question there.

Re: no VASI/PAPI with flightgear 3.4

Postby Thorsten » Mon Mar 02, 2015 6:38 pm

I think also this kind of bug should have been detected by the developpers by doing a kind of "checklist", in order to be sure that some basic features are still Ok ( lights during night fly, VASI/PAPI, sound, shaders, weather for example ),


Thank you for this valuable insight.

I wonder though: if we had asked what basic features of a flightsim are beforehand, would lights have made it to the top of your list? Or, if the route manager would have been broken rather than the lights, would that made it into your list after the fact?

In other words - can you even write an exhaustive list of features that is so basic that it should be tested for after every modification and agree on this list with other users such that the end result is not 'Test everything!'? Allow me some doubt...

Of course, if we could reliably anticipate where the next bug is going to strike, we could put an automatic test in, looking for it. Sadly, there lies the rub. After the fact, one knows quite well what one should have done - pointing this out is cheap. We'd appreciate all the insights much more before problems occur!
Thorsten
 
Posts: 10844
Joined: Mon Nov 02, 2009 8:33 am

Re: no VASI/PAPI with flightgear 3.4

Postby Johan G » Mon Mar 02, 2015 7:16 pm

Some projects use unit tests from the start, as well as an extensible architecture and excellent documentation. Unfortunately a lot of projects, of course including FlightGear, starts out as small side projects just for the fun of it and/or to see if something is feasible or not.

Before I go further I want to point out that while I definitively am more interested in programming, paradigms and methodology than the average guy, I am not a programmer and as such will be lacking in insight.

While I hold unit testing in higher esteem than Thorsten, adding in those after the fact seem to rarely work well, even if all the original developers would still be around. Usually it is recommended to begin coding by writing a unit test and to write the tests as an interface specification (between functions and/or classes), and only then try to satisfy the test with the function one would be developing.

I guess that in addition to pure functional testing, they could optionally do performance profiling as well. In essence adding a flag or something like that would allow doing a full test suite complete with profiling, looking for bottlenecks, low hanging fruit and unexpected performance drops after adding a new feature.

While it would be less efficient to add unit test at a later point, non-optimal unit tests might still be better than no unit tests. Unfortunately adding them would would most likely mean that someone or some very few would have to spend a large portion of their spare time scrutinizing every single line of code and write unit tests function by function for months or more likely years to come. In other words it is not likely to happen. :|

All this said a few of the current developers are in fact adding at least some type oft tests, but of course more or less only related to their code.
Low-level flying — It's all fun and games till someone looses an engine. (Paraphrased from a YouTube video)
Improving the Dassault Mirage F1 (Wiki, Forum, GitLab. Work in slow progress)
Johan G
Moderator
 
Posts: 5490
Joined: Fri Aug 06, 2010 5:33 pm
Location: Sweden
Callsign: SE-JG
IRC name: Johan_G
Version: 3.0.0
OS: Windows 7, 32 bit

Re: no VASI/PAPI with flightgear 3.4

Postby Curtis » Tue Mar 03, 2015 12:51 am

Thorsten wrote in Mon Mar 02, 2015 6:38 pm:In other words - can you even write an exhaustive list of features that is so basic that it should be tested for after every modification and agree on this list with other users such that the end result is not 'Test everything!'? Allow me some doubt...


the idea is to do a quick checklist in order to be sure that very basic features for a flight simulator are Ok, no need to test all the sophisticated features ( testing the sophisticated features is the second step, the first step is to be sure that some critical/basic features are Ok before posting a release candidate version of flightgear )

I discover quickly the VASI/PAPI bug because I use a basic airplane ( C172P ) in a basic airport ( not a big airport like KSFO ), just a little airport with VASI/PAPI for a VFR flight,

usually it's the first step when I want to test a new version of flightgear : C172P on a same cheap airport ( LFSN ), this same routine helps me to see if the framerate is good or worse, if lights during nightflight are correct, I test also some weathers options, the clouds, I test also the ALS option, and of course if C172P acts correctly ( instruments on the cockpit, altitude, turn left/right with a joystick and with the mouse ),

it would be interesting if a tool or a framework can do these tests automaticaly, like a "checklist", a script who can do these tests
Curtis
 
Posts: 105
Joined: Wed Jun 17, 2009 3:09 pm
OS: archlinux 64 bits

Re: no VASI/PAPI with flightgear 3.4

Postby Thorsten » Tue Mar 03, 2015 6:12 am

I need about ten seconds to come up with this example why automatic testing is more complicated than it seems (there's probably thousands more):

If you don't see a light, it's because a pixel is set to a certain value. The value will still have [rgba] in a perfectly reasonable output range [0:1] - so formal testing for a valid output range gets you nowhere.

You can test whether the point sprites as such exist - but they may not since we didn't generate them intentionally (there are, after all, options to prevent this). Formal test for sprite creation or not doesn't get you anywhere either.

In fact, whether you should see a light or not depends for many lights on whether the scene is dark or not. To do a computation of whether the sun below the horizon at an arbitrary part of the world is complicated enough that you can't probably do it with pen and paper yourself - but that's not the same as scene brightness, as you'll quickly discover when you go to sun just a bit below horizon and switch ALS on and of or change from clear to overcast skies.

So what you actually would like to test is whether the light is on when the scene is dark enough, but in fact FG does not use a global definition of scene brightness in all rendering frameworks, it doesn't even use one independent of aircaft position in Rembrandt and default and in ALS there is no cross-talk between pixels - the terrain never communicates its scene brightness to the light, they're computed independently and set up to agree if the input parameters are the same. You can't formally test by computing intermediate values at runtime because it's all parallel and without any option of cross-talk, all you can do is compare the final pixel output.

That's before taking the possibility into account that the light may be fogged...

Good luck in scripting an automatic check for just this single case - it's probably going to take you at least a week to come up with something that really covers all eventualities. Not to mention that we may want to add more parameters in the future, at which point the test unit needs to be revised.

the idea is to do a quick checklist in order to be sure that very basic features for a flight simulator are Ok, no need to test all the sophisticated features


Yes, but in my book the very basic features are

* doesn't crash immediately
* I see meaningful terrain, it is solid
* renders with plausible framerate
* I have an aircraft, it starts and flies and responds to control input
* I see a scene without visual artifacts
... and that's basically it.

Neither sound nor shaders nor surface lights feature in my list of very basic features.

Hence my question: can you even write an exhaustive list of features that is so basic that it should be tested for after every modification and agree on this list with other users such that the end result is not 'Test everything!'?
Thorsten
 
Posts: 10844
Joined: Mon Nov 02, 2009 8:33 am

Re: no VASI/PAPI with flightgear 3.4

Postby psadro_gm » Wed Mar 04, 2015 9:17 pm

As I introduced the bug, let me try to explain how I tested my feature.

I was trying to reduce the memory footprint for ws2.0. I noticed that we kept a ton of data around after loading a tile viewed far away until it was close enough to view its details - trees, buildings, etc.

Once code complete, I was concerned about the most issues I felt could be affected. Mainly memory leaks, as I had changed the way we store per tile info. So I spent 3 days performing ufo flights across Europe at slow speed and logging the memory usage.

I did not perform landings, as this was something that was low risk. Unfortunately, I was wrong.

I was unable to finish before the freeze as well. But the memory savings allow people with 32 bit systems to use ws2.0, so it was pulled into 3.4 release.

Moral of the story. You can't win. :)

Pete
8.50 airport parser, textured roads and streams...
psadro_gm
 
Posts: 750
Joined: Thu Aug 25, 2011 2:23 am
Location: Atlanta, GA USA
IRC name: psadro_*
Version: git
OS: Fedora 21

Re: no VASI/PAPI with flightgear 3.4

Postby zlsa » Wed Mar 04, 2015 10:32 pm

Thanks for the memory fixes! It really makes a difference. (I only have 4GB ram here, and 3.2 had serious memory problems; i.e. using it all up :P )
zlsa
 
Posts: 145
Joined: Fri Feb 14, 2014 2:29 am
Callsign: N275A
Version: 3.5 git
OS: Linux

Re: no VASI/PAPI with flightgear 3.4

Postby clrCoda » Thu Mar 05, 2015 5:31 am

was the point sprites fixed for 3.4.1, because If I switch on point sprites, I don't get any lights at all.

vista home double D chips 4GbRam atx Radeon x300 card.

thanks--ray
Ray St. Marie
clrCoda
 
Posts: 1228
Joined: Wed Apr 07, 2010 11:04 am

Re: no VASI/PAPI with flightgear 3.4

Postby Hooray » Thu Mar 05, 2015 6:18 am

You cannot really automate regression tests involving graphics stuff, which even includes GUIs unfortunately - there's a ton of research going on in that direction.
But basically, the notion holds true that once you have a sufficiently flexible testing harness/framework in place, it becomes much cheaper (and more effective) to literally pay someone/a group of people to do regression testing manually.

Which gets us back to the checklist mentioned before: it isn't feasible to expect developers to go through dozens of "checklists" covering all kinds of use-cases.
FlightGear is a huge monolithic piece of software, with the majority of code paths being determined either during startup or at run-time.
In other words, coming up with a reproducible test case is key. So if there is any feature that you particularly care about, it is better to find a way to automate testing on the user-side, e.g. by using flight plans or pre-recorded flights. And then do manual testing by performing such tests and providing feedback.
Otherwise, there really is no way to do unit testing when it comes to graphics/GUIs, especially hardware-accelerated 3D stuff, because then the underlying heuristics would quickly need to become at least as sophisticated as the code that is to be tested - imagine a unit test covering visibility of approach lighting, not taking into account different weather/environmental settings, and/or AI traffic/birds occluding pixels - or even just PagedLOD kicking in.

If you're really offended by a certain bug, and it's graphics related, I suggest that you com up with a test case using flight plans and/or fgtapes to help grow a library of such flights, so that tests can more easily be shared and reproduced, without expecting core developers to literally spend 50+ hrs per week "testing" FlightGear.

In general, "unit tests" are too low-level for complex applications like FG - what large applications tend to use instead, is application-level scripting to test/benchmark the platform as a whole - maintaining unit tests is a lot of work, too. So unit tests make only sense to cover underlying key APIs, like the property tree - i.e. those that can be considered the "nervous system" of FG, without which the system would fail to work - i.e. property tree level bugs would be critical and touch tons of systems.

Graphics stuff is a different issue though, and may not even affect the majority of FG installations - stuff like tracking listeners/timers (callbacks) or RAM/VRAM utilization would also be better covered through run-time diagnostics than actually having "unit tests" in the conventional sense, i.e. those covering individual APIs - but not whole systems.
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11326
Joined: Tue Mar 25, 2008 8:40 am

Re: no VASI/PAPI with flightgear 3.4

Postby clrCoda » Thu Mar 05, 2015 6:44 am

hooray, how do I get to a flightrecorder of a crashed/frozen sim?

Ray
Ray St. Marie
clrCoda
 
Posts: 1228
Joined: Wed Apr 07, 2010 11:04 am

Re: no VASI/PAPI with flightgear 3.4

Postby jsb » Wed Mar 11, 2015 10:18 pm

Any idea, when a fixed version will be available?
jsb
 
Posts: 219
Joined: Sat Oct 25, 2014 8:17 pm
Location: Hamburg, Germany
Callsign: D-JSB
Version: next
OS: Win7/Linux

Previous

Return to Graphics

Who is online

Users browsing this forum: No registered users and 1 guest