Applies To:
  • CitectSCADA 1.00 1.01 1.10 1.11 1.20 2.00 2.01 3.00

Summary:
The cicode error system functions ErrSet(), ErrSetLevel() and IsError() in Citect for Windows pro to version 3.10 shared a single error instance between all running cicode threads. This could cause problems if an error occurred in a cicode thread and then that thread was preempted. If the thread which preempted the first thread called IsError(), this second thread would get the error code from the first. When the first thread resumed and called IsError() it would not see its error code. Due to the nature of the scheduling of cicode threads this was very unlikely to occur. 

Solution:
In Citect for Windows version 3.10 and later there is a unique instance of the error status for each cicode thread. This stops error from one cicode thread from effecting errors in other cicode threads. This may have some side effects to existing cicode which relies on this behaviour. For example if you call ErrSet(1); on startup pro to version 3.10 this would disable all error checking on all current and newly created cicode threads. In version 3.10 and later calling ErrSet(1) will only disable error checking on the cicode thread which called the function. No other cicode threads will have their error checking disabled. If you are disabling all error checking by calling the ErrSet(1) function on startup you must now call ErrSet(1) for all new cicode threads. 

Keywords:
 

Attachments