Applies To:
  • CitectSCADA x.x

Summary:

Question: When I shutdown Citect I get the error message:

File (I:\CIT521\SPKC\source\display\ct_ep.c) Line (256)
Error StrReg corrupted with ' '

What is the cause of this error message and how can I fix it?

 

Solution:

This error message means Citect has detected a corruption in the String Register used for cicode string operations. This has been caused by some string operation during the running of Citect. This error is only detected on shutdown when Citect sees if the string register may have become corrupted. This error could mean that part of your system has become corrupted. The cause of the problem must be fixed as your system will be unstable.

The StrReg is a global string buffer of 255 characters which is used for all of the cicode string operations, the StrXXXX functions and other functions which return strings. The StrReg is used as a temp storage for the padded string before it is copied into the 'result' string. What is causing the problem is that there is some string type cicode function which is not chopping the string off at 255 characters.

We need to find out which cicode function it is causing the problem. Once we know which cicode function it is, it's a very simple fix. One clue is that the error message box displays what the corrupted data is.

We can narrow down the search by starting up Citect and then shutting down before the suspect cicode is executed (so we will not generate the message). Then run the cicode and verify that we do get the message on shutdown.

The alternate debug method depends on the O/S and version of Citect.

1. For 16 bit Citect versions use this method;

To find the cause of the corruption you should install DrWatson and enable the Citect memory checking. By enabling the Citect memory checking (see also Q1036 for more details) with the parameter:

[MEMORY]

SEGMENT=1

Citect will generate a General Protection Violation when the corruption occurs. This GPF will be caught by DrWatson and saved into the DrWatson log file. You should send this file into Citect Support. You should only set the [MEMORY]SEGMENT=1 parameter to find the cause of the problem. It should be removed after you have captured the DrWatson trace and should not be used on a running plant.

2. For 32 bit Citect Versions use this method;

Enable Citect memory checking with the parameter:

[debug]

Memory=1

For details on this setting this see Citect on-line help and Q3086.

 

Keywords:
 

Attachments