Difference between revisions of "RoboRumble/Reported Problems"

From Robowiki
Jump to navigation Jump to search
(Huh? Why is it doing that...)
Line 36: Line 36:
  
 
I've looked into my log, the exception are launched only in battle with PolishedRuby.. The bad thing is after this error roborumble will not exit, blocking all external loop script. --[[User:Lestofante|lestofante]] 18:02, 10 December 2008 (UTC)
 
I've looked into my log, the exception are launched only in battle with PolishedRuby.. The bad thing is after this error roborumble will not exit, blocking all external loop script. --[[User:Lestofante|lestofante]] 18:02, 10 December 2008 (UTC)
 +
 +
Yeah, my client also had an out of memory error with PolishedRuby when I came back to the computer now. I find this quite odd because it's gun is an exact copy from [[RougeDC]] and the movement doesn't store any data, and yet I've never seen RougeDC get an out of memory error with -Xmx512M. The only possible cause for this I can think of is that certain battles might last longer with PolishedRuby than RougeDC and because the gun consists of a PM and two DC configs memory usage is increased in longer battles. Still though, I doubt battles last that much longer really, so I'm quite perplexed... If anyone knows of any way to profile memory usage, I'm all ears. --[[User:Rednaxela|Rednaxela]] 20:02, 10 December 2008 (UTC)

Revision as of 21:02, 10 December 2008

OutOfMemoryError

I'm running roborumble client version 1.5.4 on ubuntu (default VM: openJDK 1.6.0.0), and sometimes in my log I find: Exception in thread "Battle Thread" java.lang.OutOfMemoryError: Java heap space, can someone tell me a way to grab more information about this error or a way to solve it?

UPDATE: found more information

Exception in thread "Battle Thread" java.lang.OutOfMemoryError: Java heap space

at java.util.Arrays.copyOf(Arrays.java:2894)
at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:117)
at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:407)
at java.lang.StringBuilder.append(StringBuilder.java:136)
at robocode.io.Logger.log(Unknown Source)
at robocode.battle.Battle.setupRound(Unknown Source)
at robocode.battle.Battle.run(Unknown Source)
at java.lang.Thread.run(Thread.java:636)

--lestofante 12:07, 4 December 2008 (UTC)

To allocate more memory, you need to change "-Xmx256M" in roborumble.sh to something more like "-Xmx512M" or however much you feel comfortable allowing Java to eat. I find 512M is usually a safe value that doesn't run out of memory. --Rednaxela 14:16, 4 December 2008 (UTC)

I've followed your tip but here the another error: Fighting battle 4 ... ags.polished.PolishedRuby 1,jcs.Seth 1.8 Exception in thread "Battle Thread" java.lang.OutOfMemoryError: GC overhead limit exceeded and another: Exception in thread "Battle Thread" java.lang.OutOfMemoryError: Java heap space at java.util.Arrays.copyOf(Arrays.java:2882) at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:100) at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:390) at java.lang.StringBuilder.append(StringBuilder.java:119) at robocode.io.Logger.log(Unknown Source) at robocode.battle.Battle.setupRound(Unknown Source) at robocode.battle.Battle.run(Unknown Source) at java.lang.Thread.run(Thread.java:619) --lestofante 14:38, 10 December 2008 (UTC)


One of my clients also died from an OutOfMemoryError (heap space) while running PolishedRuby against Reaper. I'm using -Xm512, which should be plenty. Most battles run fine so you may have a memory leak? --Darkcanuck 17:48, 10 December 2008 (UTC)

I've looked into my log, the exception are launched only in battle with PolishedRuby.. The bad thing is after this error roborumble will not exit, blocking all external loop script. --lestofante 18:02, 10 December 2008 (UTC)

Yeah, my client also had an out of memory error with PolishedRuby when I came back to the computer now. I find this quite odd because it's gun is an exact copy from RougeDC and the movement doesn't store any data, and yet I've never seen RougeDC get an out of memory error with -Xmx512M. The only possible cause for this I can think of is that certain battles might last longer with PolishedRuby than RougeDC and because the gun consists of a PM and two DC configs memory usage is increased in longer battles. Still though, I doubt battles last that much longer really, so I'm quite perplexed... If anyone knows of any way to profile memory usage, I'm all ears. --Rednaxela 20:02, 10 December 2008 (UTC)