We are experiencing a problem with a plugin that, upon startup, sometimes generates this error in the Event Server’s log:
2019-08-06 1:19:45 PM UTC-07:00 Error Unobserved task exception Unobserved task exception: System.AggregateException: A Task’s exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread. —> VideoOS.Platform.MIPException: Unable to connect to EventServer.CommunicationService —> System.NullReferenceException: Object reference not set to an instance of an object.
at VideoOS.Platform.Messaging.Internal.CommunicationClientOnServer.InitSession()
— End of inner exception stack trace —
at VideoOS.Platform.Messaging.Internal.CommunicationClientOnServer.InitSession()
at VideoOS.Platform.Messaging.Internal.CommunicationClientOnServer.Transmit(Message message, FQID destinationEndPoint, FQID destinationObject, FQID sourceObject)
at VideoOS.Platform.Messaging.MessageCommunication.TransmitMessage(Message message, FQID destinationEndPoint, FQID destinationObject, FQID source)
at BoschPanel.Background.PanelConnectionBackgroundPlugin.d__15.MoveNext()
— End of inner exception stack trace —
- → (Inner Exception #0) VideoOS.Platform.MIPException: Unable to connect to EventServer.CommunicationService —> System.NullReferenceException: Object reference not set to an instance of an object.
at VideoOS.Platform.Messaging.Internal.CommunicationClientOnServer.InitSession()
— End of inner exception stack trace —
at VideoOS.Platform.Messaging.Internal.CommunicationClientOnServer.InitSession()
at VideoOS.Platform.Messaging.Internal.CommunicationClientOnServer.Transmit(Message message, FQID destinationEndPoint, FQID destinationObject, FQID sourceObject)
at VideoOS.Platform.Messaging.MessageCommunication.TransmitMessage(Message message, FQID destinationEndPoint, FQID destinationObject, FQID source)
at BoschPanel.Background.PanelConnectionBackgroundPlugin.d__15.MoveNext()<—
This error occurs at the start up of the Event Server and the very first time the plugin attempts to call VideoOS.Platform.Messaging.MessageCommunication.TransmitMessage() in response to handling a ConfigurationChanged event.
I suspect the problem may be a timing issue where some component has not been fully initialized or something and so a required object has not been instantiated which leads to the “Object reference not set to an instance of an object” message. The problem is, I can’t figure out which object reference is being referred to.
Any suggestions on how I can go about identifying the object in question?