LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

"tcp callback causes application to hang"

"At times, I am receiving TCP_DATAREADY events constantly from the TCP server without any data being sent. This happens when the client gets disconnected and re-establishes a connection without the server being restarted. CVI goes inot the TCP callback loop and keeps calling it telling it that data is ready. This causes my application to stall from several seconds to several minutes. Sometimes it requires a system reboot. It occupies over 95% of the CPU time. I cannot ignore these data ready flags. My application is time critical so I am reluctant to add the ProcessSystemsEvents() function to the callback which may slow down my application. This was suggested as a solution for a similar post. It did not state if this solution work
ed and I fail to see how it would solve this problem. Any ideas?"
Message 1 of 2
(3,157 Views)
Hi !

I have a similar problem with my tcp callback. My application receives tcp data in the background and updates the userinterface.
The software is used 24 hours a day.
The problem (application hang ... Category 101) occurs on some machines one or two times a month. I tested a lot of things like calling ProcessSystemEvents(),set sleep policy,.... , and so on, but it did not solve the problem.

What I found is:
1.) The problem does not exist on NT4.0 machines. (Reading bytewise from the receive buffer is not a problem for NT4.0) (On XP systems only blockwise read from the receive buffer works.
2.) If I use slower machines, the problem exists more.
3.) The used OS is Windows XP-> the problem exists on SP1 ore SP2
4.) The data server (sender) is a linux or a OS9 system.

I would by very happy if someone has a idea!

Mike
0 Kudos
Message 2 of 2
(3,138 Views)