Jump to content

[FAQ]Solution to freeze and stutter using FMC


Recommended Posts

3 hours ago, skiselkov said:

I'm hit by this every time I'm instructed by ATC to fly direct to a point, try to execute a step climb or even just modify a VNAV constraint. Any reason why these couldn't be performed in a background thread? It's not like there's a reason why this needs to be performed on the main rendering thread. Most of us have spare CPU cores available, but almost nobody has a CPU fast enough that a one-second computation could all of a sudden be done in an unnoticeable fraction of it.

Many reasons. Thanks anyway.

 

It's easy to throw a few sentences together and make it sound like we're being lazy.

In reality;

- The X-Plane SDK hates threads. It's recommended not to use them everywhere.

- The systems are written in Lua. Lua has no native support for threads, or binary interchange structures.

- Adding a simple to use, yet powerful, cross platform (as in all three) threading API that maps well to Lua and the existing Gizmo API that artists expect while also explaining why NONE of the x-p SDK functions they want to use are still available is not "a sentence" worth of difficulty.

 

Threading is hard.

Threading in a cross platform, artist-abstracted, script-friendly way is even harder.

 

Edited by Ben Russell
Link to post
Share on other sites
  • Replies 223
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

I'll be working closely with Tom and the team to optimise things like this. I might have to add "Worker Threads" to Gizmo64 so we can do the heavy lifting stuff outside of the game loop. Tha

Most people don't have an issue with frames when not using the fmc. And considering no one knows why, it's hard to pinpoint and work on a solution. As well its computer based. Not fully ixeg based. 

I'm going to allow tweaking of the Lua Garbage Collection allowing you to force it to run every frame. I might add a more interesting GUI to allow full control of the Lua GC params which will all

Posted Images

5 minutes ago, skiselkov said:

Don't worry man, I write operating system kernels for a living, I know.

As a long term objective I do want to add "Worker Threads".

These would;

- Exchange data with the existing Gizmo thread via a text packet containing what's basically a large lua table that's been serialised into a "JSON" packet (but Lua syntax).

- Only have access to the basic Lua API's.

This will allow a massive expansion in power at the cost of not having any access to things like the X-Plane nav databases from the worker threads.

 

Edited by Ben Russell
Link to post
Share on other sites
5 minutes ago, Ben Russell said:

As a long term objective I do want to add "Worker Threads".

These would;

- Exchange data with the existing Gizmo thread via a text packet containing what's basically a large lua table that's been serialised into a "JSON" packet (but Lua syntax).

- Only have access to the basic Lua API's.

This will allow a massive expansion in power at the cost of not having any access to things like the X-Plane nav databases from the worker threads.

I'm working on a fully-featured Boeing-style FMC, written in C (plan on open-sourcing it once it's functional to the point of being useful). Let me know if you need things like X-Plane navdata parsing, geometry, physics, projections code or anything.

Link to post
Share on other sites
24 minutes ago, Ben Russell said:

As a long term objective I do want to add "Worker Threads".

These would;

- Exchange data with the existing Gizmo thread via a text packet containing what's basically a large lua table that's been serialised into a "JSON" packet (but Lua syntax).

- Only have access to the basic Lua API's.

This will allow a massive expansion in power at the cost of not having any access to things like the X-Plane nav databases from the worker threads.

Well, don't know how much use it'll be to you, but in case you wanna see what you can reuse, feel free to lift bits you'd use: https://github.com/skiselkov/openfmc

The nav data parser is in airac.c, although I'm not sure the data structure format will be of much use to you. Maybe just to get inspiration from it. The generic geometry handling code sits in geom.c and allows for things like vector math, solving 2D and 3D geometric problems (intersections), coordinate conversion, spherical projections, etc.

  • Upvote 2
Link to post
Share on other sites
11 hours ago, skiselkov said:

I'm hit by this every time I'm instructed by ATC to fly direct to a point, try to execute a step climb or even just modify a VNAV constraint. Any reason why these couldn't be performed in a background thread? It's not like there's a reason why this needs to be performed on the main rendering thread. Most of us have spare CPU cores available, but almost nobody has a CPU fast enough that a one-second computation could all of a sudden be done in an unnoticeable fraction of it.

If you are on windows, set an exception for windows-defender so the X-Plane folder does not get scanned. Try if that helps.

Link to post
Share on other sites
51 minutes ago, Litjan said:

If you are on windows, set an exception for windows-defender so the X-Plane folder does not get scanned. Try if that helps.

Nah, I know what the problem is. It's the same problem you described a couple of pages back, in that if you try to do any kind of MOD on the FMC in flight, you'll get VNAV recalculations every 2 seconds. Sadly due to how those are implemented in lua, they take a lot of time and since the lua interpreter executes on the main drawing thread, the whole sim pauses for a short while as the VNAV calculation is performed. Once I hit EXEC, this stops.

Link to post
Share on other sites
19 minutes ago, skiselkov said:

Nah, I know what the problem is. It's the same problem you described a couple of pages back, in that if you try to do any kind of MOD on the FMC in flight, you'll get VNAV recalculations every 2 seconds. Sadly due to how those are implemented in lua, they take a lot of time and since the lua interpreter executes on the main drawing thread, the whole sim pauses for a short while as the VNAV calculation is performed. Once I hit EXEC, this stops.

We will look into sharding (possibly using co-routines) the workload when we've got the bugs sorted out. Trying to do it now would be a nightmare.

Worker Threads eventually but sharding will be easier to do now with the codebase that IXEG have built up.

Link to post
Share on other sites
1 minute ago, Ben Russell said:

We will look into sharding (possibly using co-routines) the workload when we've got the bugs sorted out. Trying to do it now would be a nightmare.

Worker Threads eventually but sharding will be easier to do now with the codebase that IXEG have built up.

I totally understand. It's an annoyance, but it's not a showstopper (as happened to me today when selecting, reselecting and deselecting STARs while sitting on the ground, leading to a soft crash of the FMC).

Link to post
Share on other sites

If the issue might be related to FMC selections this wouldn't apply to my stutter every 2-3 seconds. I know it is sacrilege, but I rarely use the FMC. I mainly fly VFR using the map display and or VOR. So, I tried a flight or two using the FMC thinking that maybe when I select EXEC before takeoff it would solve the stutter, but it had no effect. I have not tried it since the last two updates came out so I will try it again.

  • Upvote 1
Link to post
Share on other sites

On a Mac here, I'm glad I found this discussion.  I experience the same stutters at the same intervals, and only with the IXEG. If I load any other aircraft, everything is smooth.  With the IXEG, I get a 15 fps drop (on average) every few seconds.  Fingers crossed for the fix!

Link to post
Share on other sites
  • 2 weeks later...

Kind of quiet on this topic, but no change for me. I have updated to 1.0.4. I realize nothing was addressed regarding this issue in the updates, but Ive been hoping some of the changes might have an impact on this anomaly. Flying other aircraft until there's a fix...I hope. Could be some unexplained conflict with some of our systems as apparently not everyone is having this issue.

Link to post
Share on other sites

Looking at youtube videos it seems to me that everybody is having the issue (most evident on ground), but maybe the micro stutters are not so noticeable to spoil the overall smooth and high fps experience this plane gives even on low end machines.


Link to post
Share on other sites

Yeah, we are pretty much not able to do anything about this. I, for example, always have what some may call "micro-stutters" when flying X-Plane, even when using default planes. You can see the sim pause ever so slightly when loading in new trees, buildings, or other scenery objects. I have frame-rates of >50 mostly, and you can "feel" the dip to 30s when this happens.

We do have some calculations running every few seconds, and this will also drop your framerate down a bit every few seconds. I guess everyone has a different sensibility when it comes to this, and also possibly your system setup (number of background tasks, memory speed, texture resolution, etc...) could have an effect on that.

It is on our long-term list to spread out background calculation a bit more - but for now I can only suggest trying to tweak your system load (look for background, memory intensive processes).

Sorry for not having more immediate help available,

Jan

Here you can see the graphical display of my framerate, sitting in EGLL: I have a base framerate of 40 fps, and every 4.5s my framerate dips to 30. I don´t really perceive this as stuttering on my machine, though...

Framerate.jpg

Link to post
Share on other sites

Yes I do understand and see an occasional hiccup when default scenery loads when flying other aircraft. My sensitivity to stutters are pretty high as I also have a lot of experience with p3d. Once in the air and at altitude with the 737 classic the stutter every couple of seconds is not aa noticeable unless you view from outside the cockpit. The real experience/immersion killer for me is while taxiing, taking off and landing. It is bad, almost like the sim literally stops a millisecond every 2-3 seconds. I really want to enjoy this plane because it has the potential to be the very best, but I have all of the other latest excellent heavy add-ons and they all fly virtually stutter free, so that out weighs the 737 classic benefits for me. Im dissapointed, but hopeful for a solution. Keep up the good work.

Link to post
Share on other sites
8 hours ago, Litjan said:

Yeah, we are pretty much not able to do anything about this. I, for example, always have what some may call "micro-stutters" when flying X-Plane, even when using default planes. You can see the sim pause ever so slightly when loading in new trees, buildings, or other scenery objects. I have frame-rates of >50 mostly, and you can "feel" the dip to 30s when this happens.

We do have some calculations running every few seconds, and this will also drop your framerate down a bit every few seconds. I guess everyone has a different sensibility when it comes to this, and also possibly your system setup (number of background tasks, memory speed, texture resolution, etc...) could have an effect on that.

It is on our long-term list to spread out background calculation a bit more - but for now I can only suggest trying to tweak your system load (look for background, memory intensive processes).

Sorry for not having more immediate help available,

Jan

Here you can see the graphical display of my framerate, sitting in EGLL: I have a base framerate of 40 fps, and every 4.5s my framerate dips to 30. I don´t really perceive this as stuttering on my machine, though...

Framerate.jpg

Hm. Well congratulations for you ,do you not see it as stuttering. If I'm somewhere in the default Baron with 60 FPS or if I'm in another payware aircraft at the same place with 45 FPS, I have still  60 or 45 FPS !!!! And not still 45-30-45-30-45, every 7-10 seconds !! This is problem only with IXEG 733!! Sorry!

 

Edited by letec
Link to post
Share on other sites

Hello,

I can confirm this being an issue with the IXEG 733. I just did a quick comparison between the IXEG 733 and the FF 763. With the FF plane I get 4 FPS less overall but no dips, the FPS is pretty smooth. Everything else is the same, same location, same weather, same plugins, everything, I just loaded different plane. There is definitely something going on there every 7-8 seconds just as others reported :

IXEG 733:

FPS_733.jpg

FF 763:

FPS_763.jpg

Link to post
Share on other sites
10 minutes ago, mmerelles said:

I am experiencing the same stutters with the ixeg, it is highly noticeable and annoying during taxing not an issue inflight. Let's hope this can be fixed.

Yeah. After run battery or APU start comming  these problems. And even more after the engine starts!During taxi, during take-off, during landing. Totally depraved pleasure smooth taxiing, take-off, flight level and landing but above FL200 It is not so much visible.

Edited by letec
Link to post
Share on other sites
  • 4 weeks later...
On May 11, 2016 at 4:08 PM, skiselkov said:

Nah, I know what the problem is. It's the same problem you described a couple of pages back, in that if you try to do any kind of MOD on the FMC in flight, you'll get VNAV recalculations every 2 seconds. Sadly due to how those are implemented in lua, they take a lot of time and since the lua interpreter executes on the main drawing thread, the whole sim pauses for a short while as the VNAV calculation is performed. Once I hit EXEC, this stops.

It looks like Skiselkov is onto something. Worth a closer look anyway. The workaround in my case has been to leave the 737-300 in the hanger.

Link to post
Share on other sites
4 hours ago, SkyCoyote said:

It looks like Skiselkov is onto something. Worth a closer look anyway. The workaround in my case has been to leave the 737-300 in the hanger.

No, this is a different issue and can be cured by adding an exception to your active virus scanner (exclude XP Folder from Windows Defender, Avast, etc.)

Cheers, Jan

 

Link to post
Share on other sites

Sorry to disagree...in my case the stutter every couple of seconds has nothing to do with the FMC because I haven't been using the FMC, but I tested it with no difference in the results. Also in my case the stutter has nothing to do with Windows Defender, Antivirus etc. I have tried that too. This issue is a specific conflict with this one aircraft. I just got the new PMDG DC6 and was a bit concerned about how it might perform, but it is excellent, silky smooth, no issues whatsoever. No issues with the MD80, 767 or any of the Airbus aircraft. The 737 Classic is the hanger for me too. It doesn't sound like anyone knows what is really causing this or that it is high on the priority list. If you look at the number of posts related to this issue it far outweighs posts on any other topic. Very disappointed.

  • Upvote 1
Link to post
Share on other sites
9 minutes ago, sthenion said:

Sorry to disagree...in my case the stutter every couple of seconds has nothing to do with the FMC because I haven't been using the FMC, but I tested it with no difference in the results. Also in my case the stutter has nothing to do with Windows Defender, Antivirus etc. I have tried that too. This issue is a specific conflict with this one aircraft. I just got the new PMDG DC6 and was a bit concerned about how it might perform, but it is excellent, silky smooth, no issues whatsoever. No issues with the MD80, 767 or any of the Airbus aircraft. The 737 Classic is the hanger for me too. It doesn't sound like anyone knows what is really causing this or that it is high on the priority list. If you look at the number of posts related to this issue it far outweighs posts on any other topic. Very disappointed.

I beg to disagree as well - the post I quoted was specifically mentioning the performance problem you experience while you MOD a route - and it disappears if you EXECute the mod. I am sure you missed this at a cursory glance, like I am prone to do when skimming over threads.

The problem you experience is certainly not outweighing every other topic, and if you look at the many videos out there on YouTube you may find that the problem varies from computer to computer and is also very differently perceived by users - as in some consider it a total showstopper, some don´t notice it at all.

We are very concerned with this problem that some are having and are determined to cure it - but it is not an easy fix and may take a while. Don´t mistake that for us not caring, though, we do!

Jan

Link to post
Share on other sites
19 minutes ago, sthenion said:

Sorry to disagree...in my case the stutter every couple of seconds has nothing to do with the FMC because I haven't been using the FMC, but I tested it with no difference in the results. Also in my case the stutter has nothing to do with Windows Defender, Antivirus etc. I have tried that too. This issue is a specific conflict with this one aircraft. I just got the new PMDG DC6 and was a bit concerned about how it might perform, but it is excellent, silky smooth, no issues whatsoever. No issues with the MD80, 767 or any of the Airbus aircraft. The 737 Classic is the hanger for me too. It doesn't sound like anyone knows what is really causing this or that it is high on the priority list. If you look at the number of posts related to this issue it far outweighs posts on any other topic. Very disappointed.

Most people don't have an issue with frames when not using the fmc. And considering no one knows why, it's hard to pinpoint and work on a solution. As well its computer based. Not fully ixeg based. 

What are your PC specs? Try reinstalling the plane. Also remove the plugins back to stock configuration.  Except Gizmo ofcourse.  

Edited by poodster
  • Upvote 1
  • Downvote 2
Link to post
Share on other sites
  • Litjan pinned this topic
  • Litjan unpinned this topic

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    No registered users viewing this page.


×
×
  • Create New...