Jump to content

Crashes Post 1.1.X Simple Question for the affected ones


AlamoVampire

Recommended Posts

15 minutes ago, AlamoVampire said:

there was/is a huge debate about garbage cleanup and memory leaks somewhere on this forum, wonder if thats tied in?

Related, as it's mono that handles garbage collection for managed (read KSP/mods) code. There are performance issues with the way it does this, but it's not the same issue we're seeing here.
So far indications are that this crashing has something to do with how mono allocates memory from the host OS, not how KSP allocates memory within mono, if that makes any sense.

Link to comment
Share on other sites

kinda like, how one is allocated money in paycheck would be the between ksp/host os and what you BUY with said paycheck would be the with in mono? i know, a lame compare, but, its 340am and im wiped out lol with that lame compare, ima go to bed. ill check back later in the day

Edited by AlamoVampire
Link to comment
Share on other sites

16 minutes ago, AlamoVampire said:

that kinda sorta kinda makes sense to me. for my own use, ill look at it like STTNG thru voyagers universal translator of sorts, letting everyone speak lol

And like the universal translator it's doesn't always work the way you expected :P

 

Link to comment
Share on other sites

I've been very lucky, I've yet to get a CTD in about 20 hours of play on 1.1.2, but I have had numerous issues with mods.  Probably apocryphal, but I put that down to, before updating, fully backing up my KSP folder and then deleting it enitrely, firstly through "Remove local files" in steam then deleting the residual contents in the KSP folder, then reinstalling clean.  I then copy in .cft files as an when I want them from the backup or as integral mods become ready.  I've said goodbye to my pre 1.1 saves (they live on in my playable 1.0.5 backup folder if I fancy them again) which is a shame but I think worth the cost.  The mods I've had issues with often claim to be 1.1 ready, but still have niggles.  Like I say, probably apocryphal but removing all traces of the game prior to 1.1.2 (crash logs, screenshots, dumps, etc) then reinstalling has made me a very happy kerbonaut!

Link to comment
Share on other sites

So, KSP has switched to a new version of Unity, and now there is stability issues. I'm glad to finally see a serious discussion about the problem. I freely admit that I know very little about the specifics of mono or .NET framework, but when I see and hear about how this miracle of code can run on multiple platforms from a variety of manufacturers, I become suspicious. Of course, we also have Java, which is much the same, but with Java, it falls to the user to install Java, along with its runtime environment, and ensure that it is up to date, a little bit different than with the "forced" updates from Micro$oft. I haven't had any serious problems with Minecraft or it's many public releases over the last few years. Yes, there is the occasional crash , but nothing like what I experienced when using the new KSP 64 bit 1.1 based on Unity 5.

I fully understand that when taking a huge leap forward like KSP has, that there are going to be growing pains. I also expect that in time, many of the issues that we currently face with the game will be ironed out. Fine, no problem. I can deal with that, and would be happy, privileged even, to take part and help with the ongoing development of the game. But, when I'm fed a line of crap like I was with the recent exclusive Steam release, it is an insult to what little intelligence that I have. I have very little sympathy for the political maneuvering involved with the push to release on consoles or the new "walmart" of the internet, Steam. Greed comes into play. Dollar signs begin floating in peoples head, and the noble intentions around the game, education and awareness about space flight in general, become clouded. My frustration with this process comes not from the problems with Unity and KSP and crashes, but rather the lack of open and honest dialogue, like we see here in this thread, from Squad on the issue. I also realize that I am wishing for what amounts to a developers utopia, where everything just falls into place and works like it should. I guess the point of my rambling is that there are more issues that need to be, or could be, addressed besides just mono and .NET that could help stabilize the overall product and keep people like me involved with the project, rather than sitting on the sidelines and feeling discarded.

Link to comment
Share on other sites

1 hour ago, AlamoVampire said:

kinda like, how one is allocated money in paycheck would be the between ksp/host os and what you BUY with said paycheck would be the with in mono?

I guess you could say that, Let's say the OS is giving mono the paycheck, and mono is spending it on running KSP.

When I say "KSP" I mean squads code in KSP_Data, not the KSP.exe / KSP.x86_64 executable - that's actually the Unity player in disguise. Confusing I know. I hate this Unity/mono BS and I'd prefer to work directly on the host OS, but that makes multiplatform support much harder, and game devs like easy these days... Hence the popularity of Unity.

I'm not particularly articulate explaining such things in layman's terms, and my own knowledge is somewhat limited, but here goes my take lengthy ramble on this bug:

Mono abstracts memory management for the code it runs, it asks the OS for a bunch of memory, then parcels it out to managed code.
If managed code running in the mono runtime, lets say KSP or a KSP mod, wants more memory than mono has already obtained from the OS then mono will ask for more.
When the managed code stops using that memory, monos garbage collector comes along, notices it's not being used any more, and frees it so that mono can give it back.

Side note: The garbage collector "stutter" that some people (me for one) are getting liquidy about is happening because the garbage collector temporarily pauses execution of managed code (KSP) while it does this scan for unused memory. Result: sudden lag spike every few seconds. The more unused memory there is to free the worse this gets.

The error that accompanies the crashes I'm seeing is: "*** Error in `./KSP.x86_64': double free or corruption" This is followed by a stack trace, and KSP dies with "aborted" printed to the console.

Those errors are coming the from the OS memory management functions (Glibc), free() is the call that mono/Unity will be making to the OS to "give back" memory it doesn't need any more.

Doing this free() twice for the same bit of memory is a very, very bad idea as free()ing will wipe whatever that memory contained. If mono has already told the OS that it can have it back, then goes and nukes it again, strange and unpredictable things are bound to happen.

In normal operation mono will ask for memory, put something in it, free it, ask for more (probably getting the same memory location it just freed because that's convenient for the OS), put something in it, and so on in rapid-fire fashion to meet the needs of the code it's running.
If it frees some memory that has already been freed and reused elsewhere the contents of that bit of memory are now going to be either nothing or garbage, depending on the order of operations. There's no way to tell, and chaos (and random crashes) ensue.

Glibc has a "memory police" function, and it will kill ("abort") anything it catches doing this. This is a good plan as crashing immediately is generally better than letting it get away with corrupting it's own memory - otherwise it's going to crash sooner or later anyway, and in a way that's really hard to debug.

Figuring out exactly where mono/Unity is doing this double free(), without source code and/or help from the unity devs is not going to be easy, if it's possible at all. Compounding this is the fact that Unity is multithreaded - multiple instances(threads) of mono will be running at the same time, and if they step on each others memory things will go boom sooner or later.

 

Note for any coders that read this and are horrified: I realise this is not entirely accurate, I'm trying (and failing) to simplify.

Edited by steve_v
Link to comment
Share on other sites

56 minutes ago, Otis said:

But, when I'm fed a line of crap like I was with the recent exclusive Steam release, it is an insult to what little intelligence that I have. I have very little sympathy for the political maneuvering involved with the push to release on consoles or the new "walmart" of the internet, Steam.

This yanked my chain too TBH. Particularly because the excuse was "we have no way of distributing daily patches" - this is total BS. Squad had a patcher, but they dumped it about a year ago and though it's now back, it still isn't working properly. IIRC the dude that wrote it left (or was fired) but don't quote me on that. My point is that this situation was entirely avoidable.

Quote

Greed comes into play.

As it tends to do with any commercial software project. Can't say I like it either, but what can you do?

Quote

My frustration with this process comes not from the problems with Unity and KSP and crashes, but rather the lack of open and honest dialogue, like we see here in this thread, from Squad on the issue.

Likewise, I also suspect it's some internal marketing drive (greed, probably) setting deadlines that are driving the devs to the ragged edge and pushing for releases that clearly aren't ready.
If Squad had come out and said "sorry guys, we've got unity bugs here that we can't fix in time, this is going to be late" I'd be quite satisfied.
Bugs happen, but buggy releases should not. Head-in-sand "release anyway" mania just annoys everybody.

 

This is getting a tad off-topic, but I just couldn't resist a quick stab at our lords and masters over this SNAFU. :P

Edited by steve_v
Link to comment
Share on other sites

On 04/05/2016 at 8:10 PM, wibou7 said:

Maybe, maybe not.

KSP was perfectly stable for me pre-1.1. On 1.1.2, it crashes about once every hour or so.
 

same for me, i cant even remember if there was a single crash for me all the time before 1.1, but now its horrible, i mean the first crash a day in a not so important situation is acceptable, keep cool.. restart.. but if the second crash doesnt take more then an hour later and happens as you right now finish your new rocket design or whatsoever.. well then leave it, i leave it for that day totally.. its so frustrating that it doesnt help to start any other game, the day is over, so over that i dont start the game for the next three days no more, to risky to destroy my whole mood

i start to consider to go back with my 1.0.5 from today on, there is no noteable performance difference for me anyways, i will miss the new rightclick on any marker in mapview, but its not worth the frustrating crash element

Edited by diggzakk
mistype
Link to comment
Share on other sites

10 hours ago, AlamoVampire said:

Anyone else have any thoughts or data points to add?

My only data point could be that I haven't had any crashes in any 1.1.x (except due to my own stupidity when moving files in use ...)

But I could add that I'm professionally paranoid (as in infosec consultant) and my win10 is very clean from any form of crud (including stuff from MS).

Link to comment
Share on other sites

On 5/5/2016 at 0:54 AM, BoilingCold said:

My post 1.1 crashes were frequent enough that I considered KSP unplayable for me until fixed.

I uninstalled KSP completely, deleting all mods, reinstalled from Steam, reinstalled mods - only mods labelled as 1.1.2 compatible by CKAN and started a new game. Crashes have gone completely for me.

I installed EVE yesterday, despite it not being listed as 1.1.2 compatible yet and promptly started getting crashes again. Uninstalled EVE and it's fine again.

I know this won't help anyone who's getting crashes in unmodded, fresh installs, but if you're running an old modded install try a completely fresh start, it might help.

Yep, I did this, and it seems to have slowed the crashes down at least. I haven't had any so far since doing this, but can never say 100% that I won't. I've had to treat ANY mod not explicitly marked for 1.1.2 as outdated, and use CKAN for everything, but the game is playable again. As an aside, EVE is marked as incompatible with 1.1.2, so no surprise about crashes there.

Link to comment
Share on other sites

Well, as I sit writing this, I have slashed and burned KSP from the annals of my computers memory. The only things that remain from the ORIGINAL install from .21 <yes, until today, ive had the same install for ksp since I got it> through now are 2 save games with their ships and what not in a secured location. Steam is currently in the down load process and install process. I am going to try the game absolutely clean before adding mods and the save files back into the mix to see what happens. I will of course keep everyone who is keeping an eye on this thread updated.

Link to comment
Share on other sites

Well, I tried the nuclear option, and installed ONLY 1.1.2 mods through CKAN. I then started up KSP and went into the SPH. I started designing a simple plane with modded parts... about 20 minutes in....BAM.. "KSP_x64.exe has stopped working" Back to looking at my wallpaper...

The best explanation I can come up with is the same that others have theorized: there is something fundamentally wrong with Unity 5, in the way that it handles calls for memory. When I got to thinking about it, it makes sense, and reminds me of a personal experience. Back in 2009 I built a gaming PC, with an air cooled i7 965. I didn't know it at the time, but it had a cooling problem. You wouldn't know it to look at the case, or even to use it for everyday use/gaming. It idled at 30 degrees, and only got up to around 55 on intense games. However, if you stress tested it, with Prime95, or any similar program, it would heat up like a nuclear inferno, to 100C and then shut down... though it was basically stable, stressing it made it cry uncle and quit.

Applying that story to KSP and Unity 5, Squad tested their build running stock.. Stock KSP is not that taxing on the Unity engine, and will run more or less without problems. Once mods are added in, it makes it become more stressful on the engine... the more mods added, the more the stress level.. mods are acting as Prime95 did on my old PC; making Unity cry uncle and quit. That is why when I have 5 small mods added, I won't notice much change, but when 20 mods are added, including big memory hog parts mods, the game may run 5 minutes before quitting.

 

SO.. in summary, we basically have the same system as we did with Unity 4 and 32 bit KSP... mods have to be limited to avoid crashing.. how ironic.

 

 

I note that some folks are having crash problems with stock, and others are running 20+ mods without issue. I'm willing to bet that the stability is based on PC performance, beefy top end gaming PCs can run a metric ton of mods with few issues, mid range PCs are crashing with mods, and potatoes are crashing with stock.

Disproven: The crashes are not related to overall PC performance, and seem to be at near complete random. The only coorelation I find is that the number of mods added, make the likelihood of a CTD more likely with each action performed.

Edited by Bloodbunny
Link to comment
Share on other sites

When I had my mods installed on my original install of KSP, I had <prior to scorching earth> only MechJeb, Novapunch, Proc Fairings and KIS/KAS and save for Novapunch which has yet to see an update since KSP 1.0.2 all mods were installed. 

Link to comment
Share on other sites

7 minutes ago, AlamoVampire said:

When I had my mods installed on my original install of KSP, I had <prior to scorching earth> only MechJeb, Novapunch, Proc Fairings and KIS/KAS and save for Novapunch which has yet to see an update since KSP 1.0.2 all mods were installed. 

Novapunch is quite a large parts mod, AND not updated for 1.1.2. It's quite possible that it was the primary culprit.

Link to comment
Share on other sites

@Bloodbunny and you could very well be right on that, BUT, it does NOT seem to be a common link to other folks crashing out with this CTD randomness. But, for now, until my newest issue gets resolved, I am not bothering with restoring save files or mods, because being stuck at 1680 X 1050 when I was able prior to slashing and burning KSP at 1920 X 1080 has made the game visually displeasing for me after getting used to the max resolution ;.; 

Link to comment
Share on other sites

2 hours ago, Bloodbunny said:

Novapunch is quite a large parts mod, AND not updated for 1.1.2. It's quite possible that it was the primary culprit.

a: I don't have NovaPunch installed.

b: This also occurs in the stock game.

c: If part mods (or any mods for that matter) can cause native memory-managemant faults, there's something horribly wrong with the CLI runtime. Isolating managed code from this kind of thing is the whole point in having such a runtime.

It's not mods causing this. Mods might be exacerbating it, but if that's the case then they are simply revealing a flaw in the underlying system.

Link to comment
Share on other sites

@steve_v which is why i was openly dubious about it being mods alone. while they may be over taxing a broken system, they (squad OR unity) need to address the issue with haste, or this may be the start of the end for the game. especially if its mods exacerbating this, it means we cannot mod our games as we wish, which ends the fun for a lot of people including myself. but, i do not want to start doomsdaying this yet. hope yet remains!

Link to comment
Share on other sites

That thing got me thinking. I normally don't use windows - my laptop is a mac and my desktop runs linux, but I borrowed my brother's laptop and installed KSP there. Got a CTD after +- 30 minutes of playing. And another 45 minutes after that - with OneDrive installed. Removed it, got another CTD after an hour or so. 

Played KSP 1.1.2 for about 30 hours on my mac. One CTD. And for ten hours on my linux. No CTD. 

Which means... (no offense, I'm just joking)

Windows is the reason of those crashes. 

Now seriously: That dll was the reason of all three windows CTDs I had. Something fishy going on in there.

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...