Space Engineers

Space Engineers

Paint Gun - realistic painting for survival + special creative features
Sny 7 Mar, 2021 @ 7:58pm
ArgumentOutOfRangeException from vanilla paint pallette while paingun mod is loaded
Getting an error while using the p menu (non-paint gun) on a server with the paint gun mod loaded (and no paint gun in inventory).

21:48:21.2878 [ERROR] Keen: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
at Sandbox.Game.World.MyPlayer.SetBuildColorSlots(List`1 newColors)
at Sandbox.Game.Multiplayer.MyPlayerCollection.OnPlayerColorsChangedRequest(Int32 serialId, List`1 newColors)
at VRage.Network.CallSite`7.Invoke(BitStream stream, Object obj, Boolean validate)
at VRage.Network.MyReplicationLayer.Invoke(CallSite callSite, BitStream stream, Object obj, EndpointId source, MyClientStateBase clientState, Boolean validate)
at VRage.Network.MyReplicationServer.OnEvent(MyPacketDataBitStreamBase data, CallSite site, Object obj, IMyNetObject sendAs, Nullable`1 position, EndpointId source)
at VRage.Network.MyReplicationLayer.OnEvent(MyPacketDataBitStreamBase data, NetworkId networkId, NetworkId blockedNetId, UInt32 eventId, EndpointId sender, Nullable`1 position)
at VRage.Network.MyReplicationLayer.ProcessEvent(MyPacketDataBitStreamBase data, EndpointId sender)
at VRage.Network.MyReplicationLayer.OnEvent(MyPacket packet)
at Sandbox.Engine.Multiplayer.MyTransportLayer.ProcessMessage(MyPacket p)
at Sandbox.Engine.Multiplayer.MyTransportLayer.HandleMessage(MyPacket p)
at Sandbox.Engine.Networking.MyReceiveQueue.Process(NetworkMessageDelegate handler)

removing the paint gun mod clears the problem.

Not every player has this problem. The player impacted is kicked out (to menu) and can log back in, but often times will be kicked right back out when building something or pressing p.

Any thoughts?
< >
Showing 1-4 of 4 comments
Digi  [developer] 8 Mar, 2021 @ 2:38am 
Can you upload the world's Sandbox.sbc and the names of the players you know crashed so I can see if there's something weird with their saved palettes in that file and test them on myself too.
Sny 8 Mar, 2021 @ 7:55am 
https://nc.damocles.com:4444/index.php/s/nN8BRYpxwQPSzLi

That's the backup from around the time I was able to reproduce it (Sny)
Soon after I asked another player to test and got the same results (sPiNdRy)
sPiNdRy had never used the paint gun, which is odd. I rarely use it, but I had just grabbed one for a trouble spot I was working on (which worked fine, great mod btw!) and after I'd put it away to go do something else I wanted to change the default color of the blocks I was placing down and was kicked. I then proceeded to do it over and over again like an angry bee trying to get through a screendoor...
Earlier in the day Upholder was getting the same error/kicked repeatedly.

Some additional information:

I'm running via Torch for what it's worth and I preserved other backups around that time.

Restarting the client did not resolve. After a server restart the problem went away. But this has happened randomly over the last few days (daily server restarts).

The error could be reproduced by hitting p and picking any color or texture and clicking ok.

Thanks for taking a look at this, and let me know if I can provide any more info.

Digi  [developer] 1 Apr, 2021 @ 4:26am 
Is this still happening? I still have no idea what causes it and couldn't replicate it myself :/

EDIT: I've added some checks when I'm giving a list of colors to the game to both ensure it's not smaller/larger and also to log these findings as errors, hopefully it will unmask the cause.
So next time this happens to a player, check the player's log and server log too.
Last edited by Digi; 1 Apr, 2021 @ 6:47am
Sny 10 Apr, 2021 @ 10:44am 
Thanks, I'll keep an eye out for it and let you know. So far so good.
< >
Showing 1-4 of 4 comments
Per page: 1530 50