Jump to content

Are you experiencing gradually degrading performance (the freeze frame glitch)


katateochi

Recommended Posts

Hey guys, I'm looking for some help in trying to identify and define an issue so that I can make a good bug report about it. So I want to see if others are having this issue and see what your thoughts on it are.

the symptoms

The issue is a periodical (about every 10-20 seconds) split second freeze in the display. The whole game appears to pause momentarily and then catches up with itself. I say "display" specifically as it appears that some level of input is still being registered. It is most apparent when you try to smoothly pan the camera around a craft (and it doesn't even need to be a large craft). There is a short pause in the display and then it catches up with the mouse input and you find that you've panned further than expected.

It is actually apparent when panning the camera around at the space center. here's a gif to try and show what I'm on about. I'm just moving the mouse in an oval and you can see at one point the camera snaps and your suddenly looking down on the RnD complex (can be a bit hard to distinguish the glitch from the gif looping at the end, but watch it a few times and it becomes apparent which snap is caused by the glitch. The glitch comes quite near the end of the gif, so there is a period of smooth panning, then what appears to be a hard cut and then very shortly after the gif repeats.)

syRyY1C.gif

My observations

To start with I did not experience this at all in 1.0.x, but gradually as my space program has got larger it has become more and more apparent. I don't think this will effect players with just a few craft in flight, I think the number of in-flight craft may be a factor (but not the whole cause). I now have over 40 in-flight craft and my save file is 4.4mb. I suspect that you need to have that sort of size save before this starts being apparent.

Part count is not the issue (although performance with large craft does also seem poor compared to older versions of KSP). This freeze-frame glitch is still apparent even with small craft (~50 parts) and just while at the space center, which is why I suspect that the number of in-flight craft /save file size is one of the main factors. It is sometimes noticeable in the movements of the Kerbals wandering about the SPH/VAB.

But in-flight craft isn't the whole story. I have two saves, a career and sandbox in my 1.0.2 install, in sandbox I only have 10 in-flight craft. If I start the game and play sandbox then it appears to run smoothly, but if I first play my career and then switch to sandbox then the freeze-frame issue is apparent there too. It's as if things are not being unloaded from memory.

Could this be due to paging? It may be that windows is trying to free up RAM by writing unused assets to the swap file and the momentary freeze is caused by that write action?

possibly, but my OS is on an SSD so that write shouldn't be so much of an overhead. I've tried having KSP installed on the same disk (as it's my only SSD) and I've also tried having it on a separate drive to the OS and performance is basically the same in both cases.

The longer the KSP session the worse the problem is. This makes the problem hard to diagnose or show to others. You can't just load up KSP and see it happening, it gradually creeps in over a long enough play session.

Am I being nit-picky? Well perhaps, but while I don't mind a low frame rate (within reason) this kind of glitch really gets to me. You can adapt and compensate for a constant low frame rate, something that happens intermittently is much harder to deal with. It causes annoying things like

-when selecting a bunch of fuel tanks you pan around to select another tank and just as you are about to click there is a freeze and it registers your click on a different part, so then you have to de-select all the tanks and start again.

-A couple days ago I was trying to land a plane with 16 tourists, my 2 best scientists and one of my good pilots when just as I was leveling out it froze and next thing I know I was rolled much further over than planned....all hands where lost.

-When setting M-nodes and trying to gently tweak it a glitch can cause your gentle tweak to be registered as a much larger move and mess up your node.

I find this kind of error to get increasingly frustrating.

But KSP is a complex game with lots going on? Yeah, but this never used to happen. I became really aware of this issue in 0.90.0 and it pretty much stopped me playing. In previous versions I've had much larger space programs (saves files over 10mb) and never had this sort of issue. (as a side note; in previous versions I've had much larger craft running at better frame rates than currently seems possible).

Is it because of too many mods. Not likely, I'm running with just a handful of mods (MJ, KAC, QuickScroll, TemperatureGaugeKiller and Claw's StockBugFixModules).

PC not up to it? well as I said, I've had larger saves in the past with no issue on this machine. My rig has an i7, 16GB ram and I'm running win7.

I would really like to hear from you guys if you are experiencing this glitch, and if you have any thoughts about it's cause and or possible work arounds. I want to make a full bug report but I don't feel like I have enough info to make one that will be of use to the devs as it is not easy to say how to replicate it (aside from saying just play KSP for several weeks with some very long play sessions). If you can add anything to what I've already said then I will include that in my report.

Link to comment
Share on other sites

I've had almost identical issues, but only when I'm in flight, with a SCANsat map open. But like you said it does get more pronounced with a longer play session. My computer specs are the same as yours.

My save is only 2.5MB, with ~30 persistent craft. I'll let you know if it starts happening out of flight, or without SCANsat, as I keep playing and launching more craft. It might be the same problem as yours, with SCANsat making it more noticeable earlier on.

Sorry I can't offer more insight; I'm not a technological person.

Link to comment
Share on other sites

I've had the laggy KSC screen for a few versions now. I mostly attribute that to my video card being a dinosaur (GTX 285). But lets be real I play GTA 5 in full online servers at ~50 FPS. Kerbal should be peanuts.

I have noticed a 'bug' with right-click menus causing extreme lag. However I think that is a bug with tweakable everything or tweak scale. I can't say for sure without testing for it. I mostly notice it in the VAB when I'm adjusting wheel bases.

Link to comment
Share on other sites

I may have this or I may just have lag in general (i7 Mobile quad core, Intel HD4600, 8GB RAM), but generally the space center and anything involving Kerbin is an enormous ball of lag. Same goes for most bodies... I get the feeling that the PQS system isn't very well optimized, especially when you consider that rendering an ocean causes even more lag (since it's effectively rendering two PQS bodies in that case). Anyway, I'll play with it some more and see if the issue has more to do with this sort of stutter or just lag in general.

Link to comment
Share on other sites

I've not seen this myself but I've not got that many craft in the system. I've noticed that my 1.0.2 save folder has many more crash reports in it than 0.90...

I'll keep an eye out for it and report back.

Link to comment
Share on other sites

Yes I have a very similar issue. I have an i7, 16GB RAM and a 970GTX So the machine is fast. I have no flights in progress. I use the save for building only. The issue gets worse when making high part count ships or flying them. FPS performance is worse than I have seen in previous versions too.

Link to comment
Share on other sites

This happens to me every day, most pronouncedly in flight after I've played for an hour or so. My hypothesis is that it's the engine's Garbage Collector running due to a memory leak.

I don't recall this occurring in 1.0.0, so my guess is that in 1.0.2 (or mayyybe 1.0.1) SQUAD missed something and introduced a memory management error.

Link to comment
Share on other sites

I've had almost identical issues, but only when I'm in flight, with a SCANsat map open. But like you said it does get more pronounced with a longer play session. My computer specs are the same as yours.

My save is only 2.5MB, with ~30 persistent craft. I'll let you know if it starts happening out of flight, or without SCANsat, as I keep playing and launching more craft. It might be the same problem as yours, with SCANsat making it more noticeable earlier on.

Sorry I can't offer more insight; I'm not a technological person.

At one time I had suspected SCANsat (RemoteTech was also high on the suspect list) as they both have more background activity than most. But it's not either, their good names remain untarnished, but you may be right that SCANsat emphasizes the underlying problem.

I may have this or I may just have lag in general (i7 Mobile quad core, Intel HD4600, 8GB RAM), but generally the space center and anything involving Kerbin is an enormous ball of lag. Same goes for most bodies... I get the feeling that the PQS system isn't very well optimized, especially when you consider that rendering an ocean causes even more lag (since it's effectively rendering two PQS bodies in that case). Anyway, I'll play with it some more and see if the issue has more to do with this sort of stutter or just lag in general.

What is the PQS system? [/ignorance]

Yes it is more noticeable around Kerbin, but it's present around other bodies too. Something I've noticed more recently is that performance in general seems worse on the surface (I've noticed this in 1.0.2, and so far just on Mun, not landed anything significant elsewhere in 1.0.x), FPS is lower than I'd expect (with a 250 part mining rig present) but the freeze-frame issue is also quite apparent there.

Yes I have a very similar issue. I have an i7, 16GB RAM and a 970GTX So the machine is fast. I have no flights in progress. I use the save for building only. The issue gets worse when making high part count ships or flying them. FPS performance is worse than I have seen in previous versions too.

As I've been playing career it's taken a while before I appreciated that part count related performance seemed worse in 1.0.x. Although my machine was struggling with 200-300 part craft in 0.90.0. In previous versions I've built craft with much higher part counts and still had ok FPS. I think this is an issue that crept in with 0.90.0. (nice G-card btw, I've got a GTX760 in mine)

This happens to me every day, most pronouncedly in flight after I've played for an hour or so. My hypothesis is that it's the engine's Garbage Collector running due to a memory leak.

I don't recall this occurring in 1.0.0, so my guess is that in 1.0.2 (or mayyybe 1.0.1) SQUAD missed something and introduced a memory management error.

I started noticing this in 0.90.0 and it really started getting on my nerves then. My biggest hope for 1.0 was that this would have been fixed.

When I first noticed it I assumed it must be mod related so I went from using lots of mods to an almost pure stock setup (and 100% pure stock for a while), and from that I've concluded that it is an issue with the core game (this was during 0.90.0). Your point that it could be the GC sounds reasonable given that it is a periodical thing.

Thanks for the info so far guys. I think this is a really serious problem and one which could easily slip thought QA testing given that it takes some serious playing of the game for an extended time before it appears. It's one of the reason I've not made a vid in ages (work being the other reason), but anything I record has these freezes in it and I just don't enjoy making vids that looks like there's some compression glitch in the final output.

I'm going to give this thread a bit more time to collect more info and then I'll write up as detailed a bug report as I can (tomorrow probably).

Link to comment
Share on other sites

This happens to me every day, most pronouncedly in flight after I've played for an hour or so. My hypothesis is that it's the engine's Garbage Collector running due to a memory leak. I don't recall this occurring in 1.0.0, so my guess is that in 1.0.2 (or mayyybe 1.0.1) SQUAD missed something and introduced a memory management error.
Perhaps the temp gauges memory leak? With luck, 1.0.3 might address this. Regardless, I just want to say that the GC-caused frame stutter situation is much improved for me in 1.0. It was just awful in .90, but I've hardly noticed it in 1.0.2 (but I'm not paying intense attention, as you would while trying to make videos.)

Here is a relevant quote about 1.0 improvements:

... The VAB/SPH scenes no longer require reloads when you clear/load a vessel, PQS reset/startup has been smoothed - lowering the time required to transition scenes, and lots of little tweaks to reduce the game’s CPU load and garbage collection. ...
Link to comment
Share on other sites

My hypothesis is that it's the engine's Garbage Collector running due to a memory leak.

Install GCmonitor and see if the freezes coincide with the garbage collection runs. If this is the case, it's almost certainly the GC 'stopping the world' while it runs, and there aren't that many options...

* Find and fix all the leaks and short-lived objects that are creating garbage, both in Squads code and in any mods you run.

* Wait for unity to replace the ancient, single-threaded GC code with something more modern - e.g. by updating to a version of Mono that isn't dead and decomposing.

Unity 5 might improve matters, but we shall see.

I just want to say that the GC-caused frame stutter situation is much improved for me in 1.0.

I tend to agree, it's better. But I'm still seeing that MET clock flicker yellow in time with the GC runs, so it's not fixed.

From my experiments with 0.90, breaking the GC (by recompiling mono with 'experimental' features ;)) results in massive memory leaks (as expected) but sorts the stutter (for me, YMMV)...

Until the KSP process eats all my RAM and OOMs that is :D

In any case, I'd be curious as to whether it is truly GC spikes you guys are seeing, or something else entirely - hopefully something we can actually fix.

'Cause this annoys the hell outa me too.

The pervasive performance problems with this game are almost enough to drive me away... Just sayin'.

Edited by steve_v
Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

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.

×
×
  • Create New...