Unhandled Exception Error

Bug reports.
Posts: 2
Joined: Tue Feb 24, 2009 2:49 pm

Unhandled Exception Error

Post by patik » Thu Feb 26, 2009 11:57 am

This error occurs by doing the following.
1. Open and play script
2. Lock the machine
3. The error is then shown. This was being run in a VMware environment using Win XPPro SP2

Code: Select all

Ranorex Studio Version :
.NET Version         : 2.0.50727.1433
OS Version           : Microsoft Windows NT 5.1.2600 Service Pack 2
Current culture      : English (United Kingdom) (en-GB)
Current UI language  : en-US
Working Set Memory   : 40064kb
GC Heap Memory       : 20868kb

Unhandled exception
Exception thrown:
System.ComponentModel.Win32Exception: The handle is invalid
   at System.Drawing.Graphics.CopyFromScreen(Int32 sourceX, Int32 sourceY, Int32 destinationX, Int32 destinationY, Size blockRegionSize, CopyPixelOperation copyPixelOperation)
   at Ranorex.Imaging.CaptureImageInternal(Element element, Int32 delay, Boolean ensureVisible)
   at Ranorex.Report.Screenshot(Element target)
   at Ranorex.Core.Recorder.Replay.RunInternal(Object inputLanguageObject)
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart(Object obj)

---- 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: Ranorex.Addins.RecorderPrimaryViewContent
ProjectService.OpenSolution: [Solution: FileName=C:\Documents and Settings\Admin\Desktop\DP_Standalone\DP_Standalone.rxsln, HasProjects=True, ReadOnly=False]
ProjectService.CurrentProject: [VBNetProject: DP_Standalone]

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

Post by Support Team » Thu Feb 26, 2009 5:59 pm

Thanks for submitting.

Note that we dont recommend locking the workstation while testing because doing so will result in undefined behavior.

Support Team