The "Decluttering" Feature from 2.5.4.4 is breaking KCT
Lisias opened this issue · 22 comments
Fellow Kerbonaut JebIsDeadBaby found a problem and reported it on Forum:
KCT is, apparently, copying nodes itself and since this happens on Editor, TweakScale gets confused and apply the Decluttering over KCT, that so borks on a NRE:
[EXC 13:56:07.455] NullReferenceException: Object reference not set to an instance of an object
ConfigNode.CopyToRecursive (ConfigNode node, System.Boolean overwrite) (at <cd473063d3a2482f8d93d388d0c95035>:0)
ConfigNode.CopyToRecursive (ConfigNode node, System.Boolean overwrite) (at <cd473063d3a2482f8d93d388d0c95035>:0)
ConfigNode.CopyToRecursive (ConfigNode node, System.Boolean overwrite) (at <cd473063d3a2482f8d93d388d0c95035>:0)
ConfigNode.CopyTo (ConfigNode node) (at <cd473063d3a2482f8d93d388d0c95035>:0)
KerbalConstructionTime.KCT_KSC.AsConfigNode () (at <27327b2825ca4e69a9d134bb5cd0383e>:0)
KerbalConstructionTime.KerbalConstructionTimeData.OnSave (ConfigNode node) (at <27327b2825ca4e69a9d134bb5cd0383e>:0)
ScenarioModule.Save (ConfigNode node) (at <cd473063d3a2482f8d93d388d0c95035>:0)
ProtoScenarioModule..ctor (ScenarioModule module) (at <cd473063d3a2482f8d93d388d0c95035>:0)
ScenarioRunner.UpdateModules () (at <cd473063d3a2482f8d93d388d0c95035>:0)
ScenarioRunner.GetUpdatedProtoModules () (at <cd473063d3a2482f8d93d388d0c95035>:0)
Game.Updated (GameScenes startSceneOverride) (at <cd473063d3a2482f8d93d388d0c95035>:0)
GamePersistence.SaveGame (System.String saveFileName, System.String saveFolder, SaveMode saveMode, GameScenes startScene) (at <cd473063d3a2482f8d93d388d0c95035>:0)
GamePersistence.SaveGame (System.String saveFileName, System.String saveFolder, SaveMode saveMode) (at <cd473063d3a2482f8d93d388d0c95035>:0)
EditorLogic.onExitConfirm () (at <cd473063d3a2482f8d93d388d0c95035>:0)
EditorLogic.onExitContinue () (at <cd473063d3a2482f8d93d388d0c95035>:0)
EditorLogic.exitEditor () (at <cd473063d3a2482f8d93d388d0c95035>:0)
UnityEngine.Events.InvokableCall.Invoke () (at <12e76cd50cc64cf19e759e981cb725af>:0)
UnityEngine.Events.UnityEvent.Invoke () (at <12e76cd50cc64cf19e759e981cb725af>:0)
UnityEngine.UI.Button.Press () (at <aa3a227ee8664797a8194ab8e2ed2249>:0)
UnityEngine.UI.Button.OnPointerClick (UnityEngine.EventSystems.PointerEventData eventData) (at <aa3a227ee8664797a8194ab8e2ed2249>:0)
UnityEngine.EventSystems.ExecuteEvents.Execute (UnityEngine.EventSystems.IPointerClickHandler handler, UnityEngine.EventSystems.BaseEventData eventData) (at <aa3a227ee8664797a8194ab8e2ed2249>:0)
UnityEngine.EventSystems.ExecuteEvents.Execute[T] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.ExecuteEvents+EventF
unction`1[T1] functor) (at <aa3a227ee8664797a8194ab8e2ed2249>:0)
UnityEngine.DebugLogHandler:LogException(Exception, Object)
ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object)
UnityEngine.EventSystems.EventSystem:Update()
The exception is raised at clicking on the Launch Button (Green Button Top/Right)
Rolling back to 2.4.5.2 is a viable workaround for now (and also a confirmation that the problem is really 2.4.5.4)
Oukey. I'm found of this feature for a lot of reasons (some of them related to the near future). So let's try to fix this.
This is the stackDump from a "true" Save action:
[EXC 15:36:10.647] Exception: dummy
UnityEngine.DebugLogHandler:LogException(Exception, Object)
KSPe.Util.Log.UnityLogDecorator:UnityEngine.ILogHandler.LogException(Exception, Object)
ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object)
UnityEngine.Debug:LogException(Exception)
KSPe.Util.Log.UnityLogger:logException(String, Exception)
KSPe.Util.Log.Logger:error(Object, Exception)
TweakScale.Log:error(Exception, Object)
TweakScale.TweakScale:IsSaveMode()
TweakScale.TweakScale:OnSave(ConfigNode)
PartModule:Save(ConfigNode)
ShipConstruct:SaveShip()
ShipConstruction:CreateBackup(ShipConstruct)
EditorLogic:onSaveConfirm()
<>c__DisplayClass281_0:<saveShip>b__0()
DialogGUIButton:OptionSelected()
DialogGUIButton:<Create>b__23_1()
UnityEngine.EventSystems.EventSystem:Update()
Observe that on the user's stackDump, a call to the Editor's exit is made (EditorLogic.exitEditor ()
) before the GamePersistence.SaveGame
that ends up persisting the craft somewhere.
But, yet, my code is running what implies that KSP didn't changed the current Scene yet - what implies that KCT acts on the phaseout of the Scene (after it's active, but before it had changed).
Well, I think I have a dirty way to detect when the Save is legit - and in a way that it would fail to the safe side.
Changing line 379 : https://github.com/net-lisias-ksp/TweakScale/blob/f8227c01accaed7d194eb717ae3f193194c1573c/Source/Scale/Scale.cs#L379
to node.name = "IGNOREME"
solved the problem, but the result node ended up as:
IGNOREME // Nothing to see here. Please ignore me.
{
UPGRADESAPPLIED
{
}
}
what I consider less than ideal, as it adds some clutter to the craft file.
Trying something else.
Oukey. Fixed on commit 5b9b6b8 . :)
This is the ending result of the stunt only when saving to Craft Files. The code gracefully fails to the safe side, assuming not to apply the Declutter except on the very situation I detected it's safe.
// Nothing to see here. Please ignore me.
{
UPGRADESAPPLIED
{
}
}
Now I need to check the stung on older versions of KSP just to be sure
It worked on:
- KSP 1.12.2
- KSP 1.7.3
- KSP 1.3.1 (where the expected result is not to act.
I crunched the test for the remaining ones. I consider the issue CLOSED/FIXED.
Oukey. Let's try again. There's something else involved on this mess, as KCT on my machine doesn't borks this way.
This is the list of add'ons from JebIsDeadBaby:
Mod DLLs found:
Stock assembly: Assembly-CSharp v0.0.0.0
Scale_Redist v1.0.0.0 / v2.4.5.7
ModuleManager v4.2.1.0
ClickThroughBlocker v0.1.10.17
0Harmony v2.0.4.0
HarmonyInstallChecker v1.0.0.0
ToolbarControl v0.1.9.6
KSPe.Light.Recall v2.3.0.4
Attached v0.2.0.6
ChillingOut v0.2.0.6
Driftless v0.2.0.6
KSP-Recall v0.2.0.6
LetsStayTogether v0.2.0.4
Refunding v0.2.0.6
Resourceful v0.2.0.6
SolverEngines v3.3.0.0 / v3.10.0.0
AJE v2.18.0.0
Bureaucracy v1.0.0.0
CLSInterfaces v2.0.0.6
ConnectedLivingSpace v2.0.0.6
CrewQueueTwo v1.1.11.2
CustomBarnKit v1.1.21.0
DeadlyReentry v8.1.2.0
DecouplerShroud v1.0.0.0
DistantObject v2.0.3.0
DMagic v1.4.3.0 / vv1.4.3.0
DMModuleScienceAnimateGeneric v0.23.0.0
FlightTracker v1.0.0.0
EarnYourStripes v1.0.0.0
EngineLightRelit v1.6.3.0 / v1.0.0.0
FerramAerospaceResearch.Base v0.16.0.3
ModularFlightIntegrator v1.0.0.0 / v1.2.10.0
FerramAerospaceResearch v0.16.0.3
ferramGraph v1.3.0.0
Scale_Redist v1.0.0.0 / v2.4.5.7
Kopernicus.Parser v1.0.0.0
Kopernicus v1.0.0.0
MyRocksAreBiggerThanYours v1.0.0.0
SigmaTweakChutes v1.0.0.0
Sigma88LoadingScreens v0.4.0.0
KerbalChangelog v1.4.2.0
KerbalConstructionTime v1.4.11.0
KerbalismBootstrap v3.14.7846.20388 / v3.14
ICSharpCode.SharpZipLib v0.86.0.518 / v0.86.0
kOS v1.3.2.0
kOS.Safe v1.3.2.0
Kronometer v1.12.0.1
KSPRescueContractFix v1.1.0.0
MagiCore v1.3.2.3 / v1.0.0.0 / v1.3.1.0
MandatoryRCS v1.6.0.0
OhScrap v2.2.0.0 / v2.2.0.3
ProceduralFairings v6.0.0.0 / v6.1.0.0
RCSBuildAid v1.0.6.35359
RealChute v1.4.7845.29741 / v1.4.8.3
RealFuels v13.3.0.0 / v13.3.0
Restock v0.1.0.0
scatterer v0.772.0.0
ScrapYard v2.1.1.0
SmokeScreen v2.8.14.0
KSP_Log v0.1.1.7
ButtonManager v0.0.1.1
KSP_ColorPicker v0.1.0.4
KSP_PartHighlighter v0.1.0.9
SpaceTuxUtility v0.0.3.1
VesselModuleSave v0.0.1.2
Stock assembly: KSPSteamCtrlr v0.0.1.35
TextureReplacer v4.5.1.34170
KSPe.Light.TweakScale v2.3.0.4
Scale v2.4.5.7
KSP-AVC v0.0.0.1
ZeroMiniAVC v1.1.1.1
Folders and files in GameData:
000_ClickThroughBlocker
000_Harmony
001_ToolbarControl
999_KSP-Recall
AJE
Bureaucracy
CommunityResourcePack
ConnectedLivingSpace
CrewRandR
CustomBarnKit
DeadlyReentry
DecouplerShroud
DistantObject
DMagicOrbitalScience
DMagicScienceAnimate
EarnYourStripes
EngineLightRelit
FerramAerospaceResearch
FlightTracker
JNSQ
KerbalChangelog
KerbalConstructionTime
Kerbalism
KerbalismConfig
Kopernicus
kOS
Kronometer
KSPRescueContractFix
MagiCore
MandatoryRCS
ModularFlightIntegrator
OhScrap
ProceduralFairings
RCSBuildAid
RealChute
RealFuels
RealFuels-Stock
RealPlume
ReStock
ReStockPlus
scatterer
ScrapYard
SmokeScreen
SolverEngines
SpaceTuxLibrary
Stock folder: Squad
Stock folder: SquadExpansion
TextureReplacer
TweakScale
TweakScaleLimited
ZeroMiniAVC
999_Scale_Redist.dll
Custom_FARAeroData.cfg
ModuleManager.4.2.1.dll
ModuleManager.ConfigCache
ModuleManager.ConfigSHA
ModuleManager.Physics
ModuleManager.TechTree
Upgraded today from 2.4.5.3 to 2.4.5.7 and it still doesn't work. Rolled back and its working again.
I thought it's because I'm using KCT baked into RP-0. But I saw JebIsDeadBaby report the same thing less than hour ago...
Same behavior, after adding vessel to build queue and pressing exit VAB is producing exception until I remove added vessel from list:
[EXC 19:52:32.431] NullReferenceException: Object reference not set to an instance of an object
ConfigNode.CopyToRecursive (ConfigNode node, System.Boolean overwrite) (at <948fceea813942b7ac6b6d1b2dc2d0a3>:0)
ConfigNode.CopyToRecursive (ConfigNode node, System.Boolean overwrite) (at <948fceea813942b7ac6b6d1b2dc2d0a3>:0)
ConfigNode.CopyToRecursive (ConfigNode node, System.Boolean overwrite) (at <948fceea813942b7ac6b6d1b2dc2d0a3>:0)
ConfigNode.CopyTo (ConfigNode node) (at <948fceea813942b7ac6b6d1b2dc2d0a3>:0)
KerbalConstructionTime.KSCItem.BuildVesselAndShipNodeConfigs (KerbalConstructionTime.BuildListVessel blv, ConfigNode& node) (at <5d98d4c1383b4105911245dfb0fe61e3>:0)
KerbalConstructionTime.KSCItem.AsConfigNode () (at <5d98d4c1383b4105911245dfb0fe61e3>:0)
KerbalConstructionTime.KerbalConstructionTimeData.OnSave (ConfigNode node) (at <5d98d4c1383b4105911245dfb0fe61e3>:0)
ScenarioModule.Save (ConfigNode node) (at <948fceea813942b7ac6b6d1b2dc2d0a3>:0)
ProtoScenarioModule..ctor (ScenarioModule module) (at <948fceea813942b7ac6b6d1b2dc2d0a3>:0)
ScenarioRunner.UpdateModules () (at <948fceea813942b7ac6b6d1b2dc2d0a3>:0)
ScenarioRunner.GetUpdatedProtoModules () (at <948fceea813942b7ac6b6d1b2dc2d0a3>:0)
Game.Updated (GameScenes startSceneOverride) (at <948fceea813942b7ac6b6d1b2dc2d0a3>:0)
GamePersistence.SaveGame (System.String saveFileName, System.String saveFolder, SaveMode saveMode, GameScenes startScene) (at <948fceea813942b7ac6b6d1b2dc2d0a3>:0)
GamePersistence.SaveGame (System.String saveFileName, System.String saveFolder, SaveMode saveMode) (at <948fceea813942b7ac6b6d1b2dc2d0a3>:0)
EditorLogic.onExitConfirm () (at <948fceea813942b7ac6b6d1b2dc2d0a3>:0)
EditorLogic.onExitContinue () (at <948fceea813942b7ac6b6d1b2dc2d0a3>:0)
EditorLogic.exitEditor () (at <948fceea813942b7ac6b6d1b2dc2d0a3>:0)
UnityEngine.Events.InvokableCall.Invoke () (at <7d9ec060e791409ab3eb85c61e312ed6>:0)
UnityEngine.Events.UnityEvent.Invoke () (at <7d9ec060e791409ab3eb85c61e312ed6>:0)
UnityEngine.UI.Button.Press () (at <15535c6df78d4af0aa4c587123ed92e6>:0)
UnityEngine.UI.Button.OnPointerClick (UnityEngine.EventSystems.PointerEventData eventData) (at <15535c6df78d4af0aa4c587123ed92e6>:0)
UnityEngine.EventSystems.ExecuteEvents.Execute (UnityEngine.EventSystems.IPointerClickHandler handler, UnityEngine.EventSystems.BaseEventData eventData) (at <15535c6df78d4af0aa4c587123ed92e6>:0)
UnityEngine.EventSystems.ExecuteEvents.Execute[T] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.ExecuteEvents+EventFunction`1[T1] functor) (at <15535c6df78d4af0aa4c587123ed92e6>:0)
UnityEngine.DebugLogHandler:LogException(Exception, Object)
ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object)
UnityEngine.EventSystems.EventSystem:Update()
This is the list of add'ons from jefferyharrell
Mod DLLs found:
Stock assembly: Assembly-CSharp v0.0.0.0
Scale_Redist v1.0.0.0 / v2.4.5.7
ModuleManager v4.2.1.0
ClickThroughBlocker v0.1.10.17
FilterExtensions v3.2.6.0 / v1.0.0.0
0Harmony v2.0.4.0
HarmonyInstallChecker v1.0.0.0
ToolbarControl v0.1.9.6
KSPe.Light.Recall v2.3.0.4
Attached v0.2.0.6
ChillingOut v0.2.0.6
Driftless v0.2.0.6
KSP-Recall v0.2.0.6
LetsStayTogether v0.2.0.4
Refunding v0.2.0.6
Resourceful v0.2.0.6
AnimatedDecouplers v1.4.2.19194
AntennaHelper v1.0.7.5
B9PartSwitch v2.18.0.0 / vv2.18.0
BetterTimeWarpCont v2.3.12.9
BDB v1.8.1.0
CareerManagerContinued v1.3.6.4
Chatterer v0.9.99.2788
CommNetAntennasInfo v3.0.3.0
CommNetConstellation v1.5.0.0 / v1.5.7
CCK v5.1.0.0 / v5.1.0.0 for KSP v1
ConformalDecals v0.2.7.0 / v1.0.0 / v0.2.7
CLSInterfaces v2.0.0.6
ConnectedLivingSpace v2.0.0.6
ContractConfigurator v1.0.0.0 / v1.30.5
CrewLight v1.20.0.1
CrewQueueTwo v1.1.11.2
SimpleBoiloff v0.2.1.0
KSP_Log v0.1.1.7
KSP_PartHighlighter v0.1.0.9
DangItContinued v0.7.20.6
DeployableEngines v2.2.0.0
DistantObject v2.0.3.0
DMModuleScienceAnimateGeneric v0.23.0.0
ProgressParser v1.0.11.0 / vv11.0
ContractParser v1.0.9.0 / vv9.0
CapCom v1.0.2.11 / vv2.11
DynamicBatteryStorage v1.0.0.0
EasyVesselSwitch v2.3.7852.41352 / v2.3 for KSP v1.11+
KSPDev_Utils.2.6-EVS v2.6.0.0 / v2.6 for KSP v1 - EVS build
EditorExtensionsRedux v3.4.3.5
Atmosphere v1.11.3.1
CelestialShadows v1.11.3.1
CityLights v1.11.3.1
EVEManager v1.11.3.1
PartFX v1.11.3.1
PQSManager v1.11.3.1
ShaderLoader v1.11.3.1
Terrain v1.11.3.1
TextureConfig v1.11.3.1
Utils v1.11.3.1
_BuildManager v1.11.3.1
EVAEnhancementsContinued v0.1.15.3
FarFutureTechnologies v1.0.0.0
HaystackReContinued v0.5.7.3
JanitorsCloset v0.3.7.7 / v1.0.0.0
Kopernicus.Parser v1.0.0.0
ModularFlightIntegrator v1.0.0.0 / v1.2.10.0
Kopernicus v1.0.0.0
MyRocksAreBiggerThanYours v1.0.0.0
SigmaTweakChutes v1.0.0.0
Sigma88LoadingScreens v0.4.0.0
KAS-API-v2 v2.0.7239.35367 / vKAS API v2
KAS v1.9.7852.42225 / v1.9 for KSP v1
KSPDev_Utils.2.6-KAS v2.6.0.0 / v2.6 for KSP v1 - KAS build
KeepItStraight v1.3.0.0
KerbalConstructionTime v1.4.11.0
KerbalEngineer.Unity v1.0.0.0
KerbalEngineer v1.1.9.0
KerbalJointReinforcementNext v4.1.15.0
DeployableAeroSurfaces v1.0.0.0
ICSharpCode.SharpZipLib v0.86.0.518 / v0.86.0
kOS v1.3.2.0
kOS.Safe v1.3.2.0
KRASH v0.5.33.5
Kronometer v1.12.0.1
KSPRescueContractFix v1.1.0.0
KSP-PartVolume v0.0.3.0 / v0.0.3
LightsOutRelit v0.3.0.2
MagiCore v1.3.2.3 / v1.0.0.0 / v1.3.1.0
MechJeb2 v2.5.1.0 / v / v2.12.3.0
System.Buffers v4.0.3.0 / v4.6.28619.01 @BuiltBy: dlab14-DDVSOWINAGE069 @Branch: release/2.1 @SrcCode: https://github.com/dotnet/corefx/tree/7601f4f6225089ffb291dc7d58293c7bbf5c5d4f / v4.6.28619.01
DockingPortAlignmentIndicator v6.9.2.2
DPAI_RPM v1.0.0.2
ModuleDockingNodeNamed v1.0.0.2
NearFutureElectrical v1.0.0.0
NearFutureExploration v0.4.0.0
NFPropUtils v1.0.0.0
NearFuturePropulsion v0.9.0.0
NearFutureSolar v0.4.0.0
NearFutureUtils v0.0.0.0
FinalFrontier v1.0.0.0
S.A.V.E v1.0.0.0
PartCommanderCont v1.1.6.3
PebkacLaunchEscape2 v1.4.2.0 / v1.2.2.2
PersistentRotationUpgraded v1.9.1.6
PlanetShine v0.2.6.1
PreciseEditor v1.0.0.0
PreciseManeuver v2.4.4.0 / v / v2.4.4
PreciseManeuver.Unity v2.4.4.0
ProceduralFairings v6.0.0.0 / v6.1.0.0
ProjectManager v1.0.0.0
RCSBuildAid v1.0.6.35359
RealChute v1.4.7845.29741 / v1.4.8.3
ReentryParticleEffectRenewed v1.8.1.0
BackgroundResources v1.11.0.0
ProgressiveCBMaps v0.1.29.0
ResearchBodies v1.12.0.0
Restock v0.1.0.0
RocketSoundEnhancement v1.0.7636.22707
SafeChute v2.1.19.0 / v2.1.19
SCANsat v1.20.4.0 / vv20.4
SCANmechjeb v1.20.4.0 / vv20.4
SCANsat.Unity v1.20.4.0
scatterer v0.772.0.0
Shabby v0.2.7.0 / v1.0.0 / v0.2.7
ShipManifest v6.0.2.0
SMInterface v6.0.2.0
SimpleAdjustableFairings v1.12.0.0 / vv1.12.0
ScienceSituationInfo v1.3.4.0 / v1.2.1.1
SpaceDust v0.0.0.0
ButtonManager v0.0.1.1
KSP_ColorPicker v0.1.0.4
SpaceTuxUtility v0.0.3.1
VesselModuleSave v0.0.1.2
Stock assembly: KSPSteamCtrlr v0.0.1.35
HabUtils v1.0.0.0
StockDefaultSettings v0.0.1.2
KSPDev_Utils.2.6-Lights v2.6.0.0 / v2.6 for KSP v1 - Surface Lights build
SurfaceLights v1.19.7854.4854 / v1.19 for KSP v1.11+
SystemHeat v0.1.0.0
TarsierSpaceTech v7.13.0.0
TextureReplacer v4.5.1.34170
TacLifeSupport v0.17.0.0 / v0.17.0
Trajectories v2.4.2.0
TUFX v1.0.0.0
KSPe.Light.TweakScale v2.3.0.4
Scale v2.4.5.7
TweakScaleCompanion_NF v1.0.0.0
UniversalStorage2 v1.8.0.0 / vv1.8.0.0
UniversalStorage2.Unity v1.8.0.0
VABReorienter v1.0.0.0
VesselMover v1.12.0.0
WasdEditorCameraContinued v0.7.3.3
Waterfall v0.0.0.0
KSP-AVC v0.0.0.1
ZeroMiniAVC v1.1.1.1
[x]_Science! v6.0.0.8
Folders and files in GameData:
000_ClickThroughBlocker
000_FilterExtensions
000_FilterExtensions_Configs
000_Harmony
001_ToolbarControl
999_KSP-Recall
AnimatedDecouplers
AntennaHelper
B9PartSwitch
BetterTimeWarp
Bluedog_DB
CareerManager
Chatterer
CommNetAntennasInfo
CommNetConstellation
CommunityCategoryKit
CommunityResourcePack
ConformalDecals
ConnectedLivingSpace
ContractConfigurator
ContractPacks
CrewLight
CrewRandR
CrowdSourcedScience
CryoEngines
CryoEnginesNFLV
CryoEnginesRestock
CryoTanks
DangIt
DeployableEngines
DistantObject
DMagicScienceAnimate
DMagicUtilities
DynamicBatteryStorage
EasyVesselSwitch
EditorExtensionsRedux
EnvironmentalVisualEnhancements
Errion
EVAEnhancementsContinued
FarFutureTechnologies
Fox's Profiles
HaystackContinued
HeatControl
JanitorsCloset
JNSQ
JX2Antenna
KAS
KeepItStraight
KerbalAtomics
KerbalAtomicsLH2NTRModSupport
KerbalConstructionTime
KerbalEngineer
KerbalJointReinforcement
KerbalReusabilityExpansion
Kopernicus
kOS
KRASH
Kronometer
KSPRescueContractFix
KSP_PartVolume
LightsOut
MagiCore
MechJeb2
MoarFilterExtensionConfigs
ModularFlightIntegrator
NavyFish
NCRC
NearFutureConstruction
NearFutureElectrical
NearFutureExploration
NearFutureLaunchVehicles
NearFutureProps
NearFuturePropulsion
NearFutureSolar
NearFutureSpacecraft
Nereid
PartCommanderContinued
Pebkac
PersistentRotation
PlanetShine
PlumeParty
PreciseEditor
PreciseManeuver
ProceduralFairings
ProjectManager
RationalResources
RCSBuildAid
RealChute
reDIRECT
ReentryParticleEffectRenewed
REPOSoftTech
ReStock
ReStockPlus
RocketSoundEnhancement
SafeChute
SCANsat
scatterer
SDHI
Shabby
ShipManifest
SimpleAdjustableFairings
SituationModuleInfo
SpaceDust
SpaceTuxLibrary
SpaceY-Expanded
SpaceY-Lifters
Stock folder: Squad
Stock folder: SquadExpansion
StationPartsExpansionRedux
StationPartsExpansionReduxIVAs
StockDefaultSettings
SurfaceLights
SystemHeat
SystemHeatConverters
SystemHeatFissionEngines
SystemHeatFissionReactors
SystemHeatHarvesters
Tantares
TantaresLV
TarsierSpaceTech
TextureReplacer
ThunderAerospace
Trajectories
TUFX
TweakScale
TweakScaleCompanion
UniversalStorage2
UtilityWeight
VABReorienter
VesselMover
WasdEditorCamera
Waterfall
WaterfallRestock
XyphosAerospace
ZeroMiniAVC
zFinal_FilterExtensions
[x]_Science!
999_Scale_Redist.dll
Alverro-TUFX-Profiles.cfg
FinalFrontier.dat
Jinx-TUFX-Profiles.cfg
JNSQ_SUN_boost.cfg
ModuleManager.4.2.1.dll
ModuleManager.ConfigCache
ModuleManager.ConfigSHA
ModuleManager.Physics
ModuleManager.TechTree
partVolumes.cfg
RealNames.cfg
S.A.V.E.dat
Steven_TUFXProfles.cfg
Zorg_flight_profiles.cfg
Below is mine, maybe it will help. Pretty much RP-0 Reqirements plus Mechjeb, KER , KAC and RO Engines. List exported from CKAN. No manual mods. This is on KSP 1.10.1 with RP-0 1.10.7 under Linux.
Although I'm using my extra config because RO RCS was not scaling in the past. It worked for me past few years with Tweakscale, as long as I keep RCS above 74% ( zzzzzz_my_RCS.cfg in GameData ):
@PART[*linearRcs*]:HAS[!MODULE[TweakScale]]:FINAL
{
#@TWEAKSCALEBEHAVIOR[Engine]/MODULE[TweakScale] { }
%MODULE[TweakScale]
{
type = free
}
}
@PART[*RCSBlock*]:HAS[!MODULE[TweakScale]]:FINAL
{
#@TWEAKSCALEBEHAVIOR[Engine]/MODULE[TweakScale] { }
%MODULE[TweakScale]
{
type = free
}
}
@PART[RCSBoonExt]:FINAL
{
#@TWEAKSCALEBEHAVIOR[Engine]/MODULE[TweakScale] { }
%MODULE[TweakScale]
{
type = free
}
}
@PART[RCS_025T*]:HAS[!MODULE[TweakScale]]:FINAL
{
#@TWEAKSCALEBEHAVIOR[Engine]/MODULE[TweakScale] { }
%MODULE[TweakScale]
{
type = free
}
}
Advanced Jet Engine (AdvancedJetEngine v2.18.0)
AtmosphereAutopilot (Fly-By-Wire) (AtmosphereAutopilot v1.5.17)
B9 Aerospace Procedural Wings - Fork (B9-PWings-Fork 3:0.43.0.10)
B9 Part Switch (B9PartSwitch v2.17.0)
BetterBurnTime (BetterBurnTime 1.10)
BetterTimeWarpContinued (BetterTimeWarpCont 2.3.12.6)
Breaking Ground (BreakingGround-DLC 1.5.1)
CapCom - Mission Control On The Go (CapCom 2.11)
ClickThrough Blocker (ClickThroughBlocker 1:0.1.10.15)
Community Resource Pack (CommunityResourcePack 1.4.2)
Contract Configurator (ContractConfigurator 1.30.5)
Contract Parser (ContractParser 9.0)
Custom Barn Kit (CustomBarnKit 1.1.21.0)
Deadly Reentry Continued (DeadlyReentry 1:v.7.9.0)
Distant Object Enhancement Continued (DistantObject v2.0.1.1)
Distant Object Enhancement Real Solar System config (DistantObject-RealSolarSystem v1.9.1.1)
Environmental Visual Enhancements Redux (EnvironmentalVisualEnhancements 3:1.11.3.1)
Ferram Aerospace Research Continued (FerramAerospaceResearchContinued 3:0.16.0.3)
Firespitter Core (FirespitterCore v7.17)
Firespitter Resources config (FirespitterResourcesConfig v7.17)
Hangar Extender (HangerExtenderExtended 3.6.0.1)
Harmony 2 (Harmony2 2.0.4.0)
Kerbal Alarm Clock (KerbalAlarmClock v3.13.0.0)
Kerbal Engineer Redux (KerbalEngineerRedux 1.1.9.0)
Kerbal Joint Reinforcement Continued (KerbalJointReinforcementContinued v3.5.2)
Kerbal Renamer (KerbalRenamer v1.4.0)
Kerbalism (Kerbalism 3.14)
Kerbalism - RealismOverhaul Config (Kerbalism-Config-RO v1.2.2)
Kopernicus Planetary System Modifier (Kopernicus 2:release-1.12.1-59)
KSC Switcher (KSCSwitcher v2.0.0.0)
KSP Recall (KSP-Recall v0.2.0.6)
KSPBurst (KSPBurst v1.5.5.1)
MagiCore (MagiCore 1.3.2.3)
Making History (MakingHistory-DLC 1.10.1)
MechJeb 2 - DEV RELEASE (MechJeb2-dev 2.12.3.0-1099)
ModularFlightIntegrator (ModularFlightIntegrator 1.2.7.0)
Module Manager (ModuleManager 4.2.1)
NavHud (NavHudRenewed 1.4.0.4)
Patch Manager (PatchManager 0.0.17.2)
PersistentRotation Upgraded (PersistentRotationUpgraded 1.9.1.6)
PlanetShine (PlanetShine 0.2.6.3)
PlanetShine - Default configuration (PlanetShine-Config-Default 0.2.6.3)
Precise Editor (PreciseEditor v1.4.0.2)
Precise Maneuver (PreciseManeuver 2:2.4.4)
Procedural Fairings (ProceduralFairings 1:v6.1)
Procedural Parts (ProceduralParts v2.2.1)
Progress Parser (ProgressParser 11.0)
RCS Build Aid (RCSBuildAid v1.0.3)
Real Antennas (RealAntennas v2.1)
Real Fuels (RealFuels 1:rf-v13.3.1)
Real Plume (RealPlume 2:v13.3.2)
Real Solar System (RealSolarSystem v18.1.5)
Real Solar System Textures - 2048 x 1024 (RSSTextures2048 v18.3)
RealChute Parachute Systems (RealChute v1.4.8)
RealHeat (RealHeat v5.1)
Realism Overhaul (RealismOverhaul v14.5.1.0)
Realistic Progression One (RP-1) (RP-0 v1.10.7.0)
Retractable Lifting Surface Module (RetractableLiftingSurface 0.2.1.1)
RO Engines (ROEngines v1.8.1)
RO Library (ROLib v1.3.1)
RO Solar (ROSolar v1.1.1)
RSS DateTime Formatter (RSSDateTimeFormatter v1.10.1.0)
RSS Visual Enhancements - High Resolution (RSSVE-HR 2.1.4)
SCANsat (SCANsat v20.4)
scatterer (Scatterer 3:v0.0772)
Scatterer Default Config (Scatterer-config 3:v0.0772)
Scatterer Sunflare (Scatterer-sunflare 3:v0.0772)
Science - Full Reward! (Continued) (Science-Full-Reward v5.2)
Ship Manifest (ShipManifest 6.0.2.0)
SmokeScreen - Extended FX Plugin (SmokeScreen 2.8.14.0)
Solver Engines plugin (SolverEngines v3.11.0)
SpaceTux Library (SpaceTuxLibrary 0.0.6.1)
SXTContinued (SXTContinued 2:0.3.29.5)
Tarsier Space Technology with Galaxies Continued... (TarsierSpaceTechnologyWithGalaxies 1:7.11)
Test Lite (TestLite 0.3.2)
Textures Unlimited (TexturesUnlimited 1.5.10.25)
Toolbar (Toolbar 1:1.8.0.5)
Toolbar Controller (ToolbarController 1:0.1.9.4)
Transfer Window Planner (TransferWindowPlanner v1.7.2.0)
TweakScale - Rescale Everything! (TweakScale v2.4.5.3)
Ven's New Parts (VenStockRevamp-NewParts v1.15.1)
Ven's Stock Part Revamp Core (VenStockRevamp-Core v1.15.1)
Zero MiniAVC (ZeroMiniAVC 1:1.1.0.2)
Upgraded today from 2.4.5.3 to 2.4.5.7 and it still doesn't work. Rolled back and its working again.
I thought it's because I'm using KCT baked into RP-0. But I saw JebIsDeadBaby report the same thing less than hour ago...
Same behavior, after adding vessel to build queue and pressing exit VAB is producing exception until I remove added vessel from list:
@misiektw can you please attach a zip file with your KSP.log? I need to find similarities between the logs I have with the problem. It's working for me here…
EDIT: Not needed. Thanks!
I managed to reproduce the problem on my rig.
It appears to be related to having crafts in recovering state…
** EDIT **
Nope. It appears that you have to have crafts on recovering state, and also crafts on the building list.
So do you still need my log? Because I would have to reinstall new version, as I'm using 2.4.5.3 ATM
So do you still need my log? Because I would have to reinstall new version, as I'm using 2.4.5.3 ATM
Nope! By reproducing it here, I ruled out 3rd parties.
Thanks!
EXACTLY as I was thinking…
KCT calls ShipConstruct.SaveShip() itself too sometimes.
[LOG 18:34:39.706] [TweakScale] IsSaveMode StackDump at TweakScale.TweakScale.IsSaveMode () [0x00000] in <39112277457949fc81ca99e8ea15bc06>:0
at TweakScale.TweakScale.OnSave (ConfigNode node) [0x00000] in <39112277457949fc81ca99e8ea15bc06>:0
at PartModule.Save (ConfigNode node) [0x00000] in <8861f4ca916d41ddac4d879a32ad34b2>:0
at ShipConstruct.SaveShip () [0x00000] in <8861f4ca916d41ddac4d879a32ad34b2>:0
at KerbalConstructionTime.KCT_BuildListVessel..ctor (ShipConstruct s, System.String ls, System.Double effCost, System.Double bP, System.String flagURL) [0x00000] in <27327b2825ca4e69a9d134bb5cd0383e>:0
at KerbalConstructionTime.KCT_Utilities.RecalculateEditorBuildTime (ShipConstruct ship) [0x00000] in <27327b2825ca4e69a9d134bb5cd0383e>:0
at KerbalConstructionTime.KerbalConstructionTime.EditorRecalculation () [0x00000] in <27327b2825ca4e69a9d134bb5cd0383e>:0
And this is the "normal" StackDump as I got while pressing the Save Button:
[LOG 18:34:43.648] [TweakScale] IsSaveMode StackDump at TweakScale.TweakScale.IsSaveMode () [0x00000] in <39112277457949fc81ca99e8ea15bc06>:0
at TweakScale.TweakScale.OnSave (ConfigNode node) [0x00000] in <39112277457949fc81ca99e8ea15bc06>:0
at PartModule.Save (ConfigNode node) [0x00000] in <8861f4ca916d41ddac4d879a32ad34b2>:0
at ShipConstruct.SaveShip () [0x00000] in <8861f4ca916d41ddac4d879a32ad34b2>:0
at ShipConstruction.CreateBackup (ShipConstruct ship) [0x00000] in <8861f4ca916d41ddac4d879a32ad34b2>:0
at EditorLogic.onExitConfirm () [0x00000] in <8861f4ca916d41ddac4d879a32ad34b2>:0
at EditorLogic.onExitContinue () [0x00000] in <8861f4ca916d41ddac4d879a32ad34b2>:0
at EditorLogic.exitEditor () [0x00000] in <8861f4ca916d41ddac4d879a32ad34b2>:0
at UnityEngine.Events.InvokableCall.Invoke () [0x00000] in <ef038509c5b948af8d6049dcab97ad3f>:0
at UnityEngine.Events.UnityEvent.Invoke () [0x00000] in <ef038509c5b948af8d6049dcab97ad3f>:0
at UnityEngine.UI.Button.Press () [0x00000] in <a98c9605fa9041c690cd9672acc5c0ec>:0
at UnityEngine.UI.Button.OnPointerClick (UnityEngine.EventSystems.PointerEventData eventData) [0x00000] in <a98c9605fa9041c690cd9672acc5c0ec>:0
at UnityEngine.EventSystems.ExecuteEvents.Execute (UnityEngine.EventSystems.IPointerClickHandler handler, UnityEngine.EventSystems.BaseEventData eventData) [0x00000] in <a98c9605fa9041c690cd9672acc5c0ec>:0
at UnityEngine.EventSystems.ExecuteEvents.Execute[T] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.ExecuteEvents+EventFunction`1[T1] functor) [0x00000] in <a98c9605fa9041c690cd9672acc5c0ec>:0
at UnityEngine.EventSystems.StandaloneInputModule.ReleaseMouse (UnityEngine.EventSystems.PointerEventData pointerEvent, UnityEngine.GameObject currentOverGo) [0x00000] in <a98c9605fa9041c690cd9672acc5c0ec>:0
at UnityEngine.EventSystems.StandaloneInputModule.ProcessMousePress (UnityEngine.EventSystems.PointerInputModule+MouseButtonEventData data) [0x00000] in <a98c9605fa9041c690cd9672acc5c0ec>:0
at UnityEngine.EventSystems.StandaloneInputModule.ProcessMouseEvent (System.Int32 id) [0x00000] in <a98c9605fa9041c690cd9672acc5c0ec>:0
at UnityEngine.EventSystems.StandaloneInputModule.ProcessMouseEvent () [0x00000] in <a98c9605fa9041c690cd9672acc5c0ec>:0
at UnityEngine.EventSystems.StandaloneInputModule.Process () [0x00000] in <a98c9605fa9041c690cd9672acc5c0ec>:0
at UnityEngine.EventSystems.EventSystem.Update () [0x00000] in <a98c9605fa9041c690cd9672acc5c0ec>:0
Checking the many stackdumps I have, I found that the problem has many triggers though… There're 2 or 3 KCT entry points where the problem happen, some of them calling the ShipConstruct.SaveShip()
- and, obviously, I only detected the borks that didn't called this thing. Kerbal proposes, Kraken disposes. :P
On the "bright" side (note the quotes) all of them dies on ConfigNode.CopyToRecursive
, what suggests that - in reality - the bug is on KSP itself.
The thing works on loading probably due the UpgradePipeline - so, in the end, the safest alternative is to avoid using an empty name for the NODE. Anything goes, so a single letter did the trick - my O.C.D. is screaming like hell on my head, and since my initial "hackish" approach ended up being the best one, the fact is that I rolling back my "proper solution" and going back to the hack. (and now my Programmer's Proud is crying as it was the end of Times)
Thinking is a very healthy habit, I should do that more times.
I just found that I can just abort the method to have similar results (slightly cleaner, by way):
PARTDATA
{
}
(in the distance, I'm hearing a donkey neighing…)
Fixed (again) on commit 3a4d2f3
On a side note, this mess is another evidence about how KSP is developed: by patching the symptoms where they are detected, instead of looking for the root cause and solving the problem for good.
Whatever is the problem, it could be easily fixed using this.name = copy.name??""
or whatever on the right place, instead of doing this everywhere else (as the UpgradePipeline as it appears).
Anyway - this issue is now closed. (again)
@misiektw , there's a release candidate here:
https://github.com/net-lisias-ksp/TweakScale/releases/tag/RELEASE%2F2.4.5.8
Could you please give it a try and tell me if it solves the problem for you?
Thanks!
@Lisias Sure, that's the least I can do. And sorry for the delay, I was sleeping.
I just tested it installing manually ,and it seems exception from Tweakscale is gone.
With 2.4.5.8 I can now add vessels again and exit VAB afterwards.
Thank You :)
I'm still getting some NullReferenceException on entering KCT simulation, but its not related to TweakScale I think, but Kerbalism. Just in case, attached my KSP.log with 2.4.5.8 running.
Enter VAB, Load Vessel, Add vessel to KCT, Exit VAB.
After that Edit vessel in KCT and simulate in KCT. Then revert to VAB, exit VAB, ALT-F4.
EDIT. Uploaded wrong zip. Replace with correct one.
KSP_TW2458.zip
Also I used only Tweakscale dir and 999_Scale_Redist.dll from linked zip. Skipped ModulemanagerWatchdog and 666_ModuleManagerWatchdog.dll, because I was getting duplicate TS dll error.
Thanks for hint on Burst, I will check it out. I saw those exceptions earlier, but game essentially worked for me until I upgraded Tweakscale yesterday.
And apparently Burst its required for RP-0, but I won't be bothering You with this.
Anyway thanks for TS fix again :) I will look forward for new release to appear in CKAN.
Sure, that's the least I can do. And sorry for the delay, I was sleeping.
Not a problem! I sleep too now and then!! >D
I just tested it installing manually ,and it seems exception from Tweakscale is gone.
With 2.4.5.8 I can now add vessels again and exit VAB afterwards.
Thank You :)
Great!!! Your are welcome!
I'm still getting some NullReferenceException on entering KCT simulation, but its not related to TweakScale I think, but Kerbalism. Just in case, attached my KSP.log with 2.4.5.8 running.
I will check it.
Also I used only Tweakscale dir and 999_Scale_Redist.dll from linked zip. Skipped ModulemanagerWatchdog and 666_ModuleManagerWatchdog.dll, because I was getting duplicate TS dll error.
Humm… This is way less than ideal, as this may induce KSP to load the wrong DLL. Apparently this is not a problem on KSP 1.12, but… frankly… I choose to play safe, as this new way of loading DLLs may cause some terrible issues alter (just imagine someone loading an Assembly with the same name as TweakScale by accident, it would silently replace TweakScale and things will be terribly hairy to diagnose!)
— EDIT —
Humm… You are using Burst Compiler…. This may be the cause. I will double check the WatchDog when Burst is installed...
@misiektw , I think it's the Burst Compiler!!
[ERR 09:51:33.839] [KSPBurst]: Burst stderr:
(0,0): Burst warning BC1370: An exception was thrown from a function without the correct [Conditional("ENABLE_UNITY_COLLECTIONS_CHECKS")] guard. Exceptions only work in the editor and so should
be only thrown in a function protected by this guard at Unity.Collections.NativeHashMapBase`2<Unity.Mathematics.int2,System.Int32>.TryAdd(Unity.Collections.NativeHashMapData* data, Unity.Mathematics.int2 key, int item, bool isMultiHashMap, Unity
Your log is essentially littered by these warnings, and later I found a lot of NREs on multiple places:
[EXC 09:58:07.484] NullReferenceException: Object reference not set to an instance of an object
Part.UpdateMouseOver () (at <948fceea813942b7ac6b6d1b2dc2d0a3>:0)
Part.Update () (at <948fceea813942b7ac6b6d1b2dc2d0a3>:0)
UnityEngine.DebugLogHandler:LogException(Exception, Object)
ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object)
UnityEngine.Debug:CallOverridenDebugHandler(Exception, Object)
[EXC 09:59:15.511] NullReferenceException: Object reference not set to an instance of an object
KSP.UI.Screens.ApplicationLauncher.RemoveModApplication (KSP.UI.Screens.ApplicationLauncherButton button) (at <948fceea813942b7ac6b6d1b2dc2d0a3>:0)
KSPShaderTools.Addon.TexturesUnlimitedDebug.Awake () (at <d05d146f0f32458d9a30cf17e61f35a8>:0)
UnityEngine.DebugLogHandler:LogException(Exception, Object)
ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object)
UnityEngine.GameObject:AddComponent(Type)
AddonLoader:StartAddon(LoadedAssembly, Type, KSPAddon, Startup)
AddonLoader:StartAddons(Startup)
AddonLoader:OnLevelLoaded(GameScenes)
AddonLoader:OnSceneLoaded(Scene, LoadSceneMode)
UnityEngine.SceneManagement.SceneManager:Internal_SceneLoaded(Scene, LoadSceneMode)
And many more. I don't know Burst enough to say something, but I think that you should uninstall it and then try again to see what happens on the KSP.log. If the NREs happens only when Burst is installed, you will need to call for help on the Burst's github!