Jump to content
  • 0

NaN Bug [0.24.2, Modded]


Video, log, and persistent files of a NaN Bug instance.





Please let me know if anything else is needed.

Installed Mods

Gameplay Additions & Modifications

KW Rocketry (great rocket and engine set)

-- http://www.curse.com/ksp-mods/kerbal/220894-kw-rocketry

ModRocketSys (additional parts and engines which are stock-alike)

-- http://forum.kerbalspaceprogram.com/threads/93067-0-24-2-WIP-Modular-Rocket-Systems-v0-5-%282014-09-19%29-Stock-alike-Parts-Pack

Deadly Reentry (burns up crafts and kerbals)

-- http://forum.kerbalspaceprogram.com/threads/54954-0-22-Deadly-Reentry-Continued-v3

Remote Tech 2 (comm requirements for probes)

-- http://forum.kerbalspaceprogram.com/threads/83305-Development-Resumed-RemoteTech-2

Distant Object (visualizations in flight mode of spacecraft, debris, stations, and planets from a long distance away)

-- http://forum.kerbalspaceprogram.com/threads/69907-0-24-Distant-Object-Enhancement-1-3-1-Planets-satellites-in-the-night-sky!-%287-29%29

IFILS (simplified life support)

-- http://www.curse.com/ksp-mods/kerbal/221057-interstellar-flight-inc-kerbal-life-support-mod#t1:screenshots

Vessel Viewer (enables MFD functions related to craft and parts while in IVA)

-- http://forum.kerbalspaceprogram.com/threads/80581-0-23-5-Vessel-Viewer?p=1168414#post1168414

Chatterer (background and crew sounds)

-- http://www.curse.com/ksp-mods/kerbal/223841-chatterer

Hot Rockets 7.24 (different engine sounds and exhaust/smoke appearance)

-- http://www.curse.com/ksp-mods/kerbal/220207-hotrockets-particle-fx-replacement

Hullcam VDS (provides working cameras to use with RPM, among other uses)

-- http://www.curse.com/ksp-mods/kerbal/220258-hullcam-vds

Engine Ignitor + Engine Ignitor MFD for RPM (limited engine ignition conditions)

-- http://forum.kerbalspaceprogram.com/threads/51880

-- https://kerbalstuff.com/mod/60/Engine_Ignitor_MFD

Procedural Fairings (aerodynamic fairings)

-- https://github.com/e-dog/ProceduralFairings/releases

Procedural Parts

-- https://duckduckgo.com/?q=kerbal+space+program+procedural+parts

Kerbal Attachment System

-- http://forum.kerbalspaceprogram.com/threads/92514

FASA Launch Clamps

-- http://forum.kerbalspaceprogram.com/threads/71032-FASA-Launch-Towers


Utilities and GUI Enhancements


-- http://forum.kerbalspaceprogram.com/threads/60863-0-23-0-Toolbar-1-4-2-Common-API-for-draggable-resizable-buttons-toolbar

Alternate Resource Panel (more organized HUD display of resources)

-- http://www.curse.com/ksp-mods/kerbal/220649-alternate-resource-panel

Nano Gauges (set of up to 52 small gauges)

-- http://www.curse.com/ksp-mods/kerbal/221875-nanogauges

Raster Prop Monitor (internal MFDs with hooks for other add-ons)

-- https://github.com/Mihara/RasterPropMonitor/releases

Final Frontier (Kerbalized award and decoration system)

-- http://forum.kerbalspaceprogram.com/threads/67246-0-23-5-Final-Frontier-kerbal-individual-merits-0-3-15

Kerbal Engineer 1.0 (design and detailed flight info)

-- http://www.curse.com/ksp-mods/kerbal/222685-kerbal-engineer-redux-v1-0

Kerbal Alarm Clock

-- http://www.curse.com/ksp-mods/kerbal/220289-kerbal-alarm-clock

Kronal Vessel Viewer (blueprint/schematics of your vehicles)

-- http://www.curse.com/ksp-mods/kerbal/224287-kronal-vessel-viewer-kvv-exploded-ship-view


Visual Tweaks

Texture Replacer (for GSI Purple Haze Skybox HiRes skybox)

-- https://github.com/ducakar/TextureReplacer/releases/

-- http://forum.kerbalspaceprogram.com/threads/77420-Green-skull-inc-texture-packs

Distant Object (allows in flight visualization of distant craft and planets, see above for link)


Other Necessities

Module Manager (patches stock KSP for numerous add-ons, essential if you have any mods at all)

-- http://forum.kerbalspaceprogram.com/threads/55219

Link to post
Share on other sites

11 answers to this question

Recommended Posts

  • 0

I want to hit this hard.

I've been playing KSP for a year now - off and on. I am the sort of person who likes to have persistent space programs because I wanted to be an astronaut when I was young. KSP offers me an opportunity to do both of these things.

Except the NaN bug destroys my programs. This has happened in stock as much as in modded installs. And the NaN bug has been around so long as I've been playing KSP. It hit me when I was playing on a completely different computer - so I bought a new one. It hit me playing stock. It hit me with a modded install. It hit me with KSPx32, so I switched to x64. Hit there too, plus other types of crashes, so I went back to x32. It hit me on unmanned probes, so I stopped launching those. Now it hits on manned missions too.

And in all of this time and effort, I haven't heard a peep from anyone about what causes this - and I'm not the only person to experience it.

Every game has bugs and crashes, even finished and patched, and re-patched, products.

But this NaN bug is something else again. It's been around for a long time. It can be a save killer. And I expect something - some effort somewhere - to fix it. Because KSP is possibly one of the greatest games to come down the pike in my opinion, and it's terribly frustrating to see something as persistent and as game killing as this.

Link to post
Share on other sites
  • 0

It's like cancer, though--there presumably isn't "one" NaN bug; it's that if *any* one of hundreds of variables that interact gets set to NaN, it spreads to the others. That's how NaN works: if you do any operation, however long and complex, that involves a single NaN term, the result becomes NaN.

Link to post
Share on other sites
  • 0

Is there any way to reduce the probability of occurrence?

What does "NaN" mean?

Once this error crops up, what is the best procedure to follow if you want to preserve the save? In the video, I was still able to revert, so that's what I did. But what if I can't revert?

Edited by KerTrotsky
Link to post
Share on other sites
  • 0

"Not a Number"

It happens when you do something like dividing by zero.

I'm not sure exactly what would be causing it--as I mentioned as long as some math operation *somewhere* returns NaN, it will spread to anything involving that value.


for some reason x = 0

y = 15/x (now y is NaN)

z = y * 5 (now z is NaN)

on the next frame, x = z + 5, now x is NaN

As for preserving the save: if you can't revert, force-quit (alt-F4 if on Windows). That should not save to disk.

Link to post
Share on other sites
  • 0

I understand. Thanks.

So, the reason this bug can't be eliminated is because after each and every math operation, there would have to be a NaN or zero check, or pre-check, and a routine to insert a nominal value into the register; and this can't be fixed because doing that would double or triple the processing time? Just WAGging. Is this somehow related to FPEs?

Link to post
Share on other sites
  • 0

It can be eliminated if it's in a mod, but if it's in stock code it's up to Squad to fix it. What I suggest you do is open your existing sfs file in a text editor and search for NaN. If it exists anywhere let me know; if not, then we know it's being triggered by something you're doing right now, rather than it being a timebomb. Then we can narrow down the source.

Link to post
Share on other sites
  • 0
It can be eliminated if it's in a mod, but if it's in stock code it's up to Squad to fix it. What I suggest you do is open your existing sfs file in a text editor and search for NaN. If it exists anywhere let me know; if not, then we know it's being triggered by something you're doing right now, rather than it being a timebomb. Then we can narrow down the source.



pid = 35c866323d714caa9a1c706c7aec7b04

name = KSP Flag

type = Flag

sit = LANDED

landed = True

landedAt = KSC

splashed = False

met = 94393.0465034846

lct = 557.459999999783

root = 0

lat = -0.0579469598919404

lon = -74.4870238686807

alt = 61.2709111714503

hgt = 0.3471261

nrm = 0.008319563,0.9998364,-0.01607057

rot = -0.3178926,0.5166621,-0.6349075,0.4784321

CoM = 0,0,0

stg = 0

prst = False

ref = 0

ctrl = False

cPch = 0

cHdg = 0

cMod = 0



SMA = 300030.635460804

ECC = 1


LPE = 34.4862678434288

LAN = 95.5117081612621

MNA = 3.14159265358979

EPH = 380729.199541805

REF = 1




name = flag

uid = 3570691197

mid = 943583816

launchID = 1

parent = 0

position = 0,0,0

rotation = 0,0,0,1

mirror = 1,1,1

istg = 0

dstg = 0

sqor = -1

sidx = -1

attm = 0

srfN = None, -1

mass = 0.01

temp = 4.538542E-32

expt = 0.5

state = 0

connected = True

attached = True

flag = Squad/Flags/SovSpacProg2

rTrf = flag (KSP Flag)

modCost = 0

Yup there it is. Persistent SFS is in the drop at the top. The "vessel" is a flag I planted near the runway - one of the first things I did. Flags . . . hmmm. Inclination not a number. Interesting.

Edited by KerTrotsky
Link to post
Share on other sites
  • 0

Not sure if this to any help, or is even related, but i see "NaN°" sometimes when i try to match inclinations with other celestial bodies/crafts. i get it whenver im spot on or close to spot on, so somewhere in the middle of 0.0° inclination. Never crashed or ruined my game though.

Link to post
Share on other sites
  • 0

I have a savegame, that constantly crashes. After reading this thread, I opened it in a editor. And lo and behold there were multiple NaNs in there. I replaced them with 0. It still crashed, but I got some NaN in another place.

This game has some serious issues.

Link to post
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.

Answer this question...

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