Kbase P4657: An OCX that disturbs the socket/TCP layer of a 4GL session i
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  05/12/2003 |
|
Status: Unverified
FACT(s) (Environment):
Progress 9.1X
SYMPTOM(s):
Fatal transport failure <error_code>. (5487)
Use of an ActiveX that is working with the socket layer
Fatal transport failure 20. (5487)
** Incomplete write when writing to the server. (735)
The session is a remotely connected (client server) to a Progress Database
socket layer of a 4GL session is disturbed by an OCX
CAUSE:
Bug# 20020715-001
CAUSE:
This problem was first considered as a Bug and is actually now considered as not being due to Progress, but to the OCX itself.
An OCX that uses the socket layer in a non compliant way with Windows requirements can disturb the socket/TCP layer of a 4GL session, such as client server connections to Progress Databases through the TCP local loop.
<Here the original feedback from development>
I'm pretty sure this is a bug in the control itself. Here's some background and then what is happening in this example.
On Windows, it is required that in order to use sockets the application calls the system function WSAStartup. When sockets are no longer needed, the app should call WSACleanup. WSAStartup can be called multiple times, but each time the system adds one to a use count. And each call to WSACleanup will delete one from the use count. A properly written app will have a matching number of calls to WSAStartup and WSACleanup. Once the use count goes to 0, socket usage is disabled.
When Progress is in client-server mode, it calls WSAStartup during startup and it calls WSACleanup when it is shut down.
Now, when we first load this .w, the control is created and the control itself calls WSAStartup since it knows it needs to use sockets in its implementation.
When we close the .w, the control calls WSACleanup because it is done with its
socket usage. This is fine, as we are still left with a use count of 1 from Progress's call. However the 2nd time we load the .w, we go thought the same sequence to create the control, but this time the control does NOT call WSAStartup. However, when we close the .w, the control DOES call WSACleanup.
This causes the use count to go to 0 and socket activity is disabled.
Therefore, the next time Progress goes to send a message to the DB server, it
gets an error.
</Here the original feedback from development>
FIX:
Discuss this with the OCX vendor. The vendor should be able to confirm or deny the explanation given above by examining their code.
If you cannot obtain a Windows compliant version of your OCX, then you shall consider to avoid to involve the socket layer in the Progress session, such as using a shared memory connection rather than Client Server connection through the TCP local loop