Every now and then I am getting following error messages in the HS log:
OpenComPort: Index was outside the bounds of the array.
14.11.2008 16:11:57 Warning Attempt to send to COM port 3, port is not open
14.11.2008 16:11:58 Error Scripting runtime error: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidCastException: Conversion from string "&H" to type 'Integer' is not valid. ---> System.FormatException: Input string was not in a correct format. at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) at System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt) at System.Double.Parse(String s, NumberStyles style, NumberFormatInfo info) at Microsoft.VisualBasic.CompilerServices.Conversions.ParseDoub le(String Value, NumberFormatInfo NumberFormat) at Microsoft.VisualBasic.CompilerServices.Conversions.ToInteger (String Value) --- End of inner exception stack trace --- at Microsoft.VisualBasic.CompilerServices.Conversions.ToInteger (String Value) at Microsoft.VisualBasic.CompilerServices.Conversions.ToInteger (Object Value) at scriptcode158.scriptcode158.Indoortemp(Object chan2) at scriptcode158.scriptcode158.main(Object parms) --- End of inner exception stack trace --- at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) at Scheduler.VsaScriptHost.Invoke(String ModuleName, String MethodName, Object[] Arguments)
14.11.2008 16:11:59 Error OpenComPort: Index was outside the bounds of the array.
14.11.2008 16:11:59 Warning Attempt to send to COM port 6, port is not open
The actual error message is related to the binary serial protocol and if there is no reply from my serial controller my script will crash. It seems that if some of the serial ports have "crashed" only possibility is to restart HS or reboot the computer. Strange thing is that if I close HS (without rebooting HS server) and I'll test the serial connection to my serial controllers with the software provided by the manufacturer there are no problems. So, it seems that this problem is related to HS. I have had this problem for long time with different HS2 versions. I am currently running v2.2.0.130 and I have two Sunix 4 port serial boards. Any ideas?
Jari
OpenComPort: Index was outside the bounds of the array.
14.11.2008 16:11:57 Warning Attempt to send to COM port 3, port is not open
14.11.2008 16:11:58 Error Scripting runtime error: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidCastException: Conversion from string "&H" to type 'Integer' is not valid. ---> System.FormatException: Input string was not in a correct format. at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) at System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt) at System.Double.Parse(String s, NumberStyles style, NumberFormatInfo info) at Microsoft.VisualBasic.CompilerServices.Conversions.ParseDoub le(String Value, NumberFormatInfo NumberFormat) at Microsoft.VisualBasic.CompilerServices.Conversions.ToInteger (String Value) --- End of inner exception stack trace --- at Microsoft.VisualBasic.CompilerServices.Conversions.ToInteger (String Value) at Microsoft.VisualBasic.CompilerServices.Conversions.ToInteger (Object Value) at scriptcode158.scriptcode158.Indoortemp(Object chan2) at scriptcode158.scriptcode158.main(Object parms) --- End of inner exception stack trace --- at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) at Scheduler.VsaScriptHost.Invoke(String ModuleName, String MethodName, Object[] Arguments)
14.11.2008 16:11:59 Error OpenComPort: Index was outside the bounds of the array.
14.11.2008 16:11:59 Warning Attempt to send to COM port 6, port is not open
The actual error message is related to the binary serial protocol and if there is no reply from my serial controller my script will crash. It seems that if some of the serial ports have "crashed" only possibility is to restart HS or reboot the computer. Strange thing is that if I close HS (without rebooting HS server) and I'll test the serial connection to my serial controllers with the software provided by the manufacturer there are no problems. So, it seems that this problem is related to HS. I have had this problem for long time with different HS2 versions. I am currently running v2.2.0.130 and I have two Sunix 4 port serial boards. Any ideas?
Jari
Comment