Board index FlightGear Development Aircraft

777 freezes and FPS loss

Questions and discussion about creating aircraft. Flight dynamics, 3d models, cockpits, systems, animation, textures.

Re: 777 freezes and FPS loss

Postby Gijs » Mon Jan 18, 2016 9:06 pm

Hi guys,

just a quick post to let you know I'm watching this with great interest. I don't see anything obviously wrong, but setData may not behave as expected when called as often as the trend vector does on the long term. It may also be interesting to see if replacing those variables with fixed values has any effect. It's exam period here, (I don't have much time to perform any tests), so I'm looking forward to your reports.

Cheers,
Gijs
Airports: EHAM, EHLE, KSFO
Aircraft: 747-400
User avatar
Gijs
Moderator
 
Posts: 9353
Joined: Tue Jul 03, 2007 2:55 pm
Location: Delft, the Netherlands
Callsign: PH-GYS
Version: Git
OS: Windows 10

Re: 777 freezes and FPS loss

Postby Hooray » Mon Jan 18, 2016 9:39 pm

right, that's another good idea (adding static variables) - but first of all, please tell us the types/values of each variable when this is happening.

You should also be able to use props.dump() on the node of the CanvasPath group to dump the whole path group to the console or a file.

(If in doubt, send a heads-up to Philosopher, he wrote most of the underlying MVC magic and should be able to tell you directly where to add such code)
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: 12058
Joined: Tue Mar 25, 2008 8:40 am

Re: 777 freezes and FPS loss

Postby wkitty42 » Tue Jan 19, 2016 3:18 am

FWIW: i've been seeing FPS rates dropping in the last several commits of FGFS... i'm not sure what is causing them but i see them with numerous non-detailed craft... the UFO and the bluebird hover craft have both dropped me to 3- FPS in certain cases... most notably when i'm at airports with AI craft... in some cases, AFAICS, it may be the AI code but i don't know if those reporting these problems are enabling AI stuffs or if they are simply on MP or both or neither...
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 6833
Joined: Fri Feb 20, 2015 3:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04

Re: 777 freezes and FPS loss

Postby Hooray » Tue Jan 19, 2016 10:58 am

ideally, you would need to nail this down quite a bit more by excluding/disabling other systems and coming up with a really narrow test case to reproduce this.
Otherwise, I would suggest to post your findings on the devel list.

Also, there are several things that you can do even without having to be a core developer or someone who necessarily builds from source - e.g. you seem to be on Linux, which means that you could run fgfs inside a gdb session and try to reproduce this, and once you are encountering this stuttering, you can use CTRL+C to get a stacktrace, which will tell you what the fgfs process was doing when you interrupted it.
It's a simple way to look under the hood without having to be an experienced C++ developer, while still being able to provide very actionable information

http://poormansprofiler.org/
http://readwrite.com/2010/11/01/using-g ... mans-profi
http://people.linaro.org/~steve.capper/ ... f-2014.pdf

Note that this works regardless of the subsystem involved - however, you will get much better results by using a binary with debugging symbols included.
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: 12058
Joined: Tue Mar 25, 2008 8:40 am

Re: 777 freezes and FPS loss

Postby Hyde » Tue Jan 19, 2016 3:48 pm

@Hooray

I tried last night but issue didn't happen if I added debug.dump() sentence.
I will try tonight again.

Thanks,
Hyde
Hyde
 
Posts: 724
Joined: Fri Aug 12, 2011 1:09 pm
Location: Peachtree city, GA
Callsign: N407DS
Version: GIT
OS: Fedora 25

Re: 777 freezes and FPS loss

Postby Hooray » Tue Jan 19, 2016 4:31 pm

if you can come up with a test case that causes stuttering >= 1000 ms, you have a pretty good chance of coming up with an actionable backtrace by using the aforementioned gdb technique
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: 12058
Joined: Tue Mar 25, 2008 8:40 am

Re: 777 freezes and FPS loss

Postby Hyde » Thu Jan 21, 2016 2:53 am

When I add debug.dump, occurrence rate is significantly reduced.
But I still got one time but couldn't get the meaningful data. I mean data is usual data.

@Gijs, Philosopher,
I don't think this is related this issue but it's annoying. Could you fix this?
Code: Select all
Nasal runtime error: vector index -1 out of bounds (size: 0)
  at /home/hyde/work/FlightGear/flightgear-fgdata/Nasal/canvas/map/WPT.lcontroller, line 56
  called from: /home/hyde/work/FlightGear/flightgear-fgdata/Nasal/canvas/map/WPT.lcontroller, line 79
  called from: /home/hyde/work/FlightGear/flightgear-fgdata/Nasal/canvas/MapStructure.nas, line 1082
  called from: /home/hyde/work/FlightGear/flightgear-fgdata/Nasal/geo.nas, line 384
  called from: /home/hyde/work/FlightGear/flightgear-fgdata/Nasal/canvas/MapStructure.nas, line 1045
  called from: /home/hyde/work/FlightGear/flightgear-fgdata/Nasal/canvas/MapStructure.nas, line 1053
  called from: /home/hyde/work/FlightGear/flightgear-fgdata/Nasal/canvas/api.nas, line 591
  called from: /home/hyde/work/FlightGear/flightgear-fgdata/Nasal/canvas/map/navdisplay.mfd, line 578
  called from: /home/hyde/work/FlightGear/flightgear-fgdata/Nasal/canvas/map/navdisplay.mfd, line 250


@biloute974 and person who gets the same issue
Could you try with comment out the line#913 of navdisplay.styles if issue happens or not.
Code: Select all
#                     nd.symbols.trendVector.setData([2,cmd],[512,y1,radius,radius,0,x,-y]);


Thanks,
Hyde
Hyde
 
Posts: 724
Joined: Fri Aug 12, 2011 1:09 pm
Location: Peachtree city, GA
Callsign: N407DS
Version: GIT
OS: Fedora 25

Re: 777 freezes and FPS loss

Postby Hooray » Thu Jan 21, 2016 3:22 am

like I said, I would print out all variables used in that statement and wrap the whole thing in a debug.benchmark(func {
### original code here
});

expression
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: 12058
Joined: Tue Mar 25, 2008 8:40 am

Re: 777 freezes and FPS loss

Postby Hyde » Thu Jan 21, 2016 3:34 am

My English skill is not so good.
I don't understand what you are saying.
Is this what you mean?
Code: Select all
debug.benchmark(func {
nd.symbols.trendVector.setData([2,],[512,y1,radius,radius,0,x,-y]);
debug.dump(cmd, ,y1, radius, y);
});
Hyde
 
Posts: 724
Joined: Fri Aug 12, 2011 1:09 pm
Location: Peachtree city, GA
Callsign: N407DS
Version: GIT
OS: Fedora 25

Re: 777 freezes and FPS loss

Postby biloute974 » Thu Jan 21, 2016 6:35 am

Hi,
With a comment at 913 line, FG seem don't freeze :)
But FPS drop persist.
Intel I7 7700 - 16Gb DDR4 - Nvidia GTX970 - FG 2017.4.0 from D&C
biloute974
 
Posts: 193
Joined: Mon Feb 23, 2015 8:49 am
Callsign: U974
Version: 2016.1.0
OS: Mint 17.2

Re: 777 freezes and FPS loss

Postby Hooray » Fri Jan 22, 2016 6:14 am

See also: http://wiki.flightgear.org/Canvas_Troub ... anvas_code

This should allow you to dump the Canvas node to the console (or a file) and share it with us here
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: 12058
Joined: Tue Mar 25, 2008 8:40 am

Re: 777 freezes and FPS loss

Postby biloute974 » Fri Jan 22, 2016 6:42 am

Hi, thanks Hooray, i'll try this this night.
Intel I7 7700 - 16Gb DDR4 - Nvidia GTX970 - FG 2017.4.0 from D&C
biloute974
 
Posts: 193
Joined: Mon Feb 23, 2015 8:49 am
Callsign: U974
Version: 2016.1.0
OS: Mint 17.2

Re: 777 freezes and FPS loss

Postby Hooray » Fri Jan 22, 2016 7:23 am

The point of this being that we need to know if this issue is related to the type/size and value of variables used in the offending lines of code.
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: 12058
Joined: Tue Mar 25, 2008 8:40 am

Re: 777 freezes and FPS loss

Postby wkitty42 » Fri Jan 22, 2016 9:05 am

@hooray: i was looking at the "cycle on-screen statistics" outputs the other day... every time i have seen my FPS drop, there has been a huge amount of culling going on... at the end of a flight from heathrow to eham, just trying to get to a parking space gets slower and slower and slower (eg: from 25+ FPS down to 0.68 FPS)... culling, on my system went up to 1400+... this is without any AI being enabled... certainly no multi-player mess...

[edit: i forgot to note that i see this with the bluebird hover craft and the ufo as well as several others...]
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 6833
Joined: Fri Feb 20, 2015 3:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04

Re: 777 freezes and FPS loss

Postby Hooray » Fri Jan 22, 2016 12:45 pm

Thanks for reporting that - however, it seems that Hyde and others found an issue specific to the 777 and its Canvas ND implementation.
Neither of the aircraft you mentioned are using the Canvas ND code in any form as far as I am aware.
So unless you have patched the aircraft you mentioned to also use the Canvas ND code, I don't quite see how the issue you are reporting could be related to the Canvas ND code.
The only other possibility to exercise the same "code paths" is using a modified version of the Canvas Map dialog with various ND layers enabled.

For the time being, I have to assume that Hyde and others are aware of the 777 specifics related to the Canvas ND, which is why my troubleshooting related advice is focused on Canvas/ND issues.

If in doubt, I suggest to collect more data and preferably file a separate feature request - if you should ultimately turn out to be right, the corresponding issues could be merged on the issue tracker.

Regarding culling issues in particular, my suggestion would be to come up with a flight plan and/or fgtape (flight recorder tape) so that this can be more easily reproduced.
Once you have a way to reproduce the issue, you may also need to tinker with different startup/runtime settings to see if any of those are having an effect.
Personally, I would first of all try to play with the draw masks which should prevent certain stuff from adding to the culling overhead entirely.

Finally, as far as I am aware, none of the 777 reported Canvas/ND issues were linked to any AI/MP use.

However, using the ufo in a "zero scenery" location (as per the minimal startup profile, which is detailed on the wiki) is generally a pretty good way to troubleshoot this in a fashion that allows you to come up with actionable information - you could then link that info to the issue on the tracker and/or your devel list postings.

Besides, please refer to Hamza's comments regarding the OSG stats and the info on the wiki: even just the mere act of collecting certain info is going to impact overall performance, depending on the stats gathering mode you are using.

That said, there is the possibility that OSG level culling does show up on non-Canvas/ND aircraft, through the use of other Canvas based features (e.g. tooltips), but for that, we would need much more data - the poor man's profiler advice I posted previously would help tremendously to understand what is going here...
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: 12058
Joined: Tue Mar 25, 2008 8:40 am

PreviousNext

Return to Aircraft

Who is online

Users browsing this forum: Husky Dynamics and 3 guests