Log4OM Communicator error

Yes, sometimes it happens... Please report any bugs here
Locked
KC8P
Novice Class
Posts: 17
Joined: 12 Sep 2014, 15:11

Log4OM Communicator error

Post by KC8P »

Hello,

OS: Windows 8.1

The Log4OM is giving me the error after a few hours of working and stop the service. Can you help?


2014-09-15 22:24:41.2685 ERROR: *** TCPClientManager: Error reading from socket: [SerializationException] Binary stream '0' does not contain a valid BinaryHeader. Possible causes are invalid stream or object version change between serialization and deserialization. ******* [Function: ClientSocket_PacketArrived] System.Runtime.Serialization.SerializationException: Binary stream '0' does not contain a valid BinaryHeader. Possible causes are invalid stream or object version change between serialization and deserialization.
at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.Run()
at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
at Messages.Util.Deserialize(Byte[] binaryObject)
at Log4OmCommunicator.TCPClient.TCPClientManager.ClientSocket_PacketArrived(AsyncResultEventArgs`1 e)
2014-09-15 22:24:41.2875 ERROR: *** TCPClientManager: Socket error during Read: [SocketException] A request to send or receive data was disallowed because the socket is not connected and (when sending on a datagram socket using a sendto call) no address was supplied

Thanks
Mario
KC8P
User avatar
IW3HMH
Site Admin
Posts: 2926
Joined: 21 Jan 2013, 14:20
Location: Quarto d'Altino - Venezia (ITA)
Contact:

Re: Log4OM Communicator error

Post by IW3HMH »

Hi Mario, it seems your TCP socket received a spurious packet from somewhere. I never had this kind of exception before, and code is safely build. This means that if an exception is received on TCP connection, and log4om is not able to deserialize the informations, the error is raised and the socket is disconnected.

Now i'm applying a more "rugged" approach, keeping connection open even in the case of a bad package is received (i'm logging the bad package if Log4OM communicator is running in debug mode). So, in the next release, you should not experience disconnections but if possible check for the log file for issues when you remember to do that. Starting from new release I can log and see what is the object that raised the issue.

Thanks for reporting!

73
Daniele IW3HMH
Daniele Pistollato - IW3HMH
KC8P
Novice Class
Posts: 17
Joined: 12 Sep 2014, 15:11

Re: Log4OM Communicator error

Post by KC8P »

Daniele,

First, thank for all your effort! The whole app is exceptional....I tried a many different loggers....but Log4OM is the complete solution and works well! In addition in every release you make improvements!

I'll monitor the log in the new release and let you know about any errors.

Thanks
KC8P
Locked