Applies To:
  • CitectSCADA 1.00 1.01 1.10 1.11 1.20 2.00 2.01 3.10 3.21 3.30 4.00 4.10

Summary:
If you use the functions DspDirty with DspText, DspStr, DspSym or DspButton to animate text on a page, Citect will consume memory (leak memory) until the page is changed. For example the following code (called as Advanced Animation or as an Always Command on the page) would consume memory:

DspDirty(21);
DspStr(21, "RedFont", "Display this text");

What is happing with this code, is that the DspDirty function is forcing Citect to redisplay the text each time the function is called. If the DspDirty function call was not made, Citect would optimise the display of the text and display it only once. The second time DspStr was called, Citect would see that the string is already displayed on the screen and will not display it again. When you call DspDirty, you tell Citect to forget what is displayed on the AN (and a small memory leak will occur). With this example you should not need to call the DspDirty function.

If you leave Citect displaying the page with the DspDirt() function for a very long period of time (may take several days), Citect will slowly consume all of Windows memory. When Windows versions 3.x runs out of memory it is likely to cause Windows to crash to the DOS prompt or produce a General Protection Fault GPF.

This problem also exists if you use the function DspDelete() in the same method.

 

Solution:
Only use DspDirty and DspDelete when it is really necessary. You should optimise your Cicode so you don't need to call this function very often.

CIT has confirmed this to be a problem in Citect for Windows versions 1.00 to 3.30, 4.10. This problem has been fixed in version 4.20 and 3.40

 

Keywords:
 

Attachments