Unhandled Exception when replaying an unsaved Record

Bug reports.
Posts: 1
Joined: Thu Oct 29, 2009 2:11 pm

Unhandled Exception when replaying an unsaved Record

Post by weppseba » Thu Oct 29, 2009 2:43 pm


I ran into an unhandled exception when trying to playback a new created and unsaved standalone recording.

Steps to reproduce:

* Create a new solution
* Choose from the Menu: File --> New --> File
* Confirm "Create standalone file"
* Select "Ranorex Recording"
* Optionally perfom a recording
* Don't save anything!!!
* Press "Play" (in the Tab belonging to the Record...)
==> An unhandled Exception occurs...

The appended error message was created when doing the above things with the "Win Forms"-Demo...


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

Exception thrown:
System.InvalidOperationException: Cannot save an untitled file to disk!
at ICSharpCode.SharpDevelop.OpenedFile.SaveToDisk()
at ICSharpCode.SharpDevelop.FileServiceOpenedFile.SaveToDisk()
at Ranorex.Addins.RecorderPrimaryViewContent.<.ctor>b__0(Object , EventArgs )
at Ranorex.Controls.ItemRecorder.PlayAll()
at Ranorex.Controls.ItemRecorder.imageButtonPlay_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.UserControl.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

---- 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: [RanorexLogViewer, Enabled=True, Action=Enable], [RxObjectRepository, Enabled=True, Action=Enable], [RxRecorder, Enabled=True, Action=Enable], [Workflow Foundation Designer, Enabled=True, Action=Enable], [ElementTree, Enabled=True, Action=Enable]
Workbench.ActiveContent: Ranorex.Addins.RecorderPrimaryViewContent
ProjectService.OpenSolution: [Solution: FileName=C:\Documents and Settings\SebWep00\My Documents\RanorexStudio Projects\Samples\Win Forms Test(5)\Win Forms Test(5).rxsln, HasProjects=True, ReadOnly=False]
ProjectService.CurrentProject: [CSharpProject: WinForms Test]

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

Re: Unhandled Exception when replaying an unsaved Record

Post by Support Team » Fri Oct 30, 2009 10:27 am

Hi Sebastian,

Thank you for reporting this bug. We have identified the problem and it has been corrected.

Just so you know you should however select add to project as that is the only way it can be used in the code of the project. If select 'Create standalone file' it is as if you are working with the standalone recorder.

Ranorex Support Team