Project

General

Profile

Bug #1196

rare map jittering and it's possible cause

Added by BloodyRain2k over 10 years ago. Updated over 7 years ago.

Status:
Closed
Severity:
Normal
Assignee:
-
Category:
Gameplay
Target version:
-
Start date:
08/08/2013
% Done:

100%

Version:
Platform:
Any
Expansion:
Language:
English (US)
Mod Related:
No
Votes:
Arrow u r green
Arrow d r red

Description

Some people have it rarely happen that the map starts to jitter around when something else than a body is selected and the camera is rotated around it.
See http://forum.kerbalspaceprogram.com/showthread.php/42601-Star-map-stuttering-on-rotation for a reference.
For unknown reasons more people seem to have this problem when using MechJeb but that's not the cause as far as I could tell but just a chance multiplier as there are people who had it without MJ and Ted even had it once in the testing phase.

The error in the log which get's spammed then is the following:
NullReferenceException
at (wrapper managed-to-native) UnityEngine.Transform:INTERNAL_get_position (UnityEngine.Vector3&)
at UnityEngine.Transform.get_position () [0x00000] in :0
at ScaledSpace.LateUpdate () [0x00000] in :0

The problem seems to be that for unknown reasons there are being null transforms added to the ScaledSpaces list.
I found that out because I went ahead and made a plugin that dumped the ScaledSpaces on every scene change and after I had the jittering happen again, which was really hard a few times as it seems to happen whenever it feels like, there were suddenly nulls in the dump.

It also seems to create ScaledSpaces for the vessels but only if you go to a flight from the Tracking Station, when I simply launched a flight from the VAB there weren't any vessel spaces added at all.
It also recreates the vessel spaces when going from the Tracking Station to a flight but as far as I could tell these duplicates didn't do any harm.
Another thing is that these vessel spaces persist even when going back to the Main Menu which is mostlikely not intended.

I attached the source and the plugin itself so one of the devs can take an easier look at what happens when to the spaces, unless you can use the debugger, then you have the easiest way to check.
I also had it clean up the duplicates at one point but since I was lazy and didn't want to make a real check whenever there's something added twice I simply let it purge every none body on scene change, which turned out to be a bad idea as the only time where the vessel spaces seem to get create is from Tracking Station to a flight.

People reported to have this problem already with 0.21 (mostly noticeable with Kethane as the new grid freaks out then which is more obvious than the jittering) but for me it didn't happen before 0.21.1 but after I had it once it kept happening often, so I'm filing thing for version 0.21

ScaledSpaceDumper.cs (1.35 KB) ScaledSpaceDumper.cs [email protected] BloodyRain2k, 08/08/2013 10:54 PM
ScaledSpaceDumper.dll (6 KB) ScaledSpaceDumper.dll [email protected] BloodyRain2k, 08/08/2013 10:54 PM

History

#1 Updated by triffid_hunter over 10 years ago

workaround/kludge works for me. I had this happen in stock game before installing mods, and Kethane/MechJeb definitely made it happen more often and more noticeably

#2 Updated by imjustmatthew over 10 years ago

  • Status changed from New to Confirmed
  • % Done changed from 0 to 10
  • Version changed from 0.21 to 0.21.1

These errors are also occurring for me on linux with a clean install. Mine are happening at the Space Center, but look identical:

NullReferenceException
  at (wrapper managed-to-native) UnityEngine.Transform:INTERNAL_get_position (UnityEngine.Vector3&)
  at UnityEngine.Transform.get_position () [0x00000] in <filename unknown>:0 
  at ScaledSpace.LateUpdate () [0x00000] in <filename unknown>:0 

(Filename:  Line: 4294967295)

#3 Updated by TriggerAu almost 8 years ago

  • Status changed from Confirmed to Needs Clarification
  • % Done changed from 10 to 0

#4 Updated by TriggerAu over 7 years ago

  • Status changed from Needs Clarification to Closed
  • % Done changed from 0 to 100

Closing this report out for now. If you find it is still occuring in the latest version of KSP please open a new report (and this one can be linked to it.) For best results, the wiki contains really useful info for when creating a report http://bugs.kerbalspaceprogram.com/projects/ksp/wiki.

You can also ask questions about the bug cleanup in the forum here: http://forum.kerbalspaceprogram.com/index.php?/topic/143980-time-to-clean-up-the-bug-tracker/ and tag @TriggerAu to get my attention

Also available in: Atom PDF