Space Engineers

Space Engineers

Tethers - Power Poles | REWRITE/MULTIPLAYER RELEASE!!
 This topic has been pinned, so it's probably important
Faolon  [developer] 6 Nov, 2021 @ 10:39pm
Bugs
Please try to explain what you were doing, as well is if its repeatable.
If you have log data, that would be great as well!
< >
Showing 1-15 of 82 comments
Dumpshock 7 Nov, 2021 @ 10:28pm 
Was getting this error with the other version as well. Migrated to this one, still getting this.
On load of save, get an error that indicates an error occurred and to view in '..\AppData\Roaming\SpaceEngineers\Storage\2648152224.sbm_KLIME and PSYCHO'


Log shows the following error repeating.

ERROR: System.NullReferenceException: Object reference not set to an instance of an object. at KlimeAndPsycho.Lib.GetClosestPlayer(List`1 PlayerList, Vector3D location) at KlimeAndPsycho.PowerCables.PowerCable.UpdateAfterSimulation()
Faolon  [developer] 8 Nov, 2021 @ 8:12am 
ok, thank you,
Faolon  [developer] 8 Nov, 2021 @ 8:13am 
Originally posted by Dumpshock:
Was getting this error with the other version as well. Migrated to this one, still getting this.
On load of save, get an error that indicates an error occurred and to view in '..\AppData\Roaming\SpaceEngineers\Storage\2648152224.sbm_KLIME and PSYCHO'


Log shows the following error repeating.

ERROR: System.NullReferenceException: Object reference not set to an instance of an object. at KlimeAndPsycho.Lib.GetClosestPlayer(List`1 PlayerList, Vector3D location) at KlimeAndPsycho.PowerCables.PowerCable.UpdateAfterSimulation()

what tool are you using to host a server?
Faolon  [developer] 8 Nov, 2021 @ 6:30pm 
A update has been added, please update it and get back to me if this is resolved.
Dumpshock 8 Nov, 2021 @ 6:57pm 
Thanks for the update.
Doesn't seem to have done the trick though.

This isn't a server, but just a local Offline Solar System world. Never been online with it.

Tried update and load, same error.

So, un-subbed, deleted all known data and forced a re-download, just to ensure I got all fresh new data.

Same error.

Red text on load of the save directing me to the log in the Storage folder.

Here's the full log.

The error otherwise, it seems to be working.

[18:51:50] Initialized GameMode=Survival OnlineMode=OFFLINE Server=True DS=False Defined=STABLE, [18:52:24] ERROR: System.NullReferenceException: Object reference not set to an instance of an object. at KlimeAndPsycho.Lib.GetClosestPlayer(List`1 PlayerList, Vector3D location) at KlimeAndPsycho.PowerCables.PowerCable.UpdateAfterSimulation() [18:52:24] ERROR: System.NullReferenceException: Object reference not set to an instance of an object. at KlimeAndPsycho.Lib.GetClosestPlayer(List`1 PlayerList, Vector3D location) at KlimeAndPsycho.PowerCables.PowerCable.UpdateAfterSimulation() [18:52:24] ERROR: System.NullReferenceException: Object reference not set to an instance of an object. at KlimeAndPsycho.Lib.GetClosestPlayer(List`1 PlayerList, Vector3D location) at KlimeAndPsycho.PowerCables.PowerCable.UpdateAfterSimulation() [18:52:25] ERROR: System.NullReferenceException: Object reference not set to an instance of an object. at KlimeAndPsycho.Lib.GetClosestPlayer(List`1 PlayerList, Vector3D location) at KlimeAndPsycho.PowerCables.PowerCable.UpdateAfterSimulation() [18:52:25] ERROR: System.NullReferenceException: Object reference not set to an instance of an object. at KlimeAndPsycho.Lib.GetClosestPlayer(List`1 PlayerList, Vector3D location) at KlimeAndPsycho.PowerCables.PowerCable.UpdateAfterSimulation() [18:52:25] ERROR: System.NullReferenceException: Object reference not set to an instance of an object. at KlimeAndPsycho.Lib.GetClosestPlayer(List`1 PlayerList, Vector3D location) at KlimeAndPsycho.PowerCables.PowerCable.UpdateAfterSimulation() [18:52:35] ERROR: System.NullReferenceException: Object reference not set to an instance of an object. at KlimeAndPsycho.Lib.GetClosestPlayer(List`1 PlayerList, Vector3D location) at KlimeAndPsycho.PowerCables.PowerCable.UpdateAfterSimulation() [18:52:35] ERROR: System.NullReferenceException: Object reference not set to an instance of an object. at KlimeAndPsycho.Lib.GetClosestPlayer(List`1 PlayerList, Vector3D location) at KlimeAndPsycho.PowerCables.PowerCable.UpdateAfterSimulation() [18:52:35] ERROR: System.NullReferenceException: Object reference not set to an instance of an object. at KlimeAndPsycho.Lib.GetClosestPlayer(List`1 PlayerList, Vector3D location) at KlimeAndPsycho.PowerCables.PowerCable.UpdateAfterSimulation() [18:52:35] ERROR: System.NullReferenceException: Object reference not set to an instance of an object. at KlimeAndPsycho.Lib.GetClosestPlayer(List`1 PlayerList, Vector3D location) at KlimeAndPsycho.PowerCables.PowerCable.UpdateAfterSimulation() [18:52:35] ERROR: System.NullReferenceException: Object reference not set to an instance of an object. at KlimeAndPsycho.Lib.GetClosestPlayer(List`1 PlayerList, Vector3D location) at KlimeAndPsycho.PowerCables.PowerCable.UpdateAfterSimulation() [18:52:35] ERROR: System.NullReferenceException: Object reference not set to an instance of an object. at KlimeAndPsycho.Lib.GetClosestPlayer(List`1 PlayerList, Vector3D location) at KlimeAndPsycho.PowerCables.PowerCable.UpdateAfterSimulation() [18:52:38] ERROR: System.NullReferenceException: Object reference not set to an instance of an object. at KlimeAndPsycho.Lib.GetClosestPlayer(List`1 PlayerList, Vector3D location) at KlimeAndPsycho.PowerCables.PowerCable.UpdateAfterSimulation() [18:52:38] ERROR: System.NullReferenceException: Object reference not set to an instance of an object. at KlimeAndPsycho.Lib.GetClosestPlayer(List`1 PlayerList, Vector3D location) at KlimeAndPsycho.PowerCables.PowerCable.UpdateAfterSimulation() [18:52:38] ERROR: System.NullReferenceException: Object reference not set to an instance of an object. at KlimeAndPsycho.Lib.GetClosestPlayer(List`1 PlayerList, Vector3D location) at KlimeAndPsycho.PowerCables.PowerCable.UpdateAfterSimulation() [18:52:38] ERROR: System.NullReferenceException: Object reference not set to an instance of an object. at KlimeAndPsycho.Lib.GetClosestPlayer(List`1 PlayerList, Vector3D location) at KlimeAndPsycho.PowerCables.PowerCable.UpdateAfterSimulation() [18:52:38] ERROR: System.NullReferenceException: Object reference not set to an instance of an object. at KlimeAndPsycho.Lib.GetClosestPlayer(List`1 PlayerList, Vector3D location) at KlimeAndPsycho.PowerCables.PowerCable.UpdateAfterSimulation() [18:52:38] ERROR: System.NullReferenceException: Object reference not set to an instance of an object. at KlimeAndPsycho.Lib.GetClosestPlayer(List`1 PlayerList, Vector3D location) at KlimeAndPsycho.PowerCables.PowerCable.UpdateAfterSimulation()
Last edited by Dumpshock; 8 Nov, 2021 @ 6:58pm
Dumpshock 8 Nov, 2021 @ 7:02pm 
If I read the code correctly, that part of the script governs visibility of the tethers, correct?

Seems to be trying to get the Vector distance of the player from a powerline to determine if it should be visible or not?
Faolon  [developer] 8 Nov, 2021 @ 11:29pm 
yes, it does appear that way, im still tearing this apart myself.

none the less i am unable to reproduce this error? would you by chance be up for discord sometime? or if you can make a clip/video? ive tried so hard to break it lol, but am unable to,
as far as i can tell, its this part of the script,


// Player distance check.
// Check if any players are nearby, otherwise don't draw cables, save some PC performance.
// Should expand this a bit further.
bool playerClose = true;
if (PlayerCount > 0)
{
double closestPlayerDistance = Lib.GetClosestPlayer(PlayerList, block.WorldMatrix.Translation);
if (closestPlayerDistance > 3000)
playerClose = false;
}
else
{
playerClose = false;
}

if (!MyAPIGateway.Utilities.IsDedicated && playerClose)
{
var drawCable = cable_vis;
var drawCableThickness = line_thickness;

if (block.BlockDefinition.SubtypeId == "ConveyorHoseAttachment" && ConnectedBlock.BlockDefinition.SubtypeId == "ConveyorHoseAttachment")
{
drawCable = cable_hose;
drawCableThickness = 0.15f;
}

MySimpleObjectDraw.DrawLine(startAttach, endAttach,
drawCable, ref col, drawCableThickness, BlendTypeEnum.PostPP);
}
}

tick++;
if (tick > ushort.MaxValue)
tick = 0;
}
catch (Exception e)
{
Log.Error(e);
}
}

gonna work on this more tomorrow, my brains fried today :)
although i do think i may have cables stop despawning in mp? i dunno, another test for tommorow. i will be opening a test branch of the mod soon, just for where i can shove rapid updates without cluttering the main.
Last edited by Faolon; 8 Nov, 2021 @ 11:31pm
Dumpshock 9 Nov, 2021 @ 9:25am 
Yeah, I would be down to get into a Discord chat with you.

Afraid not much to show in game on this. Can try to get a clip for you, but in game, the only observable indicator there's an issue is some text at boot, and now that I know what the code is doing, that powerlines might be visible for a bit further than they probably should be. :D

Yeah, that's the part that I came to as well when I did some digging. When I get a chance, I'll try it in a sandbox word just to be sure, but this could just simply be a mod conflict as well.
Dumpshock 9 Nov, 2021 @ 1:00pm 
Got a moment to look at it, and think I found the conflict.

Loaded up a test environment and after playing with my mod list, seems that the conflict is with AiEnabled.

Will try to look closer at it later.
Faolon  [developer] 9 Nov, 2021 @ 5:07pm 
ah, i see yeah, i saw a issue before with the robot mods.
GodsAnger 15 Nov, 2021 @ 11:47am 
2021-11-15 13:43:26.927 - Thread: 1 -> Exception occurred: System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Enumerator.MoveNext()
at VRage.Game.Components.MyComponentContainer.Serialize(Boolean copy)
at Sandbox.Game.Entities.MyCubeBlock.GetObjectBuilderCubeBlock(Boolean copy)
at Sandbox.Game.Entities.Cube.MyTerminalBlock.GetObjectBuilderCubeBlock(Boolean copy)
at Sandbox.Game.Entities.Cube.MySlimBlock.GetObjectBuilderInternal(Boolean copy)
at Sandbox.Game.Entities.MyCubeGrid.GetObjectBuilderInternal(MyObjectBuilder_CubeGrid ob, Boolean copy)
at Sandbox.Game.Entities.MyCubeGrid.GetObjectBuilder(Boolean copy)
at ttrcrwm.grid_logic..ctor(IMyCubeGrid new_grid)
at ttrcrwm.session_handler.on_entity_added(IMyEntity entity)
at System.Action`1.Invoke(T obj)
at Sandbox.Game.Entities.MyEntities.RaiseEntityAdd(MyEntity entity)
at Sandbox.Game.Entities.MyEntities.Add(MyEntity entity, Boolean insertIntoScene)
at Sandbox.Game.Entities.MyEntities.InitEntityData.OnEntityInitialized()
at Sandbox.MySandboxGame.ProcessInvoke()
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)
2021-11-15 13:43:26.930 - Thread: 1 -> Showing message


Using this version and the previous owner's version. Drag Tether block to bar and game crashes.

Single player on Earthlike
Last edited by GodsAnger; 15 Nov, 2021 @ 11:49am
Faolon  [developer] 15 Nov, 2021 @ 11:34pm 
GodsAnger, Are you able to consistently reproduce this? and if so, what specifically? which bar menu? what slot, etc, as im unable to reproduce this, but im assuming you meant hotbar? so im not sure?
Selphadur 16 Nov, 2021 @ 6:55am 
Game crashes when selecting Charging Station (as soon as you start to see holographic model, the one when you select block from toolbar). Here is the part of log when it crashes:
2021-11-16 16:52:58.211 - Thread: 1 -> Exception occurred: System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Enumerator.MoveNext()
at VRage.Game.Components.MyComponentContainer.Serialize(Boolean copy)
at Sandbox.Game.Entities.MyCubeBlock.GetObjectBuilderCubeBlock(Boolean copy)
at Sandbox.Game.Entities.Cube.MyTerminalBlock.GetObjectBuilderCubeBlock(Boolean copy)
at Sandbox.Game.Entities.Cube.MySlimBlock.GetObjectBuilderInternal(Boolean copy)
at Sandbox.Game.Entities.MyCubeGrid.GetObjectBuilderInternal(MyObjectBuilder_CubeGrid ob, Boolean copy)
at Sandbox.Game.Entities.MyCubeGrid.GetObjectBuilder(Boolean copy)
at ttrcrwm.grid_logic..ctor(IMyCubeGrid new_grid)
at ttrcrwm.session_handler.on_entity_added(IMyEntity entity)
at System.Action`1.Invoke(T obj)
at Sandbox.Game.Entities.MyEntities.RaiseEntityAdd(MyEntity entity)
at Sandbox.Game.Entities.MyEntities.Add(MyEntity entity, Boolean insertIntoScene)
at Sandbox.Game.Entities.MyEntities.InitEntityData.OnEntityInitialized()
at Sandbox.MySandboxGame.ProcessInvoke()
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)
2021-11-16 16:52:58.213 - Thread: 1 -> Showing message
2021-11-16 16:52:58.744 - Thread: 1 ->
================================== CRASH INFO ==================================
AppVersion: 01_199_025
GameName: Space Engineers
IsOutOfMemory: False
IsGPU: False
IsNative: False
IsTask: False
IsExperimental: True
ProcessRunTime: 194
PCUCount: 77272
IsHang: False
GCMemory: 3946
GCMemoryAllocated: 3946
HWAvailableMemory: 5439
ProcessPrivateMemory: 14097
AnalyticId: SE
================================== OFNI HSARC ==================================

2021-11-16 16:52:58.745 - Thread: 1 -> Log Closed
Selphadur 16 Nov, 2021 @ 6:56am 
I don't use any Tool Switcher mod, as described above and can 100% reproduce this crash.
Faolon  [developer] 16 Nov, 2021 @ 7:22am 
are you in a world with just this mod? im unable to recreate this, or if you can give me a list of mods you are using?
< >
Showing 1-15 of 82 comments
Per page: 1530 50