Board index FlightGear Support

Choppy Framerate on Latest Version

All general support: help on flying, installation, hardware, getting online etc. There are lots of users and developers to help you out.
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?
- where did you download your aircraft/scenery from?
- 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 report any bugs not specific to an aircraft on the issue tracker.
To run FlightGear on old computers with bad OpenGL support, please take a look at this wiki 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.

Choppy Framerate on Latest Version

Postby TribalBob » Wed Dec 12, 2018 2:58 pm

Hello all, I just updated to 2018.3.1 from 2018.2.2 and I am getting really bad frame loss and I can not figure out why.

CPU usage is at about 20%, GPU usage is at about 9%, RAM usage is at about 35%, disk usage is fine, I downloaded the map tiles manually and disable terrasync but even so, I have a TON of available bandwidth...

I limited my FPS to 60 in the rendering options menu which seemed to help for a short while but halfway between KMIA and KMCO I started getting really bad frame loss again...

Any help would be greatly appreciated.


System Specs
-------------------
MOBO: MSI B85M-G43
OS: Windows 10
CPU: Intel i7 4770k (stock clocks and cooling)
GPU: Zotac GTX 1060 AMP! Edition (stock clocks and cooling)
RAM: 16gb Corsair Vengeance DDR3-1600
HDD: 1TB Western Digital 7200RPM

Also, the stuttering seems to get worse as time progresses, kinda seems like a memory leak...
TribalBob
 
Posts: 47
Joined: Thu Aug 23, 2018 12:58 pm

Re: Choppy Framerate on Latest Version

Postby legoboyvdlp » Wed Dec 12, 2018 5:23 pm

If its a memory leak, do you observe rising RAM useage consistently and reproduceably?

The best way to test this is to sit in one spot in the UFO for a decent period - say 10 minutes, and record memory usage every 30 seconds , without changing anything whatsoever - even e.g. turning the menu bar on or off, or toggling frame rate display
User avatar
legoboyvdlp
 
Posts: 7981
Joined: Sat Jul 26, 2014 2:28 am
Location: Northern Ireland
Callsign: G-LEGO
Version: next
OS: Windows 10 HP

Re: Choppy Framerate on Latest Version

Postby TribalBob » Thu Dec 13, 2018 2:20 pm

I didn't have a chance to do any testing yesterday but I should be able to do some testing today, I will let you know what I come up with
TribalBob
 
Posts: 47
Joined: Thu Aug 23, 2018 12:58 pm

Re: Choppy Framerate on Latest Version

Postby TribalBob » Thu Dec 13, 2018 3:30 pm

Did some testing, no memory leak, repeated my flight in the UFO and had zero frame loss which led me to the conclusion it must be caused by something in the Grumman F-14b I was flying.

Hopped back into my Grumman, repeated my flight, got the frame loss as expected. Hit the Nasal console and there were no error messages but because I had the "fuel freeze" function enabled there were messages indicating that it was repeatedly trying to add fuel to the tank or something along those lines. I disabled the "fuel freeze" function and the framerate returned to normal
TribalBob
 
Posts: 47
Joined: Thu Aug 23, 2018 12:58 pm

Re: Choppy Framerate on Latest Version

Postby legoboyvdlp » Thu Dec 13, 2018 4:41 pm

Thanks for the report - I checked and couldn't reproduce. Are you using the fuel freeze option in the commandline or in the fuel payload menu?

Where did you get the f-14?
User avatar
legoboyvdlp
 
Posts: 7981
Joined: Sat Jul 26, 2014 2:28 am
Location: Northern Ireland
Callsign: G-LEGO
Version: next
OS: Windows 10 HP

Re: Choppy Framerate on Latest Version

Postby Richard » Thu Dec 13, 2018 4:57 pm

I've just discovered a fault in 2018.3.1 (and next) where setting fuel freeze will cause lots of timers to be created (aar.nas) which resulted in the framerate getting progressively worse (after a long test I had 0.3fps).

This will be fixed in 2018.3.2 but for now don't use fuel freeze.
Richard
 
Posts: 810
Joined: Sun Nov 02, 2014 11:17 pm
Version: Git
OS: Win10

Re: Choppy Framerate on Latest Version

Postby Hooray » Thu Dec 13, 2018 9:19 pm

Richard: Each Nasal timer/listener inevitably needs a pointer to a naContext struct, which in turn contains the info needed by naRuntimeError() to dump the file name (path) and line number of the code in question - in other words, it is straightforward to sample such info at a configurable interval (say 1-2 hz) and dump that info into the property tree, so that something like a std::map<std::pair<SGPath, unsigned int>, unsigned int> can be used to keep track of how often a certain instruction actually registers or invokes a timer/listener.

I once used the same mechanism to log "swappiness" in response to Stuart asking for that (at the time to troubleshoot ranom building gobbling up memory until the process hit swap): http://wiki.flightgear.org/Talk:Resourc ... FlightGear

This includes a patch created by ThorstenB to also log Nasal GC internals, too.
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: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: Choppy Framerate on Latest Version

Postby wkitty42 » Sat Dec 15, 2018 12:18 am

Richard wrote in Thu Dec 13, 2018 4:57 pm:I've just discovered a fault in 2018.3.1 (and next) where setting fuel freeze will cause lots of timers to be created (aar.nas) which resulted in the framerate getting progressively worse (after a long test I had 0.3fps).

well, son-of-a-biscuit! i'll bet this is what i've been hunting for these last few months with my system falling to its knees in a very short time (<10 minutes)... i always use fuel-freeze just because... i have been really happy this last week or two as i finally got FG to operate properly again but haven't been able to pinpoint where the problem was... i did this with a ""minimal"" config file and then started commenting out things that were disabling stuff i wanted as well as adding in others also wanted... i just checked and it appears that i forgot to retain the fuel-freeze property... i'm anxious to see the fix when it is applied to the code and also curious if it has been there for a while or if it was recently introduced since August or thereabouts...
"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: 9148
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04

Re: Choppy Framerate on Latest Version

Postby Richard » Sat Dec 15, 2018 4:31 pm

wkitty42 wrote in Sat Dec 15, 2018 12:18 am:this is what i've been hunting for these last few months with my system falling to its knees in a very short time (<10 minutes)... i always use fuel-freeze just because...
..introduced since August or thereabouts...


It's my fault; so I am therefore worthy of the biscuit-spawn reference; although not sure how Mother would take it.

I broke this when I changed settimer() into maketimer() in AAR.nas and alas I only noticed last week because I hardly ever use fuel freeze (realism and all that). However I wanted to test long term stability with the texture cache, but afterwards to find another slowdown.

Changes pushed to next. I'll do 2018.3 shortly.
Richard
 
Posts: 810
Joined: Sun Nov 02, 2014 11:17 pm
Version: Git
OS: Win10

Re: Choppy Framerate on Latest Version

Postby Hooray » Sat Dec 15, 2018 4:42 pm

Richard wrote in Sat Dec 15, 2018 4:31 pm:I broke this when I changed settimer() into maketimer() in AAR.nas and alas I only noticed last week because I hardly ever use fuel freeze (realism and all that).


That's intriguing, what exactly went wrong here, i.e. did you end up creating too many timer objects for the same callback ?

FYI: In response to jsb's latest changes to addon.nas (wrapping maketimer(), committed by rominet), I suggested to also wrap settimer(), and given that it's lower level, it is possible that there is no 1:1 mapping, because settimer() can be used deliberately to create independent timers at different resolutions/intervals, whereas we would have to use distinct maketimer objects for that. My suggestion was to use Nasal's id() API to look up the internal id of the Nasal callback and build a lookup table (Nasal hash) with the id of the callback as the key into the hash - would that have helped in your case, or not ?

(with this sort of callback lookup behind the scenes, we could simply provide a dedicated makeSingleUniqueTimer() API that works off the assumption that its callback is only managed by a single timer (event handler), which would probably solve many problems relating to leaking timers ?)
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: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: Choppy Framerate on Latest Version

Postby wkitty42 » Sat Dec 15, 2018 6:42 pm

Richard wrote in Sat Dec 15, 2018 4:31 pm:It's my fault; so I am therefore worthy of the biscuit-spawn reference; although not sure how Mother would take it.

hahaha, i was being nice when i wrote that exclamation... i certainly wasn't calling anyone anything... what i actually said was really close sounding to that :mrgreen:

i'm really glad you found it, though... i might be able to go back and try my other configs now and see how they work :lol: i need to figure out this new LOD delta thing so i can set them in my configs... i haven't even looked for the properties used, yet, or looked to see if they are based from detailed or stepped and based on each other in a tier... by that i mean

detailed = 1500 meters
rough = 20000 meters (is that added to detail's number? (21500))
bare = 30000 meters (is that added to rough so they are stacked (51500 total) OR is it added to detailed (31500))?
"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: 9148
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04

Re: Choppy Framerate on Latest Version

Postby TribalBob » Thu Dec 20, 2018 1:47 pm

legoboyvdlp wrote in Thu Dec 13, 2018 4:41 pm:Thanks for the report - I checked and couldn't reproduce. Are you using the fuel freeze option in the commandline or in the fuel payload menu?

Where did you get the f-14?


I apologize for taking so long to get back to this thread, reading through, it appears the source of the issue has been found, but to answer your questions, I was using the in-game "Fuel & Payload" context menu and the F-14 I am using is the Grumman F-14b from the official hangar downloaded through the launcher.
TribalBob
 
Posts: 47
Joined: Thu Aug 23, 2018 12:58 pm


Return to Support

Who is online

Users browsing this forum: No registered users and 5 guests