Jump to content

Some Relief for Memory Outage Crashes


Recommended Posts

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
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • 4 weeks later...
  • 2 weeks later...
  • 3 weeks later...

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

Link to comment
Share on other sites

  • 1 month later...
  • 2 weeks later...

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

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

  • 2 weeks later...

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
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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.

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