MeridiusIX / Modular-Encounters-Systems

Modular Encounters Systems is a Massive NPC Management Framework for the game Space Engineers
54 stars 21 forks source link

NullReferenceException during jump drive jump #268

Closed Geocube101 closed 1 year ago

Geocube101 commented 1 year ago

One of the MES mods will throw the following during a jump:

Exception occurred: System.NullReferenceException: Object reference not set to an instance of an object.
   at ModularEncountersSystems.Watchers.EventWatcher.GridJumped(Int64 identityId, String entityName, Int64 entityId)
   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.ProcessJumpCompletedTriggers(GridEntity grid, Vector3D startCoords, Vector3D endCoords)
   at System.Action`3.Invoke(T1 arg1, T2 arg2, T3 arg3)
   at ModularEncountersSystems.Tasks.GridJumpTracker.Run()
   at ModularEncountersSystems.Tasks.TaskProcessor.Process()
   at ModularEncountersSystems.Core.MES_SessionCore.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 SpaceEngineers.MyProgram.Main(String[] args)

Full log at: https://drive.google.com/file/d/1Cymlc_woDV--lfobVBnUslnpqxSKaP7z/view?usp=sharing Currently the issue is caused by one grid with jump drives from the Abomination mod and happens every time the grid jumps

MeridiusIX commented 1 year ago

Its been a while and checking this code I don't see anything that should be throwing an NRE. I may have addressed it and forgot to revisit the ticket. Please reopen if it returns.