Disconnecting: Exception at CommunityEntity.CreateComponentsFixed

Firstly, Thanks for all your hard work on this Joe90 !

Have another issue sorry, I've done a server wipe today and installed the newest version and have noticed that a few users have been kicked off when trying to open the sync menu. Seems to be at random, one pipe will kick anyone who tries to open the pipe menu.
(This is from a quarry to a large wooden box and the pipe has been upgraded to HQM)

This is the info i can see in the logs when it happens

(20:47:00) | IP/STEAMID/STEAMUSERNAME disconnecting: Exception (cs:56130): 
NullReferenceException: Object reference not set to an instance of an object. 
JSON.Object.GetString (System.String key, System.String strDEFAULT) (at <00000000000000000000000000000000>:0) 
CommunityEntity.CreateComponents (UnityEngine.GameObject go, JSON.Object obj) (at <00000000000000000000000000000000>:0) 
CommunityEntity.AddUI (BaseEntity+RPCMessage msg) (at <00000000000000000000000000000000>:0) 
CommunityEntity.OnRpcMessage (BasePlayer player, System.UInt32 rpc, Network.Message msg) (at <00000000000000000000000000000000>:0) 
BaseEntity.CL_RPCMessage (System.UInt32 nameID, System.UInt64 sourceConnection, Network.Message message) (at <00000000000000000000000000000000>:0) 
Client.OnRPCMessage (Network.Message packet) (at <00000000000000000000000000000000>:0) 
Client.OnNetworkMessage (Network.Message packet) (at <00000000000000000000000000000000>:0) 
Facepunch.Network.Raknet.Client.HandleMessage () (at <00000000000000000000000000000000>:0) 
Facepunch.Network.Raknet.Client.Cycle () (at <00000000000000000000000000000000>:0) 
Client.Update () (at <00000000000000000000000000000000>:0) 
UnityEngine.Debug:LogException(Exception) 
CommunityEntity:OnRpcMessage(BasePlayer, UInt32, Message) 
BaseEntity:CL_RPCMessage(UInt32, UInt64, Message) 
Client:OnRPCMessage(Message) Client:OnNetworkMessage(Message) 
Facepunch.Network.Raknet.Client:HandleMessage() 
Facepunch.Network.Raknet.Client:Cycle() Client:Update()
Very odd.
If you re-create the pipe do players still get kicked?
Just trying to work out if the null exception is coming from the containers or the pipe.

Heya! When a player has both a (quarry/pump) and a (box) and tries to connect them, he will get DC'd out of the server. The way he is trying to set it up is as follows:

Start a pipe at the (box), connect it to the (quarry/pump), then reverse the flow so the resources flow from the (quary/pump) to the (box). 

The other way around works perfectly fine if you would follow the normal desired flow of resources. 

The error message we're seeing in console is as follows:

disconnecting: Exception (cs:57431): NullReferenceException: Object reference not set to an instance of an object. JSON.Object.GetString (System.String key, System.String strDEFAULT) (at < >:0) CommunityEntity.CreateComponents (UnityEngine.GameObject go, JSON.Object obj) (at <00000000000000000000000000000000>: CommunityEntity.AddUI (BaseEntity+RPCMessage msg) (at < >.0) CommunityEntity.0nRpcMessage (BasePlayer player, System.UInt32 rpc, Network.Message msg) (at <0000 000000000000000000000000000>:0) BaseEntity.CL_RPCMessage (System.UInt32 namelD, System.UInt64 sourceConnection, Network.Message message) (at <0 >:0) Client.OnRPCM -ssage (Network.Message packet) (at <00000000000000000000000000000000>:0) Client.OnNetworkMessage (Network.Message packet) (at <00000000000000000000000000000000>:0) Facepunch Network.Raknet.Cli -nt.HandleMessage () (at <0000004343000000000000000000000000>:0) Facepunch.Network.Raknet.Client.Cycle () (at <000000000000043434343000000000000000>.0) Client.Update () (at <0000000000000000000000000  >:0) UnityEngine.Debug.LogException(Exception) CommunityEntity:OnRpcMessage(BasePlayer, UInt32, Message) BaseEntity:CL_RPCMessage(UInt32, UInt64, Message) Client:OnRPCMessage(Message) Cl ;ent:OnNetworkMessage(Message) Facepunch.Network.Raknet.Client:HandleMessage() Facepunch.Network.Raknet.Client:Cycle() Client:Update() [Tebex Donate] Attempting to log all stored connection events... 

Please let me know if you need any further information when looking into this :)

This has been reported once before but I couldn't get any more info from them and couldn't replicate. 
Thanks for the detailed info, I will attempt to replicate on my test server.

Amazing response time man, appreciate it! We've just received another player reporting the same error. If his reason is any different from what stated above, I will add these aswell :)
Here's the next scenario:

1. Place an oil refinery and a pumpjack.

2. Pipe them together, starting from the oil refinery.

3. Try to upgrade the pipe.

 

Slightly different, but still a very similar scenario

Exception (cs:57450): NullReferenceException: Object reference not set to an instance of an object. JSON.Object.GetString (System.String key, System.String strDEFAULT) (at <00000000000000000000000000000000>:0) CommunityEntity.CreateComponents (UnityEngine.GameObject go, JSON.Object obj) (at <00000000000000000000000000000000>:0) CommunityEntity.AddUI (BaseEntity+RPCMessage msg) (at <00000000000000000000000000000000>:0) CommunityEntity.OnRpcMessage (BasePlayer player, System.UInt32 rpc, Network.Message msg) (at <00000000000000000000000000000000>:0) BaseEntity.CL_RPCMessage (System.UInt32 nameID, System.UInt64 sourceConnection, Network.Message message) (at <00000000000000000000000000000000>:0) Client.OnRPCMessage (Network.Message packet) (at <00000000000000000000000000000000>:0) Client.OnNetworkMessage (Network.Message packet) (at <00000000000000000000000000000000>:0) Facepunch.Network.Raknet.Client.HandleMessage () (at <00000000000000000000000000000000>:0) Facepunch.Network.Raknet.Client.Cycle () (at <00000000000000000000000000000000>:0) Client.Update () (at <00000000000000000000000000000000>:0) UnityEngine.Debug:LogException(Exception) CommunityEntity:OnRpcMessage(BasePlayer, UInt32, Message) BaseEntity:CL_RPCMessage(UInt32, UInt64, Message) Client:OnRPCMessage(Message) Client:OnNetworkMessage(Message) Facepunch.Network.Raknet.Client:HandleMessage() Facepunch.Network.Raknet.Client:Cycle() Client:Update()
This is also happening from a Quarry/Pumpjack to a TC. A good test-run is to just repeatedly smack the pipe like you're repairing it. Seems like between 3 and 5 swings in it does it for us.
Managed to replcate. Now to find why...

Merged post

Found it. Connecting a pipe flowing to the output of the quarry/pumpjack was trying to show the autostart options (which are only available on the inputs)

Corrected that and released a new update v0.9.11

I'm by no means a coder, but from what I understood from the plugin, you've got an autostart system that only works if the start of the flow is a quarry/jack/oven. 

            /// Should the pipe attempt to auto-start the destination container of the pipe.
            /// Must be and Oven, Recycler or Quarry/Pump Jack

From both my own and shark's explanation, I'm guessing that the flow doesn't autostart in case the pipe is created from box/tc > pump/quary/oven. (as this is a reversed natural flow, doesn't make much sense).

The moment a player places this pipe, he doesn't get kicked, as the autostart isn't triggered. 

When interacting with the pipe (upgrading, repairing, reversing the flow etc), maybe another system is called that bypasses the autostart?

Merged post

Lol right, you posted the fix as i was typing xD tyvm for the quick inputs and fixes. I'll get the update on our live servers and confirm that it works as intended.
Joe90 the Pipe God! :)
Locked automatically