Tag Event Scripts making the system unstable

Hello,

recently we have tried to use Tag Events and it worked fine when used in a simple tag with a simple script, but once we moved the script to a UDT and deployed it to 71 objects the system became completely unstable and the Gateway was restarting continuously. The only way to stabilize the system again was removing the Tag Event Script. We have seen the same behavior in two systems.

The project is Ignition version 7.7.1 on a Win2012 Server. The script is:

#Script to disable the tags of the inverter when there is a communication alarm
#Tags are disabled because Quality can not be changed from script
tags = ["[.]Voltage AC (phase-neutral avg).Enabled",
"[.]Voltage AC (phase-phase avg).Enabled",
"[.]Voltage AC L1-L2.Enabled",
"[.]Voltage AC L2-L3.Enabled",
"[.]Voltage AC L3-L1.Enabled",
"[.]Voltage DC.Enabled"]
valuesFalse = [0] * 6
valuesTrue = [1] * 6
if currentValue.quality.isGood():
	if currentValue.value:
		result = system.tag.writeAll(tags, valuesFalse)
	else:
		result = system.tag.writeAll(tags, valuesTrue)
else:
	result = system.tag.writeAll(tags, valuesTrue)

Thanks.
Fran.