Occasional Exception when selecting Form.Close
Posted: Thu Apr 01, 2010 7:35 pm
Very occasionally I get the following exception when I submit a Form.Close:
What happens is some work is done on the form then the form.close is called, the form is closed then the exception is thrown. This only happens VERY occasionally and is not readily reproducible. The same portion of code can be called hundreds of times and everything works but once in a while I will get this exception.
This current test pass was in Ranorex version 2.2.3.8084 on Windows 7 Ultimate but has been seen on other versions of Ranorex and other Windows OS's.
Any ideas as to why this may happen so infrequently?
Code: Select all
Ranorex.ActionFailedException: Action 'close' failed on element '{Form:Foundation Setup Data Register - MASTER JOB}'. ---> System.InvalidOperationException: The control does no longer exist.
at Ranorex.Plugin.WinFormsFlavorElement.InvokeMethod(BindingFlags flags, String name, Object[] args)
at Ranorex.Plugin.WinFormsFlavorElement.InvokeAction(Element element, String name, Object[] args)
at Ranorex.Core.Element.InvokeAction(String name, Object[] args)
--- End of inner exception stack trace ---
at Ranorex.Core.Element.InvokeAction(String name, Object[] args)
at Ranorex.Form.Close()
at H_MathRegression_Alternate.Program.Test19(Form HDClientForm, Int32 intCostSummaryPrecision, String[] strArrayTest19Before, String[] strArrayTest19After) in C:\Documents and Settings\Admin\My Documents\Visual Studio 2008\Projects\H$MathRegression_Alternate\H$MathRegression_Alternate\Program.cs:line 8576
What happens is some work is done on the form then the form.close is called, the form is closed then the exception is thrown. This only happens VERY occasionally and is not readily reproducible. The same portion of code can be called hundreds of times and everything works but once in a while I will get this exception.
This current test pass was in Ranorex version 2.2.3.8084 on Windows 7 Ultimate but has been seen on other versions of Ranorex and other Windows OS's.
Any ideas as to why this may happen so infrequently?