F5 + control is not found > System.FormatException

Bug reports.
darkness
Posts: 7
Joined: Mon Dec 15, 2008 9:56 am

F5 + control is not found > System.FormatException

Post by darkness » Mon Dec 15, 2008 10:26 am

when I use the play button for the recording the controls are recognized correctly. when I use F5 to compile and run the program that executes the same recording I get this Exception:

Code: Select all

Ranorex Studio Version : 2.0.0.4977
.NET Version         : 2.0.50727.1433
OS Version           : Microsoft Windows NT 5.1.2600 Service Pack 2
Current culture      : English (United States) (en-US)
Working Set Memory   : 50020kb
GC Heap Memory       : 32102kb

Exception thrown:
System.FormatException: Index (zero based) must be greater than or equal to zero and less than the size of the argument list.
   at System.Text.StringBuilder.AppendFormat(IFormatProvider provider, String format, Object[] args)
   at Debugger.Thread.GetStackTrace(String formatSymbols, String formatNoSymbols)
   at ICSharpCode.SharpDevelop.Services.WindowsDebugger.debuggedProcess_ExceptionThrown(Object sender, ExceptionEventArgs e)
   at Debugger.Process.OnExceptionThrown(ExceptionEventArgs e)
   at Debugger.Process.RaisePausedEvents()
   at Debugger.Interop.MTA2STA.<>c__DisplayClass3.<EnqueueCall>b__0()
   at Debugger.Interop.MTA2STA.PerformCall()
   at Debugger.Interop.MTA2STA.PerformAllCalls()
   at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme)
   at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)
   at System.Threading.ExecutionContext.runTryCode(Object userData)
   at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)
   at System.Windows.Forms.Control.InvokeMarshaledCallbacks()

---- Recent log messages:
Failed to append recent log messages.
System.InvalidOperationException: Sequence contains no elements
   at System.Linq.Enumerable.Single[TSource](IEnumerable`1 source)
   at ICSharpCode.SharpDevelop.Sda.LogMessageRecorder.AppendRecentLogMessages(StringBuilder sb, ILog log)
   at ICSharpCode.SharpDevelop.Sda.ExceptionBox.getClipboardString()

---- Post-error application state information:
Installed 3rd party AddIns: 
Workbench.ActiveContent: [TextEditorDisplayBindingWrapper c:\Documents and Settings\PMWPowerFSE\Desktop\CheckValue\CheckValue\GlobalRepository.cs]
ProjectService.OpenSolution: [Solution: FileName=C:\Documents and Settings\PMWPowerFSE\Desktop\CheckValue\CheckValue.rxsln, HasProjects=True, ReadOnly=False]
ProjectService.CurrentProject: [CSharpProject: CheckValue]
When running the compiled program in the console the following exception is thrown:

Code: Select all

Unhandled Exception: Ranorex.Core.RanorexException: Failed to find item 'Row5' w
ithin the specified timeout of 5000ms.
   at Ranorex.Core.Repository.RepoGenBaseFolder.CreateAdapterForPath[T](String i
temName, String path, Duration searchTimeout)
   at CheckValue.GlobalRepositoryFolders.ContainerPhilipsPmsMipPrivateApplFolder
.get_Row5() in c:\Documents and Settings\user\Desktop\CheckValue\CheckVal
ue\GlobalRepository.cs:line 114
   at CheckValue.Recording1.Start() in c:\Documents and Settings\user\Des
ktop\CheckValue\CheckValue\Recording1.cs:line 32
   at CheckValue.Program.Main(String[] args) in c:\Documents and Settings\PMWPow
erFSE\Desktop\CheckValue\CheckValue\Program.cs:line 23

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Post by Support Team » Thu Dec 18, 2008 12:56 pm

The exception thrown when running your the program in RanorexStudio is a bug that we are currently investigating.

The other exception (RanorexException in user code) may be caused by the fact that RanorexRecorder does generate code that is exactly timed as the RanorexRecorder replay, yet. In the generated code wait times between actions are not considered. Please try inserting a "Delay" action just before the action associated with the item "Row5" and set the Duration for the delay to an appropriate value (at least the Duration of the preceding action).

Regards,
Alex
Ranorex Support Team