NRE in editor when using Deadly Reenter mod
ihsoft opened this issue ยท 12 comments
[EXC 00:38:25.457] NullReferenceException: Object reference not set to an instance of an object
BaseFieldList.GetEnumerator ()
KIS.KIS_Shared.CleanupFieldsInModule (.PartModule module)
KIS.KIS_Shared.CleanupModuleFieldsInPart (.Part part)
KIS.KIS_Shared.PartSnapshot (.Part part)
KIS.KIS_Item..ctor (.Part part, KIS.ModuleKISInventory inventory, Single quantity)
KIS.ModuleKISInventory.AddItem (.Part part, Single qty, Int32 slot)
KIS.ModuleKISInventory.GuiInventory (Int32 windowID)
KIS.ModuleKISInventory.GuiMain (Int32 windowID)
UnityEngine.GUILayout+LayoutedWindow.DoWindow (Int32 windowID)
UnityEngine.GUI.CallWindowDelegate (UnityEngine.WindowFunction func, Int32 id, UnityEngine.GUISkin _skin, Int32 forceRect, Single width, Single height, UnityEngine.GUIStyle style)
The consequence is inability to drag parts into containers. FYI, this mod also triggers kerbal replication issue.
I have encountered the same issue with the NRE using both deadly reentry 7.4.4 and 7.4.5. I am currently downgrading deadly reentry until it works again.
Edit: I reverted to DRE 7.4.3 which it definitely worked with in the past. It still didn't work, so I believe the blame lies with another mod.
Edit 2: I removed DRE altogether and this error still occurred. This is an issue with a different mod.
I'm definitely going to rule out Deadly Reentry on this one. Both DRE 7.4.4 and 7.4.5 work with KIS 1.2.9
I reverted to KIS 1.2.9 and this bug disappeared. So as far as I can tell, the issue appeared between KIS 1.2.9 and 1.2.10. I am about to run a test with just KIS to see if the bug occurs in isolation.
If the bug does not occur with just KIS, I unfortunately do not have time to isolate which mod is the problem. For reference, my mod list, not including KIS, is as follows:
- B9 1:6.1.1
- B9AnimationModules v1.0.2
- B9PartSwitch v1.3.0
- B9-props 1:6.1.1
- B9-PWings-Fork 1:0.40.7
- CoherentContracts 1.02
- CommunityResourcePack 0.5.2.0
- CommunityTerrainTexturePack 2.0
- ConnectedLivingSpace 1.2.1.3
- ContractConfigurator 1.12.1
- ContractConfigurator-AnomalySurveyor 1.4.3
- ContractConfigurator-CleverSats 1.0
- ContractConfigurator-FieldResearch 1.1.7
- ContractConfigurator-GrandTours 1:0.1.10
- ContractConfigurator-InterplanetaryMountaineer 1.0.2
- ContractConfigurator-KerbinSpaceStation 1:3.2.1.2
- ContractConfigurator-RemoteTech 2.0.2
- ContractConfigurator-RoverMissionsRedux 0.1.4
- ContractConfigurator-Tourism 1.4.2
- ContractConfigurator-UnmannedContracts 0.3.20
- CrowdSourcedScience v3.0.2
- CustomAsteroids v1.3.1
- CustomAsteroids-Pops-Stock-Inner v1.3.1
- CustomAsteroids-Pops-Stock-Stockalike v1.3.1
- DeadlyReentry v7.4.5
- DistantObject v1.7.1
- DistantObject-default v1.7.1
- DockingPortAlignmentIndicator 6.4
- EnvironmentalVisualEnhancements 2:EVE-1.1-2-1
- EnvironmentalVisualEnhancements-HR 2:EVE-1.1-2-1
- ExtraPlanetaryLaunchpads 5.3.2
- FerramAerospaceResearch 3:0.15.6.5
- FilterExtensions 2.6.0
- FilterExtensionsDefaultConfig 2.6.0
- FinalFrontier 1.0.10-2467
- FirespitterCore v7.2.4
- GAP 1.2.5
- InterstellarFuelSwitch 2.0.7
- InterstellarFuelSwitch-Core 2.0.7
- Karbonite 1:0.7.3.0
- KAS 0.5.7
- KerbalAlarmClock v3.6.3.0
- KerbalEngineerRedux 1.1.1.0
- KerbalJointReinforcement v3.1.7
- Kopernicus 2:release-1-0-5
- KSPInterstellarExtended 1.8.22
- KSPSteamCtrlr autodetected dll
- KWRocketryRedux 3.0.10
- KWRocketryRedux-GraduatedPwr 3.0.10
- ModularFlightIntegrator 1.1.4.0
- ModuleManager 2.6.25
- OuterPlanetsMod 1:2.0
- RasterPropMonitor 1:v0.26.0
- RasterPropMonitor-Core 1:v0.26.0
- RealChute v1.4.1.1
- RemoteTech v1.7.0
- SaveUpgradePipeline autodetected dll
- SCANsat v16.1
- SmokeScreen 2.6.15.0
- SpacetuxSA 0.3.10.1
- Steamworks autodetected dll
- TacFuelBalancer 2.6
- TakeCommand 1.4.1
- TextureReplacer v2.4.13
- Toolbar 1.7.12
- TransferWindowPlanner v1.5.1.0
- TriggerAu-Flags v2.7.4.0
- TweakScale v2.2.12
- UKS 1:0.40.3.0
- USI-Core 0.2.3.0
- USI-LS 0.4.3.1
- USITools 0.7.2.1
- USI-UKS-Shared 0.2.3.1
- WaypointManager 2.5.2
- WiderContractsApp 1.3.3
I reverted to DRE 7.4.3 which it definitely worked with in the past
Thanks. Good to know.
If the bug does not occur with just KIS, I unfortunately do not have time to isolate which mod is the problem. For reference, my mod list, not including KIS, is as follows:
I don't see any known incompatible modes. I won't be able to test them all as well. Though, you may do couple of tries by removing only mods that modify stock parts. I'm pretty sure it's one of them.
Well, I just double checked and KIS does work fine by itself (although you already knew that :P). I might get around to removing some of those mods to see if that fixes the issue eventually, but I don't have the time just yet.
Hm... it's really hard to isolate which mod is causing this issue. I looked up which mods modified stock parts and then tried each one progressively and the issue didn't show up. I then tried adding back all of my mods and the error didn't show up until I added Interstellar (which is named WarpPlugin in the GameData folder, so it was literally the last mod I readded). I then tried just KIS + Interstellar and it's dependencies and the issue goes away. I'm going to keep trying to re-add mods, but I'm not overly optimistic.
For me this is reproducible in an install with only Deadly Reentry 7.4.5 and KIS 1.2.10 (along with Module Manager and Toolbar) installed. The issue does not occur with DR 7.4.5 and KIS 1.2.9, so I guess something in the latest KIS update.
Output log can be found here if it's any use.
So I decided to get my hands dirty and mess around with some code and I'm perplexed by this error. It turns out I misread the stack trace--the NRE is coming from within BaseFieldList.GetEnumerator(). And since that method is part of KSP, it's pretty much a black box and I have no real idea where to go forward..... Any suggestions would be welcome.
I actually DO know what's happening (which doesn't mean I know how to fix it). It's some weird stuff with modules added into prefabs - they don't get initialized correctly. I've wasted several days to fix this issue for the stock modules but looks the efforts were not enough for DRE. Going to get to this issue on weekend so, stay turned.