Page 1 of 1

Ranorex causing java.lang.OutOfMemoryError

Posted: Wed Feb 10, 2016 10:36 pm
by krstcs
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.

Re: Ranorex causing java.lang.OutOfMemoryError

Posted: Thu Feb 11, 2016 4:54 pm
by Support Team
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

Re: Ranorex causing java.lang.OutOfMemoryError

Posted: Thu Feb 11, 2016 5:51 pm
by krstcs
Thanks Bernhard! Looking forward to it... :D