Multiplayer Crash: System.NullReferenceException

Tophat Man shared this bug 5 months ago
Solved

My friends and I have been playing the signal update and have ran into an odd issue. Upon collision, paste in, or otherwise (I am yet to pinpoint the cause), the game crashes claiming unset object reference. I've provided the error below and the full log attached.


I AM using PluginLoader. This has happened to my friends who DO NOT use PluginLoader. This has been tested on worlds with and without mods, as well as hosted by people with and without PluginLoader installed. I'll continue to test without PluginLoader installed.


Exception Thrown:

2024-05-14 19:48:04.895 - Thread:   1 ->  Exception: System.NullReferenceException: Object reference not set to an instance of an object.
   at Sandbox.Game.Multiplayer.MyPlayerCollection.SetControlledEntityInternal(PlayerId id, MyEntity entity, Boolean sync)
   at Sandbox.Game.Multiplayer.MyPlayerCollection.UpdateControl(MyEntity entity)
   at Sandbox.Game.Entities.MyCockpit.OnAddedToScene(Object source)
   at VRage.Game.Entity.MyEntity.OnAddedToScene(Object source)
   at Sandbox.Game.Entities.MyCubeGrid.OnAddedToScene_Patch1(MyCubeGrid this, Object source)
   at Sandbox.Game.Entities.MyEntities.Add(MyEntity entity, Boolean insertIntoScene)
   at Sandbox.Game.Entities.MyEntityCreationThread.ConsumeResult(MyTimeSpan timestamp)
   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)
2024-05-14 19:48:04.910 - Thread:   1 ->  Exception occurred: System.NullReferenceException: Object reference not set to an instance of an object.
   at Sandbox.Game.Multiplayer.MyPlayerCollection.SetControlledEntityInternal(PlayerId id, MyEntity entity, Boolean sync)
   at Sandbox.Game.Multiplayer.MyPlayerCollection.UpdateControl(MyEntity entity)
   at Sandbox.Game.Entities.MyCockpit.OnAddedToScene(Object source)
   at VRage.Game.Entity.MyEntity.OnAddedToScene(Object source)
   at Sandbox.Game.Entities.MyCubeGrid.OnAddedToScene_Patch1(MyCubeGrid this, Object source)
   at Sandbox.Game.Entities.MyEntities.Add(MyEntity entity, Boolean insertIntoScene)
   at Sandbox.Game.Entities.MyEntityCreationThread.ConsumeResult(MyTimeSpan timestamp)
   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)
   at avaness.SpaceEngineersLauncher.Program.StartSpaceEngineers(String[] args)
   at avaness.SpaceEngineersLauncher.Program.Main(String[] args)
2024-05-14 19:48:04.911 - Thread:   1 ->  Showing message
2024-05-14 19:48:04.912 - Thread:   1 ->  MyInitializer.OnCrash
2024-05-14 19:48:04.912 - Thread:   1 ->  var exception = System.NullReferenceException: Object reference not set to an instance of an object.
   at Sandbox.Game.Multiplayer.MyPlayerCollection.SetControlledEntityInternal(PlayerId id, MyEntity entity, Boolean sync)
   at Sandbox.Game.Multiplayer.MyPlayerCollection.UpdateControl(MyEntity entity)
   at Sandbox.Game.Entities.MyCockpit.OnAddedToScene(Object source)
   at VRage.Game.Entity.MyEntity.OnAddedToScene(Object source)
   at Sandbox.Game.Entities.MyCubeGrid.OnAddedToScene_Patch1(MyCubeGrid this, Object source)
   at Sandbox.Game.Entities.MyEntities.Add(MyEntity entity, Boolean insertIntoScene)
   at Sandbox.Game.Entities.MyEntityCreationThread.ConsumeResult(MyTimeSpan timestamp)
   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)
   at avaness.SpaceEngineersLauncher.Program.StartSpaceEngineers(String[] args)
   at avaness.SpaceEngineersLauncher.Program.Main(String[] args)

Replies (4)

photo
1

Update: Using an external program, I uninstalled Space Engineers and any files related to Space Engineers. 2 people crashed upon something happening, but the host and I were unaffected. Neither of them use PluginLoader (one installed but removed, the other never done). The host IS using PluginLoader, I am NOT using PluginLoader. I'll continue testing and providing updates to the crashes.

photo
1

Update 2: Just crashed while looking at grids. I'll provide new crash report. Appears to be issue with the game.

photo
1

Hello, engineer!

Thank you for letting us know about this issue.

We have reported this issue into our internal system.

Kind Regards

Keen Software House: QA Department

photo
1

Hello, Engineer,

happy to let you know that this issue was fixed in the last hotfix update and the issue in not present anymore on v204.017.

Since there is nothing more we can do for you currently, I will close this thread now as Solved.

Please do not hesitate to contact us again, should you observe/experience any other issue with the game.

Happy Engineering!

Kind Regards,

Keen Software House: QA Department

Leave a Comment
 
Attach a file