Fields refresh of the map every 60 seconds make the game stutter

Erkin
Posts: 7
Joined: Tue May 07, 2024 10:12 pm

Fields refresh of the map every 60 seconds make the game stutter

Post by Erkin »

Hello,

I have a stuttering happening exactly every each 60 seconds.
I tried on a fresh new game, default map, with no mods, and the same thing happen.
Even if the game is paused and on the menu, I can see the framedrop linked to the stuttering.

I tried many settings, in game and on my PC (cpu affinities, process lasso, disabling of core parking), nothing change.

As the stuttering is consistant, I wouldn't be surprised if it was linked to a timed procedure.
I already seen the same thing on Flight Simulator, where the javascript layer (for the hud) was responsible of some stutterings in the same way.
Last edited by Erkin on Sun May 12, 2024 9:41 pm, edited 1 time in total.
Erkin
Posts: 7
Joined: Tue May 07, 2024 10:12 pm

Re: Stuttering every 60 seconds

Post by Erkin »

I looked for a video from a big streamer.
One of the first that I found : https://www.youtube.com/watch?v=b4Vfg9aPYhs
He has the suttering every minutes, at 12 seconds (sometimes he is in construction mode or not moving so it's not really visible) : 5:12 - 6:12 - 8:12 - 9:12 - 10:12. I even switched the timestamp of the video to look further, 26:12, still a stuttering.
Another one : https://www.youtube.com/watch?v=mr22ubGFEuc
15:30 - 16:30 - 24:30 - 25:30 - 26:30 - 27:30 etc.
Noraf
Posts: 2219
Joined: Thu Oct 17, 2013 2:53 pm

Re: Stuttering every 60 seconds

Post by Noraf »

What's your cpu and gpu load?
:hi:

FS22 Bug-tracker
How to post your log
Giants Discord
Posting pictures How-to

Just remember, if the world didn't su.., we'd all fall of...
Erkin
Posts: 7
Joined: Tue May 07, 2024 10:12 pm

Re: Stuttering every 60 seconds

Post by Erkin »

I have a I7 12700k + RTX 2070.
Some actives CPU cores are under 50%, GPU usage is under 50% if framerate is locked at 90fps, 98% with 180fps.
There is no difference on the CPU/GPU load when the stutters happens.
The stutters are still presents in the menu or by looking the ground (with a framerate of 180/200fps).

I honestly think it's not linked to the hardware and present on most computers (Most people are not bothered by this, I am very sensible to stuttering, it's my curse).
But hardware could impact the violence of the stuttering.
It's not a shader compilation stutter or traversal stutter.

My main objective with this topic is to alert developers about this, they could investigate what is triggered each 60 seconds and look for optimizations.
jrolson
Posts: 15
Joined: Wed Aug 17, 2022 8:39 pm

Re: Stuttering every 60 seconds

Post by jrolson »

My game keeps freezing for 2-3 seconds...

Log shows,
Info: Failed to request rc, HTTP code 0

Im playing single player
Erkin
Posts: 7
Joined: Tue May 07, 2024 10:12 pm

Re: Stuttering every 60 seconds

Post by Erkin »

Each of your freezes are spaced of 60 seconds apart ?
A network request could be a good suspect.
onlybr
Posts: 24
Joined: Mon Oct 02, 2023 6:06 am

Re: Stuttering every 60 seconds

Post by onlybr »

jrolson wrote: Thu May 09, 2024 3:55 am My game keeps freezing for 2-3 seconds...

Log shows,
Info: Failed to request rc, HTTP code 0

Im playing single player
I have the same problem, but in multiplayer, the same error appears HTTP failed to request rc and the dedicated server is at 0% infinite, only resolving with a restart.
Steel_Horse
Posts: 157
Joined: Thu Jan 13, 2022 2:25 am

Re: Stuttering every 60 seconds

Post by Steel_Horse »

jrolson wrote: Thu May 09, 2024 3:55 am My game keeps freezing for 2-3 seconds...

Log shows,
Info: Failed to request rc, HTTP code 0

Im playing single player
I dont have the freeze, but I have been seeing the error code. I started noticing it popping up in logs around about the time of the recent DLC. The cause is a LUA function not ending/closing in an expected way. It obviously isnt fatal as the game works as best we can tell. I havent been able to figure out if it is a Mod or base game triggering the error. eg. Giants may have slightly changed a basegame function that the odd LUA script calls.
Erkin
Posts: 7
Joined: Tue May 07, 2024 10:12 pm

Re: Stuttering every 60 seconds

Post by Erkin »

I'm looking https://www.twitch.tv/agrar_sascha right now, Giants partener. I can see he also have a stuttering every 60 seconds !
(Same here https://www.twitch.tv/sparx_simracing )
Erkin
Posts: 7
Joined: Tue May 07, 2024 10:12 pm

Re: Stuttering every 60 seconds

Post by Erkin »

I found the source of the stuttering.
As suspected, it's on the script/LUA layer, for the map.

First, ingame in the engine profiler, I can san that each stuttering are preceded by a big increase of the scripting update time (I guess it's the main loop of the scripting layer).
Image
Image

In thisfile :
gui/hud/IngameMap.lua
There is this code.
Image

We can see that at the loading of the map, a constant is injected to a property of the map. According to its name, I suppose it's the amount of time waited to refresh the status of the fields on the map.

On the debugger, I checked the value of this constant, it's of 60000 ms, so 60 seconds.
Image

On the debugger console, if I set this variable to a large value "_G.IngameMap.FIELD_REFRESH_INTERVAL = 999999999" I have no more stuttering !
If I set it to 5 seconds, it's a stuttering fest.

I will look if we can change a global variable by developing a mod. If it's possible, I will mod it to disable/enable this refresh with a simple shortcut.
Erkin
Posts: 7
Joined: Tue May 07, 2024 10:12 pm

Re: Fields refresh of the map every 60 seconds make the game stutter

Post by Erkin »

I made a first custom mod, to change the value with a console command. You can see the result in video.
jrolson
Posts: 15
Joined: Wed Aug 17, 2022 8:39 pm

Re: Fields refresh of the map every 60 seconds make the game stutter

Post by jrolson »

In my case of stuttering and freezing lockups for 2-3 seconds.
I uninstalled icue for my keyboard and downgraded my nvidia graphics driver back to 537.58

My game runs smooth now...
Post Reply