Jump to content

Recommended Posts

Hello,

 

Can the ICS logger log all data sent/received? All "LogOptions" enabled, no data bytes. 

TIcsLoggerVersion   = 840;

 

Thanks,

 

Mark

Share this post


Link to post

Generally no, TIcsLogger is a framework to implement diagnostic logging in ICS components, what is logged depends on the implementation in each different component.  But rarely is rfeceived or sent data logged, due to the sheer volume.  

 

But logging actual data is generally easy, most components have events that can be used.

 

Angus

 

Share this post


Link to post

Thanks for the answer.

 

That was the conclusion I came to looking around in code.

I am using TWSocket and I have created a bunch of generic logging code before so I will copy/paste/modify to get some data logging with DoDebugLog.

 

The logging is only temporary.

 

The problem.

Using Wireshark the data from/to the sending and receiving computers match.

The program works on W7 32 bit and 64 bit.

The program works on W10 64 bit.

The program has what appears to be data stream corruption issues on W10 32 bit. The data in Wireshark is correct.

No development tools on W10 32 bit so I thought logging the stream from TWSocket.DataAvaliable would at least tell me the problem was before or after this event.

All binary data and I am not using NativeInt.

The packet size is < 200 bytes.

 

Mark

Share this post


Link to post

Usually, this kind of corruption comes from calling the message pump from TWSocket.OnDataAvailable event handler. The call can be indirect, that is message pump called inside a function which is called from OnDataAvailable event handler. Many component incorrectly call the message pump, so be careful when using such component.

The solution is usually found in using a custom message posted to trigger the processing with the data.

 

Share this post


Link to post

Thanks for the reply.

It actually was a logic mistake in the OnDataAvailable event handler

In the event I only read the data to a buffer, check a few things and then possibly post a message for handling, then exit.

The issue was a message was posted when it should not have been.

I have to thank W10 Pro 32 bit for exposing the issue.

Why the three other test operating systems did not expose the issue,.. not sure. The code had been running for years.

Perhaps the mistake surfaced because the OS and program were running in a VM.

 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×