• 2
Moach

Some Relief for Memory Outage Crashes

Question

If you're like myself, you probably can't live without your irresponsibly large array of mods and parts and whatnotyoumaygets galore...

alas, KSP is still "unstable" as 64bit, and since it MUST load all assets (for whatever reason) into memory as soon as it starts, it's only to be expected that at the very first ram spike (usually scene transitions) the game will have outgrown the maximum memory address that can be written in 32 bits... (it's a matter of how high can you count using only this many digits, but in binary)

long story short -- mod-hoarders everywhere frustrate...

there's a perhaps not-well-enough-known thing that anyone can do (besides running with half-res textures) to make oneself a bit more space between one's addon binge and ultimate mem-crash

step 1:

make a KSP shortcut, if you don't have one already (I'll assume you know how to to this stuff, given you're already modding your game)

step 2: ...

step 3: profit!

no wait, that's for stealing underwear....

step 2:

right click that shortcut, and choose properties -- a window pops us (yes, you can change the icon and stuff here too - but first, focus)

step 3:

on the textbox marked "Target" -- insert the following at the end of the line, like so: "(...)KSP.exe" -force-opengl

finally:

run KSP from this shortcut, see if it helped :wink:

this will set the game to use openGL for the graphics backend -- it just so happens this also has the fortuitous effect of saving you about 1~2 GB's of precious RAM

of course, your mileage may vary...

but for me, it made the game playable where before it wasn't -- without removing any of the many mods (all indispensable, of course) I had piled on up until the point of making it unworkable

just thought I'd sticky this, as it solved a LOT of my problems just recently -- hopefully, it'll help some of you too :)

Edited by Moach
5 people like this

Share this post


Link to post
Share on other sites

33 answers to this question

  • 2

You can also use -force-d3d11 which of course can only be used in Windows. Some users have reported issues with it, but the only thing I've seen is the text looks a little awkward. However, forcing DirectX 11 saves a much larger amount of RAM than forcing OpenGL.

2 people like this

Share this post


Link to post
Share on other sites
  • 0

Force OpenGL definitely worked for me in 0.90 but at the cost of about 30-40 percent of framerate. That itself is not exactly a bad thing as the tradeoff is significantly longer playtime with mods; I would build and test long range aircraft on OpenGL then switch to default renderer for higher FPS for video capture.

In 1.0.4 I have not tried OpenGL as I run with multiple copies of near-stock installs for production purposes and just one modded install for Career. And oh my, running lite mods keeps the framerates really good!

Share this post


Link to post
Share on other sites
  • 0

Several issues I ran into, with forced opengl, are the 1/3 decrease in fps performance with opengl and the inablility to force AA on my older AMD card in ccc.

D3D11 gives me one very specific issue: when a ship is crewed I experience severel fps (dips) stutters.

Removing the crew and relaunching, butter smooth fps no stutters.

Heck I'm unable to track down why this happens.

Share this post


Link to post
Share on other sites
  • 0

I noticed that -force-opengl bugs settings menu, it says loading and stop and i can alt tab to remove loading overlay but still everything is black but i can navigate to cancel button blindly and goes back normally to menu screen, also i expirienced fps drop in open gl after 2-3 run of game, first few times it was even better but then big drop in fps but it can just be my perception

Share this post


Link to post
Share on other sites
  • 0

Considering this takes a crash-every-ten-minutes mod load and turns it into a hasn't-crashed-yet... all the rep to you. I'll take the FPS drop over constant crashing.

Share this post


Link to post
Share on other sites
  • 0

How would you do this in XP?

Share this post


Link to post
Share on other sites
  • 0

Im experiencing this issue without having a large array of mods, only 4, and i experience crashes when transitioning from buildings to back outside and whatnot

Is this an issue with stock?

8gb ram

I only have

KIS/KAS

Kerbal engineer

Kerbal Alarm clock

Claws stock bug fixes

Share this post


Link to post
Share on other sites
  • 0
On ‎10‎/‎19‎/‎2015 at 11:58 AM, ThaZeus said:

How would you do this in XP?

 I didn't know KSP even runs in XP?

Share this post


Link to post
Share on other sites
  • 0

I used the -force-opengl option and tried the DirectX one. I still only got the one flight before I had the game fall over due to lack of memory.

My solution was to check to graphics settings for the game.

I turned OFF the option to show any water effects (especially underwater ones) and lowered the resolution to medium and suddenly I had a Gig of free RAM when first starting the game instead of only a couple of hundred Megs. Went from about 3650000k down to about 2630000k according to the process tab in Windows Task Manager

That's with 3854 patches loaded over 103 different mods.

Regards Brad

Share this post


Link to post
Share on other sites
  • 0

Thanks "Moach" and "Alshain" for the command-line info. I've been pulling my hair out for weeks with crashes, even bought tons more RAM (needed it anyway)
Both the opengl and directx switches worked for me so far...NO crashes :)

You guys are rockstars!

HP 8740w/Intel Core  quad 1.73GHz (2.93GHz max)/NVIDEA Quadro FX3800/12Gb RAM/W7pro

Edited by ve7oko
included OS in specs

Share this post


Link to post
Share on other sites
  • 0
On 12/28/2015 at 6:20 PM, Icemanau said:

I turned OFF the option to show any water effects (especially underwater ones) and lowered the resolution to medium and suddenly I had a Gig of free RAM when first starting the game instead of only a couple of hundred Megs. Went from about 3650000k down to about 2630000k according to the process tab in Windows Task Manager

I turned off the underwater effects, and suddenly my FPS was amazing!*I've hardly ever seen KSP running this fast, even on stock without my now indispensable EVE and Scatterer. I still get pretty frequent crashes, so I'm not sure what to do about that, but otherwise KSP runs much more smoothly.

*I actually screwed up my early career save because I had a terrible ascent profile and failed the "Orbit Kerbin" contract because I was too busy watching the rocket go at such amazing FPS. 

Edited by cubinator

Share this post


Link to post
Share on other sites
  • 0

Can I try to force DirectX 12? Or does DX12 not support KSP yet?

1 person likes this

Share this post


Link to post
Share on other sites
  • 0
9 hours ago, njmksr said:

Can I try to force DirectX 12? Or does DX12 not support KSP yet?

@njmksr It works. I don't really see a differance between 11 and 12. 12 did 'feel' a bit smoother, but that is so subjective as to be worthless. My framerate MAY of been slightly improved. I don['t have time to do a comparison at this time, but it did work. I only did two sub-orbital flights however, and we all know, "There be dragons here..." I'm sure I poked the Kraken, but quit before he had a chance to hunt me down.

Unfortunately, no memory improvements over 11, but I think I'll try running it this way for a while. Thanks for the idea.

Edited by pslytely psycho
1 person likes this

Share this post


Link to post
Share on other sites
  • 0

I haven't crashed, but I have experienced issues like the game not wanting to save, not allowing me to "return to space station", and not wanting to recover vessel when I clock recover vessel, and a huge slowdown performance wise.

 

I have the mods installed that give realistic planet shine and kerbal faces.

Edited by joekidd1992

Share this post


Link to post
Share on other sites
  • 0

Just found another reason of memory leaking. It happened to me with maxed out terrain detail. When you fly over some forest, trees that comes to vision range eat up small chunk of RAM, but that RAM is never released when tree is out of vision range, quickly filling up RAM until crash to desktop.

Setting terain detail to low have cured memory leak in such occasions.

Share this post


Link to post
Share on other sites
  • 0

I have been using this trick for a while (-force-d3d11) and while it stops some crashes, it has not saved any memory for me whatsoever. Am I doing it wrong? Thanks!

Share this post


Link to post
Share on other sites
  • 0
5 hours ago, njmksr said:

I have been using this trick for a while (-force-d3d11) and while it stops some crashes, it has not saved any memory for me whatsoever. Am I doing it wrong? Thanks!

Perhaps your graphic card does not have much memory or you don't use so much texture related mods ?
Just in the post above I have enlisted mods that I use, ~50 in total, not all of them are part related, but in my case forcing DX11 save somewhere between 1 to 1.5 GB. Forgot to take a note for exact amount.

You might not see difference in usage unless you use special tools like graphic memory monitor, for example. It is quite usefull tool that will inform you when memory usage reach critical level, so you are able to save game just before CTD.

Share this post


Link to post
Share on other sites
  • 0

Hello,

OpenGL is not worth the time or trouble; dont use it; move on...this is my opinion and suggestion based on prior experience using lowend graphics; I guess it is still supported; but again I wouldnt use it; I had all kinds of graphics glitches with it.

Commander Zeta

 

Share this post


Link to post
Share on other sites
  • 0
22 minutes ago, Cdr_Zeta said:

Hello,

OpenGL is not worth the time or trouble; dont use it; move on...this is my opinion and suggestion based on prior experience using lowend graphics; I guess it is still supported; but again I wouldnt use it; I had all kinds of graphics glitches with it.

Commander Zeta

 

That highly depends on hardware and GPU driver that someone use. For someone it works just fine, for others it is just more trouble. But if someone have memory related issues, it is certainly worth to try, either, DX11 or OpenGL, depends which one works better.

Share this post


Link to post
Share on other sites
  • 0

Hello,

Now it is funny you mention that; I recall AMD processeors ans systems are not as memory-happy as Intel systems; for all I know Intel uses OGL better; I know it is a graphics app but there is still other code linkage that may handle things quicker in this aspect.

Also I read Intel/Radeon cards...NOT Intel/NVidia ! (I think !)

Commander Zeta

Edited by Cdr_Zeta
typo

Share this post


Link to post
Share on other sites
  • 0

OpenGL unfortunately resulted in KSP being unable to open. I have yet to try DirectX.

Share this post


Link to post
Share on other sites
  • 0
On 27.01.2016. at 11:31 PM, SlabGizor117 said:

I tried this and it said the name isn't valid.  Wat do?

If you arfe on windows you need to ensure that KSP.EXE is inside quotes and DX switch is after last quote.
Here is example:

Quote

"C:\Kerbal Space Program\KSP.exe" -force-d3d11

That way spaces inside folder name will not cause trouble, but you need to notice that is also space between last quote and -force-d3d11 switch.

Edited by kcs123
typo noticed

Share this post


Link to post
Share on other sites
  • 0

Forced OGL is the only way I can play nowadays...but I did run into another stranger thing after finally updating to 1.0.5 from 1.0.4.

For some reason my 1.0.5 has worse memory leakage with 1.0.5 versions of EVE and Kopenicus. Related to them yes I know, so using the 1.0.4 version of EVe which give no issues. Without those two, no ram leakage, albeit having higher starting ram usage due to those new parts.

Share this post


Link to post
Share on other sites
  • 0

Can anyone tell me how to do this on a Mac?  These instructions are easy to follow for the PC, but I don't know how to do it on my Mac.  Any help would be appreciated.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now