FabioZumbi12 / SEDiscordBridge

A Torch plugin to connect the SE server to Discord
MIT License
13 stars 11 forks source link

Plugin crashes when trying to parse an incorrect @role mention, disables in-game chat, crashes clients who try to chat #14

Closed SplenectomY closed 5 years ago

SplenectomY commented 6 years ago

This one seems like a bit of a doozy. The plugin goes haywire and causes clients to crash when they try to chat. This all seemed to spawn from a user doing @admins (we have a discord group called @admin, so it was not the correct name).

17:19:38.8004 [INFO] Chat: Draconeran: @admins jump drive explosion mod is f'ed just separated a ship section to remodel it and the jump drive exploded 17:19:38.8784 [WARN] SEDicordBridge: Error on convert a member id to name on mention other players. 17:19:38.8784 [ERROR] Torch.Managers.NetworkManager: Error processing network event! System.NullReferenceException: Object reference not set to an instance of an object. at SEDiscordBridge.DiscordBridge.MentionNameToID(String msg, DiscordChannel chann) in D:\SpaceEngineersMod\TorchPlugins\SEDiscordBridge\SEDiscordBridge\DiscordBridge.cs:line 223 at SEDiscordBridge.DiscordBridge.SendChatMessage(String user, String msg) in D:\SpaceEngineersMod\TorchPlugins\SEDiscordBridge\SEDiscordBridge\DiscordBridge.cs:line 85 at SEDiscordBridge.SEDicordBridgePlugin.MessageRecieved(TorchChatMessage msg, Boolean& consumed) in D:\SpaceEngineersMod\TorchPlugins\SEDiscordBridge\SEDiscordBridge\SEDicordBridgePlugin.cs:line 76 at Torch.API.Managers.MessageRecievedDel.Invoke(TorchChatMessage msg, Boolean& consumed) at Torch.Managers.ChatManager.ChatManagerClient.RaiseMessageRecieved(TorchChatMessage msg) at Torch.Managers.ChatManager.ChatManagerClient.Multiplayer_ChatMessageReceived(UInt64 steamUserId, String message) at System.Action2.Invoke(T1 arg1, T2 arg2) at Sandbox.Engine.Multiplayer.MyMultiplayerBase.RaiseChatMessageReceived(UInt64 steamUserID, String messageText) at Sandbox.Engine.Multiplayer.MyDedicatedServer.OnChatMessage(ChatMsg& msg) at lambda_method(Closure , IMyEventOwner , ChatMsg , DBNull , DBNull , DBNull , DBNull , DBNull ) at VRage.Network.CallSite7.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, EndpointId source) at VRage.Network.MyReplicationLayer.OnEvent(MyPacketDataBitStreamBase data, NetworkId networkId, NetworkId blockedNetId, UInt32 eventId, EndpointId sender) at VRage.Network.MyReplicationLayer.ProcessEvent(MyPacketDataBitStreamBase data, EndpointId sender) at VRage.Network.MyReplicationLayer.OnEvent(MyPacket packet) at Torch.Managers.NetworkManager.OnEvent(MyPacket packet) 17:19:38.8894 [ERROR] Torch.Managers.NetworkManager: System.NullReferenceException: Object reference not set to an instance of an object. at SEDiscordBridge.DiscordBridge.MentionNameToID(String msg, DiscordChannel chann) in D:\SpaceEngineersMod\TorchPlugins\SEDiscordBridge\SEDiscordBridge\DiscordBridge.cs:line 223 at SEDiscordBridge.DiscordBridge.SendChatMessage(String user, String msg) in D:\SpaceEngineersMod\TorchPlugins\SEDiscordBridge\SEDiscordBridge\DiscordBridge.cs:line 85 at SEDiscordBridge.SEDicordBridgePlugin.MessageRecieved(TorchChatMessage msg, Boolean& consumed) in D:\SpaceEngineersMod\TorchPlugins\SEDiscordBridge\SEDiscordBridge\SEDicordBridgePlugin.cs:line 76 at Torch.API.Managers.MessageRecievedDel.Invoke(TorchChatMessage msg, Boolean& consumed) at Torch.Managers.ChatManager.ChatManagerClient.RaiseMessageRecieved(TorchChatMessage msg) at Torch.Managers.ChatManager.ChatManagerClient.Multiplayer_ChatMessageReceived(UInt64 steamUserId, String message) at System.Action2.Invoke(T1 arg1, T2 arg2) at Sandbox.Engine.Multiplayer.MyMultiplayerBase.RaiseChatMessageReceived(UInt64 steamUserID, String messageText) at Sandbox.Engine.Multiplayer.MyDedicatedServer.OnChatMessage(ChatMsg& msg) at lambda_method(Closure , IMyEventOwner , ChatMsg , DBNull , DBNull , DBNull , DBNull , DBNull ) at VRage.Network.CallSite7.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, EndpointId source) at VRage.Network.MyReplicationLayer.OnEvent(MyPacketDataBitStreamBase data, NetworkId networkId, NetworkId blockedNetId, UInt32 eventId, EndpointId sender) at VRage.Network.MyReplicationLayer.ProcessEvent(MyPacketDataBitStreamBase data, EndpointId sender) at VRage.Network.MyReplicationLayer.OnEvent(MyPacket packet) at Torch.Managers.NetworkManager.OnEvent(MyPacket packet) System.NullReferenceException: Object reference not set to an instance of an object. at SEDiscordBridge.DiscordBridge.MentionNameToID(String msg, DiscordChannel chann) in D:\SpaceEngineersMod\TorchPlugins\SEDiscordBridge\SEDiscordBridge\DiscordBridge.cs:line 223 at SEDiscordBridge.DiscordBridge.SendChatMessage(String user, String msg) in D:\SpaceEngineersMod\TorchPlugins\SEDiscordBridge\SEDiscordBridge\DiscordBridge.cs:line 85 at SEDiscordBridge.SEDicordBridgePlugin.MessageRecieved(TorchChatMessage msg, Boolean& consumed) in D:\SpaceEngineersMod\TorchPlugins\SEDiscordBridge\SEDiscordBridge\SEDicordBridgePlugin.cs:line 76 at Torch.API.Managers.MessageRecievedDel.Invoke(TorchChatMessage msg, Boolean& consumed) at Torch.Managers.ChatManager.ChatManagerClient.RaiseMessageRecieved(TorchChatMessage msg) at Torch.Managers.ChatManager.ChatManagerClient.Multiplayer_ChatMessageReceived(UInt64 steamUserId, String message) at System.Action2.Invoke(T1 arg1, T2 arg2) at Sandbox.Engine.Multiplayer.MyMultiplayerBase.RaiseChatMessageReceived(UInt64 steamUserID, String messageText) at Sandbox.Engine.Multiplayer.MyDedicatedServer.OnChatMessage(ChatMsg& msg) at lambda_method(Closure , IMyEventOwner , ChatMsg , DBNull , DBNull , DBNull , DBNull , DBNull ) at VRage.Network.CallSite7.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, EndpointId source) at VRage.Network.MyReplicationLayer.OnEvent(MyPacketDataBitStreamBase data, NetworkId networkId, NetworkId blockedNetId, UInt32 eventId, EndpointId sender) at VRage.Network.MyReplicationLayer.ProcessEvent(MyPacketDataBitStreamBase data, EndpointId sender) at VRage.Network.MyReplicationLayer.OnEvent(MyPacket packet) at Torch.Managers.NetworkManager.OnEvent(MyPacket packet) 17:19:38.8894 [ERROR] Keen: System.NullReferenceException: Object reference not set to an instance of an object. at SEDiscordBridge.DiscordBridge.MentionNameToID(String msg, DiscordChannel chann) in D:\SpaceEngineersMod\TorchPlugins\SEDiscordBridge\SEDiscordBridge\DiscordBridge.cs:line 223 at SEDiscordBridge.DiscordBridge.SendChatMessage(String user, String msg) in D:\SpaceEngineersMod\TorchPlugins\SEDiscordBridge\SEDiscordBridge\DiscordBridge.cs:line 85 at SEDiscordBridge.SEDicordBridgePlugin.MessageRecieved(TorchChatMessage msg, Boolean& consumed) in D:\SpaceEngineersMod\TorchPlugins\SEDiscordBridge\SEDiscordBridge\SEDicordBridgePlugin.cs:line 76 at Torch.API.Managers.MessageRecievedDel.Invoke(TorchChatMessage msg, Boolean& consumed) at Torch.Managers.ChatManager.ChatManagerClient.RaiseMessageRecieved(TorchChatMessage msg) at Torch.Managers.ChatManager.ChatManagerClient.Multiplayer_ChatMessageReceived(UInt64 steamUserId, String message) at System.Action2.Invoke(T1 arg1, T2 arg2) at Sandbox.Engine.Multiplayer.MyMultiplayerBase.RaiseChatMessageReceived(UInt64 steamUserID, String messageText) at Sandbox.Engine.Multiplayer.MyDedicatedServer.OnChatMessage(ChatMsg& msg) at lambda_method(Closure , IMyEventOwner , ChatMsg , DBNull , DBNull , DBNull , DBNull , DBNull ) at VRage.Network.CallSite7.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, EndpointId source) at VRage.Network.MyReplicationLayer.OnEvent(MyPacketDataBitStreamBase data, NetworkId networkId, NetworkId blockedNetId, UInt32 eventId, EndpointId sender) at VRage.Network.MyReplicationLayer.ProcessEvent(MyPacketDataBitStreamBase data, EndpointId sender) at VRage.Network.MyReplicationLayer.OnEvent(MyPacket packet) at Torch.Managers.NetworkManager.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) System.NullReferenceException: Object reference not set to an instance of an object. at SEDiscordBridge.DiscordBridge.MentionNameToID(String msg, DiscordChannel chann) in D:\SpaceEngineersMod\TorchPlugins\SEDiscordBridge\SEDiscordBridge\DiscordBridge.cs:line 223 at SEDiscordBridge.DiscordBridge.SendChatMessage(String user, String msg) in D:\SpaceEngineersMod\TorchPlugins\SEDiscordBridge\SEDiscordBridge\DiscordBridge.cs:line 85 at SEDiscordBridge.SEDicordBridgePlugin.MessageRecieved(TorchChatMessage msg, Boolean& consumed) in D:\SpaceEngineersMod\TorchPlugins\SEDiscordBridge\SEDiscordBridge\SEDicordBridgePlugin.cs:line 76 at Torch.API.Managers.MessageRecievedDel.Invoke(TorchChatMessage msg, Boolean& consumed) at Torch.Managers.ChatManager.ChatManagerClient.RaiseMessageRecieved(TorchChatMessage msg) at Torch.Managers.ChatManager.ChatManagerClient.Multiplayer_ChatMessageReceived(UInt64 steamUserId, String message) at System.Action2.Invoke(T1 arg1, T2 arg2) at Sandbox.Engine.Multiplayer.MyMultiplayerBase.RaiseChatMessageReceived(UInt64 steamUserID, String messageText) at Sandbox.Engine.Multiplayer.MyDedicatedServer.OnChatMessage(ChatMsg& msg) at lambda_method(Closure , IMyEventOwner , ChatMsg , DBNull , DBNull , DBNull , DBNull , DBNull ) at VRage.Network.CallSite7.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, EndpointId source) at VRage.Network.MyReplicationLayer.OnEvent(MyPacketDataBitStreamBase data, NetworkId networkId, NetworkId blockedNetId, UInt32 eventId, EndpointId sender) at VRage.Network.MyReplicationLayer.ProcessEvent(MyPacketDataBitStreamBase data, EndpointId sender) at VRage.Network.MyReplicationLayer.OnEvent(MyPacket packet) at Torch.Managers.NetworkManager.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)

FabioZumbi12 commented 5 years ago

Not happening on latest builds.