Jump to content

Massime performance drop in 1.0.5


Recommended Posts

From the first update to 1.0.5 I had a very terrible performance drop in flight. I waited for many mods to be updated, removed some mods, checked my output log for mods creating issues, but nothing helped me to come back to my more or less 30 fps in flight. In my output log: https://www.dropbox.com/s/kcstdu0jhh7ry92/output_log.txt?dl=0 I find a lot of

NullReferenceException: Object reference not set to an instance of an object

at Vessel.<GetUnloadedVesselMass>m__477 (.ProtoPartResourceSnapshot x) [0x00000] in <filename unknown>:0

at System.Linq.Enumerable+<Sum>c__AnonStorey3A`1[ProtoPartResourceSnapshot].<>m__74 (Single a, .ProtoPartResourceSnapshot B) [0x00000] in <filename unknown>:0

at System.Linq.Enumerable.Sum[ProtoPartResourceSnapshot,Single] (IEnumerable`1 source, System.Func`3 selector) [0x00000] in <filename unknown>:0

at System.Linq.Enumerable.Sum[ProtoPartResourceSnapshot] (IEnumerable`1 source, System.Func`2 selector) [0x00000] in <filename unknown>:0

at Vessel.GetUnloadedVesselMass () [0x00000] in <filename unknown>:0

at Vessel.GetTotalMass () [0x00000] in <filename unknown>:0

at Vessel.CalculatePhysicsStats () [0x00000] in <filename unknown>:0

at Vessel.FixedUpdate () [0x00000] in <filename unknown>:0

I'm unable to find what cause this. Can someone please help me?

Link to comment
Share on other sites

I am also experiencing a MAJOR performance drop, where on launch I drop to less than 3 FPS, and pretty much cannot even play anymore. :(

Do you notice if your rockets are off-center on the launch pad too? Mine are, one was so off center that the pad exploded when I launched.

There's got to be a mod out there that just isn't compatible yet slowing all this down. I might try a fresh Stock install to try to fix it.

Link to comment
Share on other sites

I'm getting this exact exception, but an entirely stock system. No Kopernicus. Google suggests perhaps KCT as the culprit, but this is just a supposition. Would you believe you have the exact same error and no one else?

Any ideas would be rad, thanks!
Link to comment
Share on other sites

Well, I uninstalled all mods from my game and I am still getting spammed with this in my logs when I switch to a ship in orbit in my career

266631 [EXC 22:47:57.844] NullReferenceException: Object reference not set to an instance of an object
266632 Vessel.<GetUnloadedVesselMass>m__477 (.ProtoPartResourceSnapshot x)
266633 System.Linq.Enumerable+<Sum>c__AnonStorey3A`1[ProtoPartResourceSnapshot].<>m__74 (Single a, .ProtoPartResourceSnapshot b)
266634 System.Linq.Enumerable.Sum[ProtoPartResourceSnapshot,Single] (IEnumerable`1 source, System.Func`3 selector)
266635 System.Linq.Enumerable.Sum[ProtoPartResourceSnapshot] (IEnumerable`1 source, System.Func`2 selector)
266636 Vessel.GetUnloadedVesselMass ()
266637 Vessel.GetTotalMass ()
266638 Vessel.CalculatePhysicsStats ()
266639 Vessel.FixedUpdate ()

[COLOR="silver"][SIZE=1]- - - Updated - - -[/SIZE][/COLOR]

Messing around with it some more.. My career mode game has a ton of space junk floating around because I tend to be messy and don't deorbit things... I tested setting the max persistent debris down to 25 and loaded up the same piece of floating debris I was previously getting spammed in the log file with.. The game performed noticeably better.. I was still getting hit in the log file with that null ref exception but not nearly as often. I think the null ref gets spammed exponentially more often with more craft in orbit and causes serious slowdown for games with large numbers of ships/debris/etc... I can't say for 100% certain if its specific to my career mode but its looking like its a bug with the core game, not mod-related at this point...
Link to comment
Share on other sites

... And I was able to resolve the issue by disabling logging. Turns out the exception itself isn't slowing the simulation down, it's the act of logging it to the file hundreds of times a second.. See if your performance improves by running your KSP.exe with the -nolog option.
Link to comment
Share on other sites

I hadn't noticed it performance wise (Don't shoot me) but just as a matter of course, habit from running on OS X to have a tail -f log running on second screen, to see when its going to crash. I haven't seen this one before though, and its on linux x64 besides. It has to be an addon, but i've not had a chance to run down which one. I'm not at home at the moment, but i'll try to upload a list next time i'm able. (Plus the log, for that matter). Perhaps we can determine between us what common mod might be amiss.
Link to comment
Share on other sites

[quote name='komodo']I hadn't noticed it performance wise (Don't shoot me) but just as a matter of course, habit from running on OS X to have a tail -f log running on second screen, to see when its going to crash. I haven't seen this one before though, and its on linux x64 besides. It has to be an addon, but i've not had a chance to run down which one. I'm not at home at the moment, but i'll try to upload a list next time i'm able. (Plus the log, for that matter). Perhaps we can determine between us what common mod might be amiss.[/QUOTE]

It was doing this with no mods installed at all. I reported the bug to squad. Workaround is to run ksp.exe with the -nolog option
Link to comment
Share on other sites

[quote name='Macel']It was doing this with no mods installed at all. I reported the bug to squad. Workaround is to run ksp.exe with the -nolog option[/QUOTE]

I tried that. Effectively it reduce the lag, but doesn't solve the issue completely. On the same ship, parked at the KSC, I had 20/25 FPS on 1.0.4 (it's a complex spaceplane), 6 FPS in 1.0.5, 10/13 FPS with -no log.
Link to comment
Share on other sites

  • 4 months later...

@Nansuchao, @maceemiller, @komodo, @Macel, @nuothe11th: Issue solved for me!

I have found the answer here:

It worked for me, it's due to an old MKS update that left some deprecated code in the save file: an obsolete resource.

 

  1. Backup your persistent.sfs file
  2. Open it (I use notepad++, it's very fast, especially if your save file is heavy)
  3. Look for this (like, search for every "name = PunchCards" occurences) :
    RESOURCE
    {
    	name = PunchCards
    	amount = 0.0001
    	maxAmount = 200
    	flowState = True
    	isTweakable = True
    	hideFlow = False
    	flowMode = Both
    }
  4. Delete this whole RESOURCE block everywhere you find it.
  5. Save, launch KSP and check if the logspam is gone. Browse through your ships and make sure everything is in order.

  6. If not, sorry :( can't help you more.

 

I've deleted mods that I don't use anymore before doing this but, it didn't help:

  • Hangar (not Hangar Extender, just Hangar)
  • Regolith
  • Extraplanetary Launchpads

It stopped spamming after I deleted the RESOURCE block.

 

 

So, I gained a little FPS and now I've got cleaner logs. I just hope 1.1 will be faster :blush:

Edited by SnakyLeVrai
inintelligible mess
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...