Nanite-Construction-System / NaniteConstructionSystem

A continuation of scripts for the Nanite Construction System
14 stars 13 forks source link

NCF v2 and Torch Server - Beacon data not removed from world? #158

Open thraxarious opened 4 years ago

thraxarious commented 4 years ago

I'm still trying to trace down where this issue is happening, but if anyone familiar with NCF can spot what is causing the error I'd really appreciate it.

I'm trying to move from running the dedicated client to TORCH, as it has some features to reduce lag in multiplayer environments. Right now lag is really bad once you start growing in SE.

Just a note, the world this is happening in, currently has no beacons present.

12:16:09.1545 [FATAL] Initializer: System.NullReferenceException: Object reference not set to an instance of an object. at NaniteConstructionSystem.Entities.Effects.NaniteBeaconEffect..ctor(MyCubeBlock owner, Vector3 localOffset, Vector4 color) at NaniteConstructionSystem.Entities.Beacons.NaniteBeaconConstruct..ctor(IMyFunctionalBlock beaconBlock) at NaniteConstructionSystem.Entities.Beacons.NaniteBeaconConstructLogic.UpdateOnceBeforeFrame() at VRage.Game.Components.MyGameLogicComponent.VRage.Game.Entity.EntityComponents.Interfaces.IMyGameLogicComponent.UpdateOnceBeforeFrame(Boolean entityUpdate) at VRage.Game.Entity.MyGameLogic.UpdateOnceBeforeFrame() at VRage.Game.Entity.MyGameLogic.UpdateBeforeSimulation() at Sandbox.Game.World.MySector.UpdateBeforeSimulation() at Sandbox.Game.World.MySession.UpdateComponents() at Sandbox.Game.World.MySession.Update(MyTimeSpan updateTime) at Sandbox.MySandboxGame.Update() at Sandbox.Engine.Platform.Game.UpdateInternal() at Sandbox.Engine.Platform.Game.RunSingleFrame() at Sandbox.Engine.Platform.FixedLoop.<>c__DisplayClass11_0.<Run>b__0() at Sandbox.Engine.Platform.GenericLoop.Run(VoidAction tickCallback) at Sandbox.Engine.Platform.Game.RunLoop() at Sandbox.MySandboxGame.Run(Boolean customRenderLoop, Action disposeSplashScreen) at Torch.VRageGame.DoStart() in C:\jenkins\workspace\Torch_Torch_master\Torch\VRageGame.cs:line 246 at Torch.VRageGame.Run() in C:\jenkins\workspace\Torch_Torch_master\Torch\VRageGame.cs:line 125 at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart() System.NullReferenceException: Object reference not set to an instance of an object. at NaniteConstructionSystem.Entities.Effects.NaniteBeaconEffect..ctor(MyCubeBlock owner, Vector3 localOffset, Vector4 color) at NaniteConstructionSystem.Entities.Beacons.NaniteBeaconConstruct..ctor(IMyFunctionalBlock beaconBlock) at NaniteConstructionSystem.Entities.Beacons.NaniteBeaconConstructLogic.UpdateOnceBeforeFrame() at VRage.Game.Components.MyGameLogicComponent.VRage.Game.Entity.EntityComponents.Interfaces.IMyGameLogicComponent.UpdateOnceBeforeFrame(Boolean entityUpdate) at VRage.Game.Entity.MyGameLogic.UpdateOnceBeforeFrame() at VRage.Game.Entity.MyGameLogic.UpdateBeforeSimulation() at Sandbox.Game.World.MySector.UpdateBeforeSimulation() at Sandbox.Game.World.MySession.UpdateComponents() at Sandbox.Game.World.MySession.Update(MyTimeSpan updateTime) at Sandbox.MySandboxGame.Update() at Sandbox.Engine.Platform.Game.UpdateInternal() at Sandbox.Engine.Platform.Game.RunSingleFrame() at Sandbox.Engine.Platform.FixedLoop.<>c__DisplayClass11_0.<Run>b__0() at Sandbox.Engine.Platform.GenericLoop.Run(VoidAction tickCallback) at Sandbox.Engine.Platform.Game.RunLoop() at Sandbox.MySandboxGame.Run(Boolean customRenderLoop, Action disposeSplashScreen) at Torch.VRageGame.DoStart() in C:\jenkins\workspace\Torch_Torch_master\Torch\VRageGame.cs:line 246 at Torch.VRageGame.Run() in C:\jenkins\workspace\Torch_Torch_master\Torch\VRageGame.cs:line 125 at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart() 12:16:09.1701 [INFO] Initializer: Generating minidump at D:\torch-server\Instance\Minidump.dmp

Now, I've tested this on new worlds, so it seems it might be some cleanup that was not happening with an older world. If so, is there a way to clean it out of the world?

I removed all beacons from the world and was still getting the issue. Thank you for any input

thraxarious commented 4 years ago

Removing the mod, reloading, saving, and re-adding it wiped the erroneous data it seems.