Out Of Memory Exception

Bug reports.
Brett
Posts: 12
Joined: Thu May 27, 2010 9:00 pm

Out Of Memory Exception

Post by Brett » Thu May 27, 2010 9:47 pm

Edit: Running on windows XP, i found you can replicate this if you get a large project and just start adding validation items to the recording.

I saw another post with a memory exception a while back but i think this is different. This happened when I was renaming my screenshots in the repository and again when I was creating validation items in the recording queue. When I build the project it says it cannot save a test.rxlog file because it is out of memory.

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

Exception thrown:
System.OutOfMemoryException: Exception of type
'System.OutOfMemoryException' was thrown.
at System.String.GetStringForStringBuilder(String value, Int32
startIndex, Int32 length, Int32 capacity)
at System.Text.StringBuilder.GetNewString(String currentString,
Int32 requiredLength)
at System.Text.StringBuilder.Append(String value)
at Ranorex.Core.FastXml.XmlNode.PrintNode(StringBuilder text,
XmlNode node, String indent)
at Ranorex.Core.FastXml.XmlNode.PrintNode(StringBuilder text,
XmlNode node, String indent)
at Ranorex.Core.FastXml.XmlNode.PrintNode(StringBuilder text,
XmlNode node, String indent)
at Ranorex.Core.FastXml.XmlNode.PrintNode(StringBuilder text,
XmlNode node, String indent)
at Ranorex.Core.FastXml.XmlNode.PrintNode(StringBuilder text,
XmlNode node, String indent)
at Ranorex.Core.FastXml.XmlNode.PrintNode(StringBuilder text,
XmlNode node, String indent)
at Ranorex.Core.FastXml.XmlNode.PrintNode(StringBuilder text,
XmlNode node, String indent)
at Ranorex.Core.FastXml.XmlNode.PrintNode(StringBuilder text,
XmlNode node, String indent)
at Ranorex.Core.FastXml.XmlDoc.ToXmlString()
at Ranorex.Core.Recorder.RecordTable.ToXmlString()
at Ranorex.Controls.ItemRecorder.<.ctor>b__0(RecordTable rt)
at Ranorex.Controls.UndoStack`2.UpdateState(T obj)
at Ranorex.Controls.ItemRecorder.OnRecordingChanged(Boolean updateUndo)
at Ranorex.Controls.ItemRecorder.UpdateListFromRecordTable(Boolean
causeOnRecordingChanged)
at Ranorex.Controls.ItemRecorder.InsertItemAt(RecordItem ri, Int32 index)
at Ranorex.Controls.ItemRecorder.InsertItem(RecordItem ri)
at
Ranorex.Controls.ItemRecorder.addValidationItemToolButton_Click(Object
sender, EventArgs e)
at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
at System.Windows.Forms.ToolStripButton.OnClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
at
System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e,
ToolStripItemEventType met)
at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e,
ToolStripItemEventType met)
at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
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.ToolStrip.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 2.3.1.8466],
[RxObjectRepository 2.3.1.8466], [RxRecorder 2.3.1.8466], [Workflow
Foundation Designer 2.3.1.8466], [ElementTree 2.3.1.8466]
Workbench.ActiveContent: Ranorex.Addins.RecorderPrimaryViewContent
ProjectService.OpenSolution: [Solution:
FileName=\\mspm1bnas04\nelsos7\RanorexStudio
Projects\T10003\T10003.rxsln, HasProjects=True, ReadOnly=False]
ProjectService.CurrentProject: [CSharpProject: T10003]

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Out Of Memory Exception

Post by Support Team » Fri May 28, 2010 8:23 am

Hi,

Thanks for posting the exception.
How much actions you've done before you saved your project?
It seems to be the same memory leak what we improved.

Regards,
Peter
Ranorex Support Team
.
Image

Brett
Posts: 12
Joined: Thu May 27, 2010 9:00 pm

Re: Out Of Memory Exception

Post by Brett » Fri May 28, 2010 3:20 pm

I did a lot of work before saving it, thankfully it didnt crash or anything. Its hard to say how many, one of my projects it occured on has 159 steps in the recording. That wasnt created all at once however. The other project had 10 screenshots and about 10 other actions. I have a screenshot of my screen during the time of the crash if that would help any that i can email.

Brett
Posts: 12
Joined: Thu May 27, 2010 9:00 pm

Re: Out Of Memory Exception

Post by Brett » Fri May 28, 2010 3:36 pm

It just happened again, I was renaming screenshots in the repository . Their are currently 20 items on the recording queue. Total of 7 screenshots. It gave me the same error as the one posted above.

This might be happening because im using a linked repository.

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Out Of Memory Exception

Post by Support Team » Sat May 29, 2010 12:43 am

Hi,

In next version of Ranorex this memory leak should not happen! It will be released end of next week, I think.

Regards,
Peter
Ranorex Support Team
.
Image

User avatar
DirkB
Posts: 19
Joined: Thu Jan 29, 2009 9:53 am

Re: Out Of Memory Exception

Post by DirkB » Tue Jun 29, 2010 1:39 pm

Hi,

I use Ranorex DLLs within an own .Net application (aka Testrunner) and I have after some (large) time also a OutOfMemory Exception (maybe others too) on Vista.
For me its hard to debug because of the uncertain event and because my application tries/catches everything ("The tests must go on" :roll: ).
For me it would be very helpful to get some kind of error logging of the Ranorex.DLLs (2.3).
I don't find any log-file on my machine. Should I use Sysinternals/DebugView or can you provide a logger?
By the way the system memory is fine - no limit reached.

Regards
Dirk

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Out Of Memory Exception

Post by Support Team » Tue Jun 29, 2010 2:47 pm

Hi,

Is it possible that you write the stack-trace of your exception to the Ranorex Report and post or send us the exact error message?
DirkB wrote:Should I use Sysinternals/DebugView or can you provide a logger?
You cannot view the DLLwith DebugViewer because the DLL is built as Release.

Thanks in advance

Regards,
Peter
Ranorex Support Team
.
Image

User avatar
DirkB
Posts: 19
Joined: Thu Jan 29, 2009 9:53 am

Re: Out Of Memory Exception

Post by DirkB » Thu Jul 01, 2010 8:24 pm

Hi Peter,

unfortunately I have no stack trace because all exceptions are catched.
This is because if an element is not visible the Testsystem should only report and continue.
Is it possible to get a debug build or a trace build?
BTW: The problem seems to occur only on 2 core machines...

Regards
Dirk

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Out Of Memory Exception

Post by Support Team » Fri Jul 02, 2010 9:08 am

Hi,

Sorry but we cannot provide you a Debug Build of Ranorex. Please try it with the new Ranorex Release 2.3.2. We released this Version yesterday. In this version we improved our memory management and this error shouldn't happen anymore.

Regards,
Peter
Ranorex Support Team
.
Image