Corporate 2023R3 with latest hotfixes
In the Smart Client, we are sending a message to a custom service application every second.
We do not have any code running in the Event Server.
The class we are sending through MIP comms looks like this:
[Serializable]
public class XProtectCommand
{
public XProtectCommand() { }
public EndPointIdentityData Source;
public string Entry; //Can be any Serializable data
public string EntryType; //Can be any Serializable data
}
And we serialize several different classes to JSON and put it in the Entry:
internal static void SendCommandToMapService(Command cmd)
{
try
{
Debug.WriteLine($"Sending {cmd} {cmd.GetType()}");
var settings = new JsonSerializerSettings()
{
ReferenceLoopHandling = ReferenceLoopHandling.Serialize,
PreserveReferencesHandling = PreserveReferencesHandling.All,
};
XProtectCommand data = new XProtectCommand()
{
Source = new EndPointIdentityData()
{
IdentityName = Command.SourceIdSmartClient,
EndPointFQID = MessageCommunicationManager.EndPointFQID
},
Entry = Command.Serialize(cmd, settings),
EntryType = cmd.GetType().AssemblyQualifiedName,
};
Instance._messageCommunication.TransmitMessage(new VideoOS.Platform.Messaging.Message(Command.MessageIdMapsCmdLine, data), null, null, null);
Logger.Log("Sending command: " + cmd.ToString());
}
catch (Exception)
{
Logger.Log(" (unable to send)");
}
}
The code works fine, we are able to get our data in the service application, but when the Smart Client is open, the MIP logs keep logging this error multiple times per second and it fills up the disk.
The error complains about a parameter named “type” which is NULL, but I have no idea why it is NULL or why the Event Server is trying to deserialize it.
2024-03-27 11:15:02.928+00:00 [ 137] ERROR - ExtenalMessage.Deserialize Unable to deserialize class:ORBNETMapsPlugin.Comms.XProtectCommand, ORBNETMapsPlugin, Version=1.0.3.27663, Culture=neutral, PublicKeyToken=null, Exception:Value cannot be null.
Parameter name: type
2024-03-27 11:15:02.934+00:00 [ 119] ERROR - ExtenalMessage.Deserialize Unable to deserialize class:ORBNETMapsPlugin.Comms.XProtectCommand, ORBNETMapsPlugin, Version=1.0.3.27663, Culture=neutral, PublicKeyToken=null, Exception:Value cannot be null.
Parameter name: type
2024-03-27 11:15:02.935+00:00 [ 97] ERROR - ExtenalMessage.Deserialize Unable to deserialize class:ORBNETMapsPlugin.Comms.XProtectCommand, ORBNETMapsPlugin, Version=1.0.3.27663, Culture=neutral, PublicKeyToken=null, Exception:Value cannot be null.
Parameter name: type
We have been using this technique for a long time, and I think the error only starting appearing since 2023R3.
