Applies To:
  • CitectSCADA 5.20, 5.21, 5.30, 5.31, 5.40

CTAPI can deadlock on a ctClose when both the Citect server and the ctApi application are running on the same system. A symptom of the problem is that the error message "ERROR - File (I:\CIT540\SpkB\Source\api\dll\SYNC.C) Line(302) - Deadlock detected" will appear on the server's screen and subsequent ctOpen calls made by the client application fail after timing out.

This problem only occurs when a large number of ctOpen / ctClose's are being submitted and the ctOpen call provides no computer name.


A workaround to this problem is available. When a ctOpen call provides no computer name, ctApi uses system memory for communication between the client and the server. The problem may be avoided by not using this method of communication. ctApi can be forced to use TCP/IP as the transport by specifying a computer name of "localhost" in the ctOpen call.

Note that for TCP/IP (remote) access, the [CTAPI]Remote parameter must be set to 1 on the remote Citect computer. This setting is the default.

CIT has confirmed this to be a problem in Citect for Windows version 5.20 to 5.40. We are researching this problem and will post new information here as it becomes available.