Applies To:
  • CitectSCADA 6.XX
  • CitectHMI 6.XX

An exception occurred after I ran the following Cicode commands in the kernel: ClusterSetName(“IOSec”, “”, 1)
then after a approx 10 secs – the client did switch server.

The first call to: ClusterSetName(“IOSec”, “”, 1); is causing the problem.

There are two global strings used in the code called SerPriName and SerSecName.

If you call ClusterSetName with an empty string for either the primary or secondary parameters then that global variable is set to NULL.
When the next call to ClusterSetName comes along it checks the new cluster name against the current name using strcmp. Unfortunately if you pass NULL to strcmp it crashes.

Citect has confirmed this to be a problem in CitectHMI/SCADA version 6.XX. We are researching this problem and will post new information here as it becomes available.

As a workaround for simply make sure that you actually specify a non-empty string for both sPrimary and Secondary whenever ClusterSetName is called.