Skip to content

Crash for NRE when modifying the "points" of a faction for behavioral actions #348

Description

@PocketfulOfGeese

This is the first time I've had this pop since the additional debug messages were added, but I've not gotten to play much lately. It used to be a highly likely occurrence whenever I destroyed the cockpit of a spawned large grid ship in Ares at War (non-beta). But, sometimes I can destroy ships dozens of times before it occurs. I've never had it happen on a small grid ship. If I take a save after the ships are spawned in but before they are destroyed and this crash happens, reloading that save results in the error not triggering when the same ship is then destroyed again:

2026-07-16 22:45:33.770 - Thread:   1 ->  MES / Error: FAC-PointSystem-Action-Decrease25: Error while executing action: 'DebugMessage'
2026-07-16 22:45:33.795 - Thread:   1 ->  Exception: System.NullReferenceException: Object reference not set to an instance of an object.
   at ModularEncountersSystems.Behavior.Subsystems.Trigger.TriggerSystem.ProcessAction(TriggerProfile trigger, ActionProfile actionsBase, Int64 attackerEntityId, Int64 detectedEntity, Command command)
   at ModularEncountersSystems.Behavior.Subsystems.Trigger.TriggerSystem.ProcessTrigger(TriggerProfile trigger, Int64 attackerEntityId, Command command)
   at ModularEncountersSystems.Behavior.Subsystems.Trigger.TriggerSystem.ProcessCompromisedTriggerWatcher(Boolean validToProcess)
   at ModularEncountersSystems.Behavior.CoreBehavior.RemoteIsWorking(IMyCubeBlock cubeBlock)
   at System.Action`1.Invoke(T obj)
   at Sandbox.Game.Entities.MyCubeBlock.UpdateIsWorking()
   at Sandbox.Game.Entities.MyRemoteControl.Receiver_IsPoweredChanged()
   at System.Action.Invoke()
   at System.DelegateExtensions.InvokeIfNotNull(Action handler)
   at Sandbox.Game.EntityComponents.MyResourceSinkComponent.SetInputFromDistributor(MyDefinitionId resourceTypeId, Single newResourceInput, Boolean isAdaptible, Boolean fireEvents)
   at Sandbox.Game.EntityComponents.MyResourceDistributorComponent.RemoveSinkLazy(MyResourceSinkComponent sink, Boolean resetSinkInput)
   at Sandbox.Game.EntityComponents.MyResourceDistributorComponent.CheckDistributionSystemChanges()
   at Sandbox.Game.EntityComponents.MyResourceDistributorComponent.UpdateBeforeSimulation()
   at Sandbox.Game.Entities.MyCubeGrid.CreateSplits(MyCubeGrid originalGrid, List`1 splitBlocks, List`1 groups, MyTestDisconnectsReason reason, Boolean sync)
   at Sandbox.Game.Entities.Cube.MyDisconnectHelper.DoDisconnects(MyCubeGrid grid, MyTestDisconnectsReason reason)
   at Sandbox.Game.Entities.MyCubeGrid.Dispatch(UpdateQueue queue, Boolean parallel)
   at Sandbox.Game.Entities.MyCubeGrid.UpdateAfterSimulation()
   at Sandbox.Game.Entities.MyParallelEntityUpdateOrchestrator.UpdateAfterSimulation()
   at Sandbox.Game.Entities.MyParallelEntityUpdateOrchestrator.DispatchAfterSimulation()
   at Sandbox.Game.Entities.MyEntities.UpdateAfterSimulation()
   at Sandbox.Game.World.MySector.UpdateAfterSimulation()
   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 SpaceEngineers.MyProgram.Main(String[] args)

There's more historical info on the bug thread in the AaW discord (bug message thread at https://discord.com/channels/865530031823519763/1479332737977684160)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions