Space Engineers

Space Engineers

ResourceNodes
Rümmler 29 Apr, 2023 @ 4:41am
Event Controller problems/crashes?
:EDIT EDIT: Still a thing, I tried adressing vanilla blocks in my nodes with the event controller and that solves the problem, I think therefore that its a Node issue.

:EDIT: Nevermind, it looks like the game decided to bug out the Event Controller.
It looked like it was controlling a block/taking data from it, but didn't do it. Prolly vanilla. :/
The block was not showing in the little info part in the bottom right and if you decide to change something then, the game crashes. Solution was to rebuild it. Now I don't know WHY it happened, maybe 20km is too far away and the grid was not properly loaded in?

I am using the new event controllers to monitor cargo fill rates on my node grids to save energy; checking the nodes inventory (because it is pushing constantly and if it cannot push anymore, it means the grid is full).

In my particular case, there is a crash happening:
Setting up a node, no power yet. Event controller: Check cargo fill rate % of Basic Static Drill. If 99% or higher, turn drill off. Else turn on.

I wanted to change the number to 97%, and getting this crash:


Thread: 1 -> Exception occurred: System.NullReferenceException: Object reference not set to an instance of an object.
at SpaceEngineers.Game.EntityComponents.Blocks.MyEventCargoFilledEntityComponent.UpdateDetailedInfo(StringBuilder info, Single conditionValue, Int32 slot, Int64 entityId, Single value, Boolean isLowerOrEqualCondition)
at SpaceEngineers.Game.EntityComponents.Blocks.MyEventCargoFilledEntityComponent.UpdateDetailedInfo(Int32 slot, Int64 entityId, Single value)
at SpaceEngineers.Game.EntityComponents.Blocks.MyEventCargoFilledEntityComponent.UpdateDetailedInfoLimitedBroadcast<>System_Int32#System_Int64#System_Single.Invoke(MyEventCargoFilledEntityComponent& this, Int32& slot, Int64& entityId, Single& value, DBNull& arg4, DBNull& arg5, DBNull& arg6)
at VRage.Network.MyReplicationLayerBase.InvokeLocally[T1,T2,T3,T4,T5,T6,T7](CallSite`7 site, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7)
at VRage.Network.MyReplicationSingle.DispatchEvent[T1,T2,T3,T4,T5,T6,T7,T8](CallSite callSite, EndpointId recipient, Nullable`1 position, T1& arg1, T2& arg2, T3& arg3, T4& arg4, T5& arg5, T6& arg6, T7& arg7, T8& arg8)
at VRage.Network.MyReplicationLayerBase.RaiseEvent[T1,T2,T3,T4,T5](T1 arg1, T5 arg5, Func`2 action, T2 arg2, T3 arg3, T4 arg4, EndpointId endpointId, Nullable`1 position)
at SpaceEngineers.Game.EntityComponents.Blocks.MyEventCargoFilledEntityComponent.BroadcastDetailedInfoChanged(Int64 ownerEntityId, Single newValue, Int32 slot, Boolean triggered)
at SpaceEngineers.Game.EntityComponents.Blocks.MyEventCargoFilledEntityComponent.NotifyValuesChanged()
at SpaceEngineers.Game.Entities.Blocks.MyEventControllerBlock.OnTriggeStateValueChanged(SyncBase obj)
at System.Action`1.Invoke(T obj)
at VRage.Sync.SyncBase.RaiseValueChanged(Boolean notify)
at VRage.Sync.Sync`2.SetValue(T& newValue, Boolean validate, Boolean ignoreSyncDirection, Boolean received)
at SpaceEngineers.Game.Entities.Blocks.MyEventControllerBlock.<>c.<CreateTerminalControls>b__49_11(MyEventControllerBlock x, Single y)
at Sandbox.Game.Screens.Terminal.Controls.MyTerminalValueControl`2.SetValue(TBlock block, TValue value)
at Sandbox.Game.Gui.MyTerminalControlSlider`1.SetValue(Single value)
at Sandbox.Game.Gui.MyTerminalControlSlider`1.OnValueChange(MyGuiControlSlider slider)
at System.DelegateExtensions.InvokeIfNotNull[T1](Action`1 handler, T1 arg1)
at Sandbox.Graphics.GUI.MyGuiControlSliderBase.set_Value(Single value)
at Sandbox.Game.Gui.MyTerminalControlSlider`1.AmountSetter(Single value)
at System.DelegateExtensions.InvokeIfNotNull[T1](Action`1 handler, T1 arg1)
at Sandbox.Graphics.GUI.MyGuiScreenDialogAmount.ConfirmButton_OnButtonClick(MyGuiControlButton sender)
at System.DelegateExtensions.InvokeIfNotNull[T1](Action`1 handler, T1 arg1)
at Sandbox.Graphics.GUI.MyGuiControlButton.HandleInput()
at Sandbox.Graphics.GUI.MyGuiScreenBase.HandleControlsInput(Boolean receivedFocusInThisUpdate)
at Sandbox.Graphics.GUI.MyGuiScreenBase.HandleInput(Boolean receivedFocusInThisUpdate)
at Sandbox.Graphics.GUI.MyScreenManager.HandleInput()
at Sandbox.Graphics.GUI.MyDX9Gui.HandleInput()
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 SpaceEngineers.MyProgram.Main(String[] args)
Last edited by Rümmler; 5 May, 2023 @ 9:52am
< >
Showing 1-1 of 1 comments
Rümmler 5 May, 2023 @ 9:52am 
Ok, I think I have to warm up that topic again; I might have ben wrong.

I run nodes on asteroids in space, powered by hydrogen engines and 1 Small LG Tank.

An event controller is supposed to shut the drill down once reaching 95% cargo capacity and back on when emptied. The event controller seems to "forget" what it is supposed to once unpowered. I think that *might* have to do with grids not loading in when not powered. If you adress a vanilla block, in my case the connector of the grid, this issues fixes itself once you meet the second slot action on the event controller (connector cargo capacity below 95%) and everything is alright again. Not so with the ress node. The only solution is to grind the controller down and build it up.
< >
Showing 1-1 of 1 comments
Per page: 1530 50