Jump to content

Memory leak and Editor rounding error's, and sliding craft


Recommended Posts

this is all in 1.4.3

 

firstly, craft like to slide when landed and not moving, i noticed this and thought it was my craft so i played with the wheel and nothing fixed it, today i noticed on a stream his craft was also sliding, breaks on, all wheels aligned yet it slides for no reason what's so ever

it happens at KSC and the dessert runway but nothing seems to stop it unless you have a launch clamp on your plane when wanting to test somthing while stationary before taking off, i've tried playing with friction settings but it does not seem to have much of an effect

not sure if this is the wheel or terrain but when you have a craft on a runway they always seem to float, like they're touching but visually it makes the craft look like it's floating an inch off the ground, not sure if that is a bug though  

 

secondly KSP seems to have a memory leak, KSP only used a couple gigs of ram for me but i noticed on EJSA's stream he had a big memory leak, Stock KSP used 10 gigabytes!! here's the clip https://clips.twitch.tv/PreciousHedonisticLattePJSugar

he also stated it seems to only happen after playing KSP for awhile like EJ or Das (i have not seen Das have this issue as i rarely watch him)

 

also there seems to be rounding error's in the SPH editor (not sure about the VAB), here's the twitch slip https://clips.twitch.tv/KathishEphemeralYogurtAMPEnergyCherry

 

does anyone else have these issues? or is it just me & him?

Link to comment
Share on other sites

2 hours ago, bghyt said:

firstly, craft like to slide when landed and not moving, i noticed this and thought it was my craft so i played with the wheel and nothing fixed it, today i noticed on a stream his craft was also sliding, breaks on, all wheels aligned yet it slides for no reason what's so ever

it happens at KSC and the dessert runway but nothing seems to stop it unless you have a launch clamp on your plane when wanting to test somthing while stationary before taking off, i've tried playing with friction settings but it does not seem to have much of an effect

not sure if this is the wheel or terrain but when you have a craft on a runway they always seem to float, like they're touching but visually it makes the craft look like it's floating an inch off the ground, not sure if that is a bug though  

If it's only on the runway, this could be related, though it should have been fixed already.

Can you provide this:

Which information should your support request have?

  • KSP version including Windows, Mac, or Linux, 32 or 64-bit, and if it's Steam
  • A detailed explanation of what happened and what you were trying to accomplish
  • A screenshot of your craft or any relevant screens
  • A .craft file or save files if relevant
  • The ouput_log.txt or player.log file KSP creates when it launches and, if applicable, the crash log KSP has generated when the program crashed
  • A detailed list of system specifications
  • Are you running a clean installation, or have you updated and some of your persistence or craft files might be older versions, if so which version(s)

As state on this:

 

Link to comment
Share on other sites

9 hours ago, bghyt said:

secondly KSP seems to have a memory leak, KSP only used a couple gigs of ram for me but i noticed on EJSA's stream he had a big memory leak, Stock KSP used 10 gigabytes!! here's the clip https://clips.twitch.tv/PreciousHedonisticLattePJSugar

I think it's more to Mono not returning unused memory. Use GCMonitor to tell the difference between Mono static allocation and heap allocation.

This can also be of use.

9 hours ago, bghyt said:

also there seems to be rounding error's in the SPH editor (not sure about the VAB), here's the twitch slip https://clips.twitch.tv/KathishEphemeralYogurtAMPEnergyCherry

Sounds more like the Snap feature being triggered by unknown reasons. I had this problem on 1.4.2, and stick with 1.4.1 since them. If is the same problem, de modus operandi is: you need to hit the sweet spot in one shot - by trying to fix, the part "snaps" back to the nearest snapping spot.

Link to comment
Share on other sites

14 hours ago, bghyt said:

also there seems to be rounding error's in the SPH editor (not sure about the VAB), here's the twitch slip https://clips.twitch.tv/KathishEphemeralYogurtAMPEnergyCherry

I just remembered that I also had this behaviour switching from Local to Global coordinates while using the tools.

Link to comment
Share on other sites

On the other hand, it appears to exist a memory leak after all. I loaded a very part heavy craft, played a little and then leave the computer for the night. In the next morning, KSP had crashed and the report said it run out of memory. The process already had 14G of memory allocated (it had about 10 when I left the computer).

Link to comment
Share on other sites

And.... yes. There's a memory leak on 1.4.3 . =/

Mine is heavily modded, so that bunch of mods is "helping" the problem, but the memory leak is there - the plugins just make it happen sooner!

By leaving KSP running alone by the night, it always crashes by SIGABRT on MacOS. On the Activities, the process had almost 1T allocated (god damned memory compression used by Apple! =P) on  machine that has only 16Gb. :-)

In a way or another, i think they trimmed the garbage collector to be less intrusive. Unfortunately, it appears that they made it less active in the process.

Link to comment
Share on other sites

49 minutes ago, Lisias said:

And.... yes. There's a memory leak on 1.4.3

Indeed. I recon it's been around longer than 1.4.3 though. So far I have been too lazy to try to repro it with a stock install, I just installed more RAM. :P
Nice to know the Linux OOM killer is making good decisions, I remember when that was a bit rough.

 

49 minutes ago, Lisias said:

the process had almost 1T allocated

I know sweet FA about MacOS (or Mach), but that's one hell of an optimistic overcommit.

 

49 minutes ago, Lisias said:

In a way or another, i think they trimmed the garbage collector to be less intrusive. Unfortunately, it appears that they made it less active in the process.

Unity have done strange things to mono's GC...

Edited by steve_v
Link to comment
Share on other sites

1 hour ago, steve_v said:

Indeed. I recon it's been around longer than 1.4.3 though. 

In the end, it's a Garbage Collector problem. Mono is a dog blessed half baked of a VM - it's at at least 6 to 10 years behind Java in everything (but syntax - but hey, we have foreach and ? null operators...=/).

Added to that, we have a nasty practice on Unity (and granted, not just them) where once memory is allocated, it is not given back to system. They said that there's a reasonable expectative that if a memory was needed, it will be needed again - totally ignoring that the memory will be needed by everybody else in the system.

This used to work when just one or two clowns guys were doing it - but nowadays, everybody is doing this stunt. So we never have enough memory. We are again using "single-tasked" systems.

Swapping memory make the switching context slower? Of course it does. But it's faster than restarting the program (mainly KSP), god damnit. It's better to send KSP to swap when I have to do something else and then wait 3 or 4 minutes to it came back to RAM, than to close the damned thing and then have to wait FIFTEEN MINUTES (or more) to reload it from scratch.

Adding offense to the injury, it appears that they "solved" the stuttering on the stock game by delaying the GC - so, more and more trash would be left in memory before the GC is called to clean the house. Since now there would be a ton more of trash to be cleaned, the stuttering, when it happens, is heavier. It takes more time to happen, but when it happens, boy... it does happen.

Now put this two things together (Unity never returning memory, and Mono literally trashing the memory) and... =/

Sometimes, putting more memory into the equation makes things worse. It's better to halt 0.5secs each 2, than to halt 4 secs each 10. Memory Garbaging are algorithms that scales exponentially, not linearly. Even the ones that manages to escalate logarithmically needs a sweet spot to be useful, behaving worse than linear ones before that.

Edited by Lisias
better phrasing.
Link to comment
Share on other sites

24 minutes ago, Lisias said:

FIFTEEN MINUTES (or more) to reload it from scratch.

Wow. Either you run a lot of mods, or you've got KSP installed on a Quantum Bigfoot...
 

 

25 minutes ago, Lisias said:

Sometimes, putting more memory into the equation makes things worse. It's better to halt 0.5secs each 2, than to halt 4 secs each 10.

I tend to agree, but many seem to find that Memgraph's  heap padding makes the game more playable, so there is the potential argument that longer less-frequent collections are an improvement.
Personally, I think it's long-past time Unity either upgraded or ditched mono.

Link to comment
Share on other sites

57 minutes ago, steve_v said:

Wow. Either you run a lot of mods, or you've got KSP installed on a Quantum Bigfoot...

Both. =D

A "clean boot" for my KSP installment takes 6GB of Mono code allocated memory, and about 1G for the heap - before loading any vessel. My usual memory footprint is 10G of allocated RAM when I'm playing my biggest vessel at the moment.

57 minutes ago, steve_v said:

I tend to agree, but many seem to find that Memgraph's  heap padding makes the game more playable, so there is the potential argument that longer less-frequent collections are an improvement.

You are just delaying the crash. I don't remember who had said before that the MemGraph stunt was allowing him to have some minutes of stutterless playing, but then the thing halts and then crashed - I'm guessing that the GC took too long to do his job, and some other thread panicked and aborted due the apparent halt.

 

57 minutes ago, steve_v said:

I tend to agree, but many seem to find that Memgraph's  heap padding makes the game more playable, so there is the potential argument that longer less-frequent collections are an improvement.

Mono is a problem, but the Unity's posture about memory is worse. Even Java, that have a excellent state of the art Garbage Collector, is helpless when a dumb programmer decides it's a good idea never release back the memory it gets.

Frankly, I hate Mono. But it is one of the reasons KSP is where it is now, I have to give it that. I seriously doubt we would have so many (good) plugins, in three desktop platforms (and 2 videogaming ones) if everybody had to deal with C++.

Been there, done that. I did this in Orbiter. It's faster, it's more efficient. But very few guys can handle this.

Due the way Unity keeps stomping on our feet, I wonder if it's time to ditch Unity itself, not exactly Mono.

Edited by Lisias
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...