05-14-2014 07:16 AM
Hi,
I have a service request running with this one but I wondered if you could try to reproduce the issue as NI has so far been unable to reproduce it. I have attached the sample code. I have made a screencapture but that seems too large to upload. I will try to get the size down.
When trying to open a tcp listener on a port which an external application is already trying to connect to while the software is starting up this will result in an error 62 when waiting on the listener. The wait is not going to wait the defined timeout. Surprisingly though even though the listen vi seems to get bypassed without waiting it will pick up a connection if the external application tries to connect and will accept the data without fault.
This is a problem with potentially catastrophic result as the correct behaviour of the application relies on the mercy of the sender not trying to connect while the software is starting up.
I have tested the behaviour on a sb-rio 9605 and a crio 9074 (example attached)
I have tried on LV2012 and 2013 with August and February drivers.
Steps To Reproduce :
Please look at attached examples. Adjust the the ip address of your target both in the project and in the client vi. First run the server vi and then start the client vi. The interesting output can be seen on the server front panel. You will see expected behaviour in that the iteration counter goes up when the listener times out or gets a connection. The transmission indicator goes up when a connection is established. Now stop the server by pressing the stop button and relaunch it. This way the client is already running and trying to open connections while the software starts up. You will see the iteration counter erratically go up and the transmission indicator go up when ever the client tries to connect.
Source of problem:
I have now pinned the problem down to the "create listener". It seems that a "corrupted" listener gets created when the network buffer is not empty. The listener gets created without error and works when there is an inbound connection but shows the erroneous behaviour when nothing is coming in. The problem can get worked around by closing and re-opening the listener in case of an error 62.
looking forward to your feedback
best regards
Mathis
CLD
05-14-2014 07:37 AM - edited 05-14-2014 07:37 AM
ok, it doesn't seem to be possible to attach a video.
Interesting to note. I can "disturb" the listener by adding a probe. The host will need to send some information over to the rio to make it start the streaming of the probed value. This transmissions seems to "magically" reset the listener, returninbg it to its normal behaviour.
05-15-2014 10:07 AM
Another attempt on uploading that video. This time wrapped in a zip file ...