Ranorex causing java.lang.OutOfMemoryError

Bug reports.
krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Ranorex causing java.lang.OutOfMemoryError

Post by krstcs » Wed Feb 10, 2016 10:36 pm

Ranorex 5.4.4 (5.4.5 is in the upgrade pipeline, so I haven't checked it yet, but this has been happening for a couple of versions)
Windows 7 (VM, 2Gb RAM - this is what our production systems have)
Java 1.8.0_71 (AUT is Java desktop application, unfortunately I can't give access, and the nature of this issue prohibits a screen-share session)

When running a long-running test (we have a situation where we need to enter 1000s of orders in our POS system for logistics support testing), after approximately 1.5 hours Ranorex runs the JVM out of memory and crashes the JVM. This does not happen when Ranorex is not running (our POS is up for at least 10 hours every day on hundreds of systems in 90 stores and our test lab, someone would have noticed...).

I'm not sure that it's not a leak in my code, but I'm not doing anything outside of typical Ranorex usage here.

The exception in our AUT logs:

Code: Select all

java.lang.OutOfMemoryError: unable to create new native thread
	at java.lang.Thread.start0(Native Method)
	at java.lang.Thread.start(Unknown Source)
	at com.ranorex.SocketServer.run(SocketServer.java:58)
My guess is that this is part of the "new" Java instrumentation (which I still don't like...) and that there is a leak in it that is overrunning Java's memory pool.

The system memory never gets above 60% load, which is one reason I don't think it's an issue with my test. If the test was the issue, the memory load on the system level would be rising continuously until maxed and I would probably lose control of the VM, which isn't happening.

In addition, I have tried restarting the AUT after a given number of iterations, but that doesn't seem to help, again leading me to believe this is a Ranorex issue since it is the only thing running on the system throughout.
Shortcuts usually aren't...

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

Re: Ranorex causing java.lang.OutOfMemoryError

Post by Support Team » Thu Feb 11, 2016 4:54 pm

Hello krstcs,

Thank you for the detailed description.
We are already working on the issue and hope we can fix it with one of our next releases.
I'll keep you posted.

Regards,
Bernhard
.
Image

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: Ranorex causing java.lang.OutOfMemoryError

Post by krstcs » Thu Feb 11, 2016 5:51 pm

Thanks Bernhard! Looking forward to it... :D
Shortcuts usually aren't...